python 教程 第八章、 第一个python程序
来源:互联网 发布:在线网络个人理财公司 编辑:程序博客网 时间:2024/05/21 10:50
第八章、 第一个python程序
#!/usr/bin/env python
import os
import sys
import time
source = [r'G:\s1', r'G:\s2']
target_dir = r'G:\d' + os.sep
today = target_dir + time.strftime('%Y%m%d')
now = time.strftime('%H%M%S')
comment = raw_input('Enter a commnet -->')
if len(comment) == 0:
target = today + os.sep + now
else:
target = today + os.sep + now + \
'_' + comment.replace(' ','_')
if not os.path.exists(today):
os.mkdir(today)
rar_command = r"D:\WinRAR\rar.exe a" + " %s %s" %(target, ' '.join(source))
if os.system(rar_command) == 0:
print "pass"
else:
print "fail"
- python 教程 第八章、 第一个python程序
- python 教程 第八章、 第一个python程序
- 廖雪峰python教程之第一个python程序
- 第一个python程序-python简易教程(三)
- 第一个Python程序
- 第一个Python程序
- 第一个Python程序
- 第一个python 程序
- 第一个Python程序
- 第一个python程序
- 第一个python程序
- 第一个python程序
- 第一个python程序
- 第一个Python程序
- 第一个Python程序
- 第一个Python程序
- 第一个Python程序
- 第一个python程序
- python 教程 第三章、 运算符与表达式
- python 教程 第四章、 控制流
- python 教程 第五章、 函数
- python 教程 第六章、 模块
- python 教程 第七章、 数据结构
- python 教程 第八章、 第一个python程序
- python 教程 第九章、 类与面向对象
- python 教程 第十章、 输入/输出
- python 教程 第十一章、 异常
- python 教程 第十二章、 标准库
- python 教程 第十三章、 特殊的方法
- SecureCRT自动登录Linux并设置时间
- SecureCRT循环检查设备状态
- SecureCRT下载/注册/安装镜像文件