Python
文章平均质量分 68
sandy_tu
这个作者很懒,什么都没留下…
展开
-
cx_Oracle Module
cx_Oracle is a Python extension module that allows access to Oracle databasesand conforms to the Python database API specification. To use it, you just need to download the version which match原创 2009-07-24 09:15:00 · 915 阅读 · 0 评论 -
去除列表中重复的字典
列表的内容是字典,去除其中重复的字典原创 2011-06-01 15:50:00 · 2706 阅读 · 0 评论 -
Python 遍历目录并打印出子目录的大小
import osfrom os.path import join, getsizedef getdirsize(dir): size = 0L for root, dirs, files in os.walk(dir): size += sum([getsize(join(root, name)) for name in files])原创 2010-03-22 21:54:00 · 1382 阅读 · 0 评论 -
PL/SQL and Python scripts for the same function
好长时间没有更新了。。。最近工作中写了一个procedure,功能和逻辑都很简单。但是平时写python习惯了,用pl/sql来写还真是有点不习惯。这里就把两段script都贴在这里,为备以后需要参考。 python script: # Program Name: upd_err_status_cd.pyimport cx_Oracletb_nms = [原创 2009-09-18 13:54:00 · 1076 阅读 · 0 评论 -
Insert Element In XML File by Python xml.etree.ElementTree Module
This is a simple exmple to insert an element in XML file by python xml.etree.ElmentTree Module. sample.xml 1 3 python script. # Program Name: te原创 2009-08-16 16:05:00 · 943 阅读 · 0 评论 -
Insert Data To Oracle Table By Python
This is an example to read the data from a CSV file and insert the data to a Oracle table using python script. # Program Name: insert_data.py# Date: 2009-08-13import cx_Oracleimport da原创 2009-08-16 15:28:00 · 839 阅读 · 0 评论 -
一套Python入门视频
我已经下载了本全套视频教程。本套教程适合于初学者,应该说可以起到抛砖引玉的作用。对于python做了入门的介绍以及一些常用module的介绍,另外多wxPython也做了些介绍。感谢这些内容的讲解者以及录制视频的工作人员。。。。。。 高清版打包下载:http://d.namipan.com/d/88a724c22ab9bfbb6f81bddfa126c94fe3c19f1f70a5281d转载 2009-08-09 20:43:00 · 1731 阅读 · 2 评论 -
Python 处理 XML
由于工作需要,最近需要用Python来处理一些XML文件。所以要学习一些python中处理xml的modules。后面逐步学习、充实该部分内容。 1. xml.etree.ElementTree module 两种方法去读取并解析XML文件 1) import xml.etree.ElementTree as ET tree = ET.parse原创 2009-07-26 15:55:00 · 2114 阅读 · 0 评论 -
Python格式化日期时间
Python格式化日期时间的函数为datetime.datetime.strftime();由字符串转为日期型的函数为:datetime.datetime.strptime(),两个函数都涉及日期时间的格式化字符串,列举如下:%a Abbreviated weekday name%A Full weekday name%b Abbreviated month转载 2009-07-23 10:13:00 · 3326 阅读 · 0 评论 -
Centos 升级python 到2.7.2
Centos 升级python 到2.7.2 #wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2 #tar jfvx Python-2.7.2.tar.bz2#cd Python-2.7.2#./configure #make all #make install #make clean #make distclean查转载 2011-12-27 16:27:18 · 655 阅读 · 0 评论