【Django】Django源码文件pdf版
17 Sep 2013把django源码用python脚本遍历了一遍,合成了pdf文件,方便大家折腾。
删除了locale国际化无用的文件,还有gis地理模块。
一共1710页,可以当做休闲书来看,哈哈!!
效果还不错吧~
python脚本:
#!/usr/bin/env python #-*- coding: utf-8 -*- import os import os.path import sys reload(sys) sys.setdefaultencoding("utf-8") rootdir = 'C:\Users\Flowerowl\Desktop\django' def walkFolder(rootdir): for parent,dirnames,filenames in os.walk(rootdir): for filename in filenames: path = os.path.join(parent, filename) spath = '\\'.join(os.path.join(parent, filename).split('\\')[4:]) convert(path, spath) def convert(path, spath): f = open(path,'r') context = f.read() f.close() fp = open('djangobook.txt','a') spath = '=============================='+spath fp.write('\r\n'+spath) fp.write('\r\n'+context) fp.close() walkFolder(rootdir)
下载地址:http://dl.vmall.com/c0ofu8kvui
转载请注明:于哲的博客 » 【Django】Django源码文件pdf版