2006年08月02日 星期三 18:14
os.system执行的shell命令是不等待其退出的,怎么样才能等待呢? 谢谢! -- wangyingqi c++/python/palm/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060802/743c7043/attachment.htm
2006年08月02日 星期三 18:52
开一个子进程,让父进程等待 if (os.fork() == 0): execl(); else: os.wait() ----- Original Message ----- From: wang yingqi To: python-chinese at lists.python.cn Sent: Wednesday, August 02, 2006 6:14 PM Subject: [python-chinese] 请问os.system os.system执行的shell命令是不等待其退出的,怎么样才能等待呢? 谢谢! -- wangyingqi c++/python/palm/ ------------------------------------------------------------------------------ _______________________________________________ python-chinese Post: send python-chinese at lists.python.cn Subscribe: send subscribe to python-chinese-request at lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060802/e8c05275/attachment.html
2006年08月02日 星期三 19:19
On 8/2/06, wang yingqi <wangyingqi at gmail.com> wrote: > > os.system执行的shell命令是不等待其退出的,怎么样才能等待呢? > 谢谢! > > 使用spawn族函数。 -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/NewEdit
2006年08月04日 星期五 20:30
可以用 popen4 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060804/708b380b/attachment.html
2006年08月10日 星期四 00:14
多谢大家, 因为我想执行的是一个py文件,所以execfile是我最好的选择了. 谢谢大家! spawn()的系列函数没弄懂!有需要再看看.~ On 8/4/06, fofo <qqqeee at gmail.com> wrote: > > 可以用 popen4 > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- wangyingqi c++/python/palm/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060810/38b30526/attachment.htm
Zeuux © 2025
京ICP备05028076号