<分区> 分区>
Possible Duplicate:
How can I run an external command asynchronously from Python?
到目前为止,我的代码将下载文件然后播放。 我想做的是开始下载文件,并在 30 秒后开始观看下载。
这是代码:
urllib.urlretrieve(url2, "/hdd/movie/movie"))
sleep(30)
self.session.open(MoviePlayer, sref)
环顾四周,我认为这可能可行;
os.spawnl(os.P_NOWAIT, urllib.urlretrieve(url2, "/hdd/movie/movie"))
sleep(30)
self.session.open(MoviePlayer, sref)
但这完全一样,在播放前完成下载
