[Tutor] how to make a script do two things at once.
nephish at xit.net
Mon Aug 22 20:02:38 CEST 2005
Michael Lange wrote:
>On Sun, 21 Aug 2005 16:23:20 -0500
>nephish <nephish at xit.net> wrote:
>>i have a simple question about getting a script to do
>>two things at once.
>>for i in range(100):
>> print i
>> if i == 15:
>> os.system('python /home/me/ipupdate.py')
>>when i run this, it stops at 15 and runs the script called out in the
>>os.system line. i know it is supposed to do that. But, how could i get a
>>script to do this without stopping the count (or delaying it unill the
>>script called exits) I don' t have to run it this way, i can import it
>>if necessary as a module. or whatever will work so i can execute two
>>things at once.
>If you just need to call a unix system command you can simply add "&" to the command string to
>make it run in the background.
>Tutor maillist - Tutor at python.org
Well Cool , yeah, i run linux. this would work out great.
More information about the Tutor