全部博文(271)
发布时间:2015-05-12 11:30:20
修改自:原文 : Working with Python subprocess - Shells, Processes, Streams, Pipes, Redirects and More地址 : http://jimmyg.org/blog/2009/working-with-python-subprocess.html 一 程序的stdin,stdout,stderr+redirect+pipe程序的stdin,stdout,stderr:通常地一个应用程序默认地.........【阅读全文】
发布时间:2015-04-25 23:29:39
主要记录下这种用法: columnsList = [column.strip() for column in columnsList]同样 采用此方式 可以做 replace 等类似的操作##在CSDN 上 看到一位企鹅同学分享的PPT《编写“高性能”python 代码》 同以上类似的list 处理 ; 这里做个记录l = range(10000)def function1(): result = [] .........【阅读全文】
发布时间:2013-03-26 18:18:20
下面的是网上看到的其他人的关于跳出多重循环的办法一,可以插入exception跳出。class FoundException(Exception): passtry: for row,record in enumerate(table): for columu,field in enumerate(record): &nbs.........【阅读全文】
发布时间:2013-03-19 15:25:03
python 的异常2010-11-03 22:36:36 python的try语句有两种风格一:种是处理异常(try/except/else)二:种是无论是否发生异常都将执行最后的代码(try/finally)try/except/else风格try: #运行别的代码except : .........【阅读全文】