python 绝技
来源:互联网 发布:外国域名注册商 编辑:程序博客网 时间:2024/05/04 04:32
#!ur/bin/env python#coding:utf8#文件重命名import os for file in os.listdir("."): if os.path.splitext(file)[1] == ".tmp":#后缀 print file os.rename(file, os.path.splitext(file)[0] + ".jpg")#前缀print 'done!'
#!usr/bin/env python#coding:utf8#批量生产txt文件#def createtxt(count): for i in range(count): f = open(str(i+1)+'.txt', 'w+') f.write("页面访问成功\n"+str(i)) f.close() print 'done--'+str(i+1)if __name__ == '__main__': count = raw_input('enter the number to create txt: ') createtxt(int(count))
0 0
- python绝技
- python 绝技
- python绝技:运用python成为顶级黑客
- python绝技 — 侦听802.11 Probe请求
- 《Python绝技:运用Python成为顶级黑客》试读感想
- Python 破解zip压缩文件(来自Python绝技)
- Python绝技笔记--------python利用dpkt操作pcap
- python绝技:运用python成为顶级黑客pdf
- Python绝技笔记--------Zip压缩文件密码爆破小脚本
- Python绝技笔记--------Tcp端口扫描小脚本+nmap版本
- Python绝技读书笔记之构建SSH僵尸网络
- Python绝技笔记--------python操作注册表来获取之前连接的网络信息
- 关于《Python绝技:运用Python成为顶级黑客》的学习笔记
- 关于《Python绝技:运用Python成为顶级黑客》的学习笔记
- GridView72绝技
- dw绝技
- 17绝技
- GridView 绝技
- poj2486 Apple Tree
- HDU 4734 F(x)(数位dp)
- EasyUI框架 使用Ajax提交注册信息
- hdu 3746 Cyclic Nacklace (KMP)
- Android 6.0 解决Recyclerview 在 Scrollview 中不能高度自适应问题
- python 绝技
- Oracle 11g学习笔记--MERGE
- 解决scrollview中包含listview所引发的冲突问题
- 计划表
- 字符串处理函数fgets()和gets()
- UE4联机构建光照
- 2016/10/17
- 敏捷开发工程
- 数据结构实验之二叉树二:遍历二叉树