2010年9月22日
摘要:
Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. Instead, the crontab will appear to load normall... 阅读全文
摘要:
http://www.regexbuddy.com/在线正则开源http://code.google.com/p/regexpal/http://regexpal.com/这个网站仿regexbuddy值得学习好用的正则表达式在线测试工具 reWork(支持search, replace, multiple, split等操作),个人推荐这款。regex.larsolavtorvik.com(PH... 阅读全文
摘要:
http://getfirebug.com/releases/lite/chrome/代码着色http://code.google.com/p/google-code-prettify/not support textareahttp://codepress.sourceforge.net/index.phpthis is support textareahttp://www.cdolivet.c... 阅读全文
摘要:
EtherPadGoogle has acquired AppJet Inc. and its EtherPad collaboration product and technology.The EtherPad.com servers have now been shut down, according tothe timetableannounced previously.Google rec... 阅读全文
摘要:
节选自limdou在邮件列表中的1. config.ini所在的目录应该是运行目录,而不是当前目录。当前目录有可能随时在变,而运行目录则与程序所在的位置有关。2. sys.path是Python导入模块时搜索的目录,与当前目录无关。在windows下会自动将运行所在的目录加入sys.path,在linux可能就不同的。不知道你在linux下试过吗?其实你的问题应该是:config.ini与执行文件... 阅读全文
摘要:
节选自limdou在邮件列表中的1. config.ini所在的目录应该是运行目录,而不是当前目录。当前目录有可能随时在变,而运行目录则与程序所在的位置有关。2. sys.path是Python导入模块时搜索的目录,与当前目录无关。在windows下会自动将运行所在的目录加入sys.path,在linux可能就不同的。不知道你在linux下试过吗?其实你的问题应该是:config.ini与执行文件... 阅读全文
摘要:
python模块commands的使用2009-02-02 12:03作者:李春林来源: http://hi.baidu.com/leechl平时都是使用Perl较多, 要获得shell命令的输出只需要`cmd`就可以了, 需要得到命令执行的状态则需要判断$?的值, 在Python中有一个模块commands也很容易做到以上的效果.看一下三个函数:1). commands.getstatusout... 阅读全文
摘要:
i found on online servicehttp://www.onlinecronjobs.com,which provide cron online,it's aim to some isp only provide lamp etc.then you can upload a polling or shceaual operater,and in onlinescript,give ... 阅读全文
摘要:
Adding Dates and Times in PythonMon, Oct 19, 2009Tech TipsUsing the built-in modulesdatetimeandtimedelta, you can perform date and time addition/subtraction inpython:view plaincopy to clipboardprint?f... 阅读全文
摘要:
缘起: 我的一个项目一些参数需要可设定,于是做了一个web页面用来填充这些参数,填充完了之后再进行执行该脚本,返回该脚本的输出或是错误,整个工作在web上完成。问题: 在操作的过程中遇到的问题是,如何给脚本传入数据,原先是写死在脚本中, 从一个指定的文件里读数据进行处理,但是不够灵活,另外脚本执行完了还有一个垃圾数据文件不优雅,于是想到使用stdin可以重定向来导入数据,如果单纯从stdin导入... 阅读全文
摘要:
http://docs.python.org/library/code.htmlhttp://codeidol.com/python/python3/Parallel-System-Tools/Pipes/http://www.linuxjournal.com/article/2156Python:os模块的进程管理2009-07-09 11:59有两种方式来实现并发性,一种方式是让每个&ldqu... 阅读全文
2010年9月21日
摘要:
Python模块学习 ---- StringIO, cStringIO 内存文件 收藏 StringIO的行为与file对象非常像,但它不是磁盘上文件,而是一个内存里的“文件”,我们可以将操作磁盘文件那样来操作StringIO。一个简单的例子,让你对StringIO有一个感性的认识:1#coding=gbk23importStringIO,cStringIO,sy... 阅读全文
摘要:
create=twf.TableForm('site_create',action='/sites/create.html',children=[ twf.TextField("show_name",label_text="chinese site name:"), twf.TextField("name",label_text="english short site name:"), twf.T... 阅读全文
摘要:
http://www.scriptlearn.com/archives/1981 阅读全文
摘要:
源码下载1.配置文件设置:<httpHandlers><add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/></httpHandlers>2.编写自定义方法(可选,但用这个方法性能可以提高10倍左右,原来注册要300ms,优化后只要10-15ms)publicstatic... 阅读全文
2010年9月20日
摘要:
http://zonghe.17xie.com/book/10558369/50809.htmlsubprocess学习http://blog.sina.com.cn/s/blog_64d75a250100i9tv.htmlGIL让python的解析器更容易写,但也让Python中的线程有点鸡肋的感觉。事实上能受益于Python的线程模式的只有处于IO瓶颈的程序或者以图形为主程序。而对于渴求CPU... 阅读全文
摘要:
use file xxx.py to check file is end with \r\nmultiprocessing sourcesmaxtasksperchild is the number of tasks a worker process can complete before it will exit and be replaced with a fresh worker proce... 阅读全文
摘要:
for file in glob.glob('*.csv') 阅读全文
摘要:
os.chmod("/code/wk/batch_gen_list_links.py",stat.S_IEXEC|stat.S_IWRITE)Python os.chmod() MethodDescription:This method changes the mode ofpathto the passed numericmode. Themodemay take one of the foll... 阅读全文
摘要:
一夜之间,sogou和百度收录了站点观察了一下百度的收录,今天放出的是9.4的收录和9.11号的收录sogou在前几天收录了本站,大约会是收录两天之后在搜索结果页中显示出来,就是会延迟,收录首页之后就会慢慢的来搜其它页面了google的收录持续的在减少从最初的4000多到现在的1000多,但是还是有在更新页面,因为我改了title今天晚些时候,具体是正好是零晨,我在查qq上的排名是发现由第2名降到... 阅读全文
|