Python
文章平均质量分 50
hcf105
这个作者很懒,什么都没留下…
展开
-
python shutil
shutil -- High-level file operations 是一种高层次的文件操作工具类似于高级API,而且主要强大之处在于其对文件的复制与删除操作更是比较支持好。相关API介绍copyfile(src, dst)copyfile( src, dst) 从源src复制到dst中去。当然前提转载 2015-01-08 15:01:59 · 562 阅读 · 0 评论 -
python 模块
fcntl 模块(只用于 Unix) fcntl 模块为 Unix上的 ioctl 和 fcntl 函数提供了一个接口. 它们用于文件句柄和 I/O 设备句柄的 "out of band" 操作, 包括读取扩展属性, 控制阻塞. 更改终端行为等等. (out of band management: 指使用分离的渠道进行设备管理. 这使系统管理员能在机器关机的时候对服务器, 网络进行转载 2015-01-06 11:19:21 · 391 阅读 · 0 评论 -
python 路径处理
import os #获取当前脚本文件路径 print os.path.dirname(os.path.abspath(__file__)) #获取当前路径的上级目录 print os.path.abspath(os.path.dirname(os.path.dirname(__file__))) print os.path.abspath(os.pa转载 2015-01-06 11:36:17 · 355 阅读 · 0 评论 -
文件的遍历
import osfor path,file,list in os.walk('E:\\tmp\\NB\\my python\\mypython\\'): for filename in list: print os.path.join(path,filename)原创 2015-03-09 16:49:54 · 433 阅读 · 0 评论 -
python 获取当前函数名和行号
sys._getframe([depth])Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls below the top of the stack. If that is deeper than the ca原创 2015-07-03 11:23:57 · 1227 阅读 · 0 评论