python
文章平均质量分 52
Brady_heitong
这个作者很懒,什么都没留下…
展开
-
html样式按原样显示
pylons脚本:"${''.join(c.relateItems[i][0]).replace('"','///"')|n}", |n "')}'>${c.data[i][0].trs_time}", escape()原创 2012-02-28 12:24:07 · 573 阅读 · 0 评论 -
list的各种元素排序
以下的list集合中的元素均为统一类型,混合类型排序暂不讨论。eg1: type - int>>>list1 = [1,2,4,2,5,6,3 ]>>>list1.sort()>>>list1[1, 2, 2, 3, 4, 5, 6]>>> list1.sort(reverse=True)>>> list1[6, 5, 4, 3, 2, 2, 1] eg2:原创 2012-02-28 16:21:32 · 634 阅读 · 0 评论 -
python 文件异地存储 copy
利用paramiko模块,ssh远程登录,将文件内容写入目标机器文件中 email_server_ssh_detail中均需自行配置变量content: 文件内容, date_now: datetime 类型def copy_file_to_server(content, date_now): try: ssh = paramiko.原创 2012-02-29 11:27:44 · 743 阅读 · 0 评论 -
安装eclipse+pydev
一、安装Eclipse SDK。到http://download.eclipse.org/eclipse/downloads/找SDK最新的Release版本,最新的版本是3.3.2下载。一开始我选择的是台湾的[Taiwan]National Center for High-Performance Computing (http),速度只有5kB/s,还是小日本转载 2012-02-29 17:45:54 · 678 阅读 · 0 评论 -
python中时间的相关处理
表示时间的方式:1. 时间戳 time.time() 相对于1970年1月1日的时间,单位秒 2. 格式化时间字符串 “yyyy-mm-dd”or “yyyymmdd” 可通过time中的strptime转换 time.strptime(str,format) 结果为元祖类型,详情见3.元祖 3. 元祖(struct_time) 时间的对象表示模式原创 2012-04-03 19:12:21 · 870 阅读 · 0 评论 -
python2与3的差异
文章内容转载自:https://www.cnblogs.com/codingmylife/archive/2010/06/06/1752807.html1.性能 Py3.0运行 pystone benchmark的速度比Py2.5慢30%。Guido认为Py3.0有极大的优化空间,在字符串和整形操作上可 以取得很好的优化结果。 Py3.1性能比Py2.5慢15%,还转载 2018-01-15 18:13:15 · 500 阅读 · 0 评论