摘要: import subprocesscalcProc = subprocess.Popen('c:\\Windows\\System32\\calc.exe')subprocess.Popen(['C:\\Windows\\notepad.exe', 'C:\\hello.txt']) 带有参数sub 阅读全文
posted @ 2017-11-14 13:31 魏桐 阅读(242) 评论(0) 推荐(0) 编辑
摘要: import threading, timeprint('Start of program.')def takeANap(): time.sleep(5) print('Wake up!')threadObj = threading.Thread(target=takeANap)threadObj. 阅读全文
posted @ 2017-11-14 13:18 魏桐 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 在Python 中,日期和时间可能涉及好几种不同的数据类型和函数。下面回顾了表示时间的3 种不同类型的值: Unix纪元时间戳(time模块中使用)是一个浮点值或整型值,表示自 1970年1月 1日午夜 0点(UTC)以来的秒数。 datetime 对象(属于datetime 模块)包含一些整型值, 阅读全文
posted @ 2017-11-14 11:45 魏桐 阅读(247) 评论(0) 推荐(0) 编辑