- 博客(17)
- 资源 (1)
- 收藏
- 关注
原创 用samba创建linux,windows文件共享区,不能保存的问题
跟文件的权限有关系,刚开始只是 chmod 777,但是win下不能修改linux下传过来的文件。经ZD同学研究 chmod -R 777问题解决
2012-02-23 10:33:11
1427
原创 django csrf 403
在表单中加入了{% csrf_token %},还是报403,最后由张丹同学发现是因为表单里面有enctype="text/plain">enctype 是罪魁祸首enctype 属性规定在发送到服务器之前应该如何对表单数据进行编码。默认地,表单数据会编码为 "application/x-www-form-urlencoded"。就是说,在发送到服务器之前,所有字符都会进行编码(空格转
2012-02-23 10:14:02
742
原创 问题列表
This is useful when you want to print stack traces under program control, such as in a “wrapper” around the interpreter.http://docs.python.org/library/traceback.html什么是wrapper?file 的newlines
2012-01-05 11:59:07
412
原创 python lxml笔记
pretty_print=True在命令行有时候无效。etree.tostring(br,with_tail=False)仅对当前项有用。etree.XPath("//text()") 返回列表里不是普通的str是对象。
2011-12-30 18:40:18
630
原创 python optparse学习笔记
首先实例化一个from optparse import OptionParserparser = OptionParser()然后往里面加optionparser.add_option("-f","-u","--uu","--file", dest="filename", ……上面"-f","-u","--uu","--file"叫做option strings可以是加“-
2011-12-30 15:43:43
625
原创 python 中奇怪的import错误
由于在目录下有与python lib下面,被导入的模块相同名字。所以导入的时候先导入本目录的。造成悲剧。模块导入出错的时候可以通过pydoc进行调试pydoc -p 8000可以开启一个web服务,通过网页 查看py的模块。
2011-12-29 17:04:16
820
原创 vim笔记
非GUI版本d的初始化过程:1 设置shell和term选项。2 处理参数。3 根据环境变量和/或文件执行 Ex 命令。命令行参数可影响初始化过程。调用vimrc初始化。 对 Unix、MS-DOS、MS-Windows、OS/2、VMS、Macintosh、RISC-OS 和 Amiga, 读入系统 vimrc 文件执行初始化。该文件的路径可见于 ":ve
2011-12-29 13:39:29
400
原创 sqlalchemy学习笔记
engine = create_engine('sqlite://')# create MetaDatameta = MetaData()# bind to an enginemeta.bind = enginecreate_all() creates foreign key constraints between tables usually inline with the ta
2011-12-21 00:40:47
905
原创 python unicode
The unicode() constructor has the signature unicode(string[, encoding, errors]). All of its arguments should be 8-bit strings. The first argument is converted to Unicode using the specified encodi
2011-12-14 21:12:34
882
原创 python doctest模块学习笔记
You can force verbose mode by passing verbose=True to testmod()不用在 python x.py -v后面加-v显示测试打印信息The module docstring, and all function, class and method docstrings are searched. Objects im
2011-12-11 22:11:18
696
原创 python的logging模块
logger模块的三项任务:1):像应用程序提供接口,发送log message。2):决定执行那个log 动作==》通过filter。3):将log message发送给注册的Handlers。常用的函数:logger.setLevel() logger要处理的msg的level >= 设置的值。Logger.debug(), Logger.info(), Logger
2011-12-08 21:39:01
471
原创 当python finally遇到break和sys.exit
except lite.Error, e: print "Error %s:" % e.args[0] sys.exit(1) print '++++++++++++++++++++++'finally: print "---------------"finally会不会执行?在google搜:sys.exit finally第一个:http:
2011-12-05 15:47:19
2115
原创 python操纵sqlite试用小结
#coding=utf-8import sqlite3conn = sqlite3.connect('D:/job')#这个文件不能用已经存在的curs = conn.cursor()curs.execute("DROP TABLE IF EXISTS http")curs.execute('''create table if not exists http#刚开始用简写的int
2011-12-04 13:35:15
583
原创 写ActiveX出的问题
报错地方的代码_AFXWIN_INLINE BOOL CWnd::KillTimer(int nIDEvent) { ASSERT(::IsWindow(m_hWnd)); return ::KillTimer(m_hWnd, nIDEvent); }
2008-12-08 02:36:00
382
原创 遇到的第一个大麻烦:
第一个坎 遇到的第一个大麻烦: 第三章 frame3 的两个宏 " DECLARE_DYNAMIC / IMPLEMENT_DYNAMIC“ #define DECLARE_DYNAMIC(class_name) /public: /static CRuntimeClass class##class_name; /virtual CRuntimeClass* GetR
2008-06-24 10:28:00
419
原创 开始学习《深入浅出MFC》
近来开始学习WINDOWS 程序设计选书很烦 ~~~~~~~~~~ 先用侯捷的《深入浅出MFC》 卡在第二章 后又用电子版的《WINDOWS 程序设计》从C++直接跳到API 编程 那个难 …… 看完第一篇之后在也看不下去了,又回到了侯捷的《深入浅出MFC》决定把学习的过程记录下来 就当做笔记了
2008-06-24 09:51:00
444
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人