Python论坛  - 讨论区

标题:[python-chinese] 请问os.system

2006年08月02日 星期三 18:14

wang yingqi wangyingqi at gmail.com
Wed Aug 2 18:14:44 HKT 2006

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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年08月02日 星期三 18:52

fu wenxiang fuwenxiang1982 at gmail.com
Wed Aug 2 18:52:36 HKT 2006

开一个子进程,让父进程等待
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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年08月02日 星期三 19:19

limodou limodou at gmail.com
Wed Aug 2 19:19:10 HKT 2006

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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年08月04日 星期五 20:30

fofo qqqeee at gmail.com
Fri Aug 4 20:30:03 HKT 2006

可以用 popen4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060804/708b380b/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年08月10日 星期四 00:14

wang yingqi wangyingqi at gmail.com
Thu Aug 10 00:14:57 HKT 2006

多谢大家,
因为我想执行的是一个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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号