Python论坛  - 讨论区

标题:[python-chinese] 怎样在os.system运行某一命令超时的时候自动结束掉

2007年06月29日 星期五 14:59

leopay leopay在gmail.com
星期五 六月 29 14:59:34 HKT 2007

Äܲ»ÄܾßÌåµã£¿

ÔÚ07-6-29£¬lu_zi_2000 <lu_zi_2000在163.com> дµÀ£º
>
>  °¡²»ºÃÒâ˼ºÇºÇ£¬ÎÒÒÔΪÊÇdebianµÄÓʼþÁÐ±í·¢À´µÄ
> ÔËÐÐÒ»¸öÃüÁʱµÄÎÊÌâÎÒ²»ÖªµÀÓÐûÓе¥¸öÃüÁîÄܹ»×÷µ½£¬²»¹ý¿ÉÒÔдһ¸öSHELL½Å±¾¾ÍÖУ¬ÎÒÏëÖ»ÒªÊÇshellÄܹ»×÷µ½µÄpythonÒ»¶¨Äܹ»×÷µ½µÄ
>
>  ------------------------------
>  lu_zi_2000
> 2007-06-29
>  ------------------------------
>  *·¢¼þÈË£º* XiaQ
> *·¢ËÍʱ¼ä£º* 2007-06-29 10:14:19
>  *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* Re: [python-chinese]ÔõÑùÔÚos.systemÔËÐÐijһÃüÁʱµÄʱºò×Ô¶¯½áÊøµô
>
>  ÄѵÀJavaÓÐos.system£¬Python¾Í²»ÄÜÓÐÂð :-P
> lu_zi_2000 дµÀ:
> > os.system?
> > ÊÇjava?
> > ------------------------------------------------------------------------
> > lu_zi_2000
> > 2007-06-29
> > ------------------------------------------------------------------------
> > *·¢¼þÈË£º* leopay
> > *·¢ËÍʱ¼ä£º* 2007-06-29 09:55:50
> > *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > *³­ËÍ£º*
> > *Ö÷Ì⣺* Re: [python-chinese]ÔõÑùÔÚos.systemÔËÐÐijһÃüÁʱµÄʱºò×Ô¶¯
> > ½áÊøµô
> > ×Ô¼ºÏȶ¥Ò»Ï£¬ÊDz»ÊÇÒªfork¸öÆäËûµÄ½ø³ÌÀ´monitorËü
> >
> > ÔÚ07-6-29£¬*leopay*  <leopay在gmail.com  leopay在gmail.com > > дµÀ£º
> >
> >     ÈçÌâ
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070629/9ecb2175/attachment.html 

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

2007年06月29日 星期五 17:15

Li Qingfeng liqfemail在gmail.com
星期五 六月 29 17:15:43 HKT 2007

ÎÒÕÒµ½Ò»¸ö·½·¨ÄãÊÔÊÔ£º
1.ÏÈÓÃos.spawn´úÌæos.systemÖ´ÐÐÄãµÄÃüÁ²¢·µ»Ø¸Ã×Ó½ø³ÌµÄPID£»
2.ÓÃtime.sleepÑÓʱһ¶Îʱ¼ä£¬È»ºóÓÃos.killɱËÀ¸ÃPIDµÄ½ø³Ì¡£
Ïà¹Øº¯ÊýµÄÓ÷¨ÄãµÃ×Ðϸ²éÒ»ÏÂÊֲᡣ

ÔÚ07-6-29£¬leopay <leopay在gmail.com> дµÀ£º
>
> Äܲ»ÄܾßÌåµã£¿
>
> ÔÚ07-6-29£¬lu_zi_2000 <lu_zi_2000在163.com> дµÀ£º
> >
> >  °¡²»ºÃÒâ˼ºÇºÇ£¬ÎÒÒÔΪÊÇdebianµÄÓʼþÁÐ±í·¢À´µÄ
> > ÔËÐÐÒ»¸öÃüÁʱµÄÎÊÌâÎÒ²»ÖªµÀÓÐûÓе¥¸öÃüÁîÄܹ»×÷µ½£¬²»¹ý¿ÉÒÔдһ¸öSHELL½Å±¾¾ÍÖУ¬ÎÒÏëÖ»ÒªÊÇshellÄܹ»×÷µ½µÄpythonÒ»¶¨Äܹ»×÷µ½µÄ
> >
> >  ------------------------------
> >  lu_zi_2000
> > 2007-06-29
> >  ------------------------------
> >  *·¢¼þÈË£º* XiaQ
> > *·¢ËÍʱ¼ä£º* 2007-06-29 10:14:19
> >  *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > *³­ËÍ£º*
> > *Ö÷Ì⣺* Re: [python-chinese]ÔõÑùÔÚos.systemÔËÐÐijһÃüÁʱµÄʱºò×Ô¶¯½áÊøµô
> >
> >  ÄѵÀJavaÓÐos.system£¬Python¾Í²»ÄÜÓÐÂð :-P
> > lu_zi_2000 дµÀ:
> > > os.system?
> > > ÊÇjava?
> >
> > > ------------------------------------------------------------------------
> > > lu_zi_2000
> > > 2007-06-29
> >
> > > ------------------------------------------------------------------------
> > > *·¢¼þÈË£º* leopay
> > > *·¢ËÍʱ¼ä£º* 2007-06-29 09:55:50
> > > *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > > *³­ËÍ£º*
> > > *Ö÷Ì⣺* Re: [python-chinese]ÔõÑùÔÚos.systemÔËÐÐijһÃüÁʱµÄʱºò×Ô¶¯
> > > ½áÊøµô
> > > ×Ô¼ºÏȶ¥Ò»Ï£¬ÊDz»ÊÇÒªfork¸öÆäËûµÄ½ø³ÌÀ´monitorËü
> > >
> > > ÔÚ07-6-29£¬*leopay*  <leopay在gmail.com  leopay在gmail.com >
> > > дµÀ£º
> > >
> > >     ÈçÌâ
> > >
> > >
> >
> > > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070629/4253f5f3/attachment.htm 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号