Launching scripts in Ubuntu ?

Stef Mientki stef.mientki at gmail.com
Tue Oct 14 13:04:18 CEST 2008


Diez B. Roggisch wrote:
> Stef Mientki wrote:
>
>   
>> hello,
>>
>> I'm not familiar with Linux / Ubuntu,
>> still trying to get my application working under these operating systems.
>>
>> I've a script  "file_support.py",
>> now when I'm in Ubuntu, open a command window and go to the directory
>> where that file is,
>> I can launch the script with :
>>   "python file_support.py"
>> and it works great
>>
>> Now when I want to run the script from another script, let's call it  "
>> test.py"
>> where this is the contents of test.py:
>>
>> import subprocess
>> subprocess.Popen ( [ 'python', 'file_support.py', ] )
>>
>> The script "file_support"  is executed correctly,
>> but the python interpreter is not closed,
>> I've to close it manual by pressing ENTER.
>>     
>
> What do you mean "it's not closed"?
well the command prompt (if it is called that way in Linus) is not returned.

When I run file_support, the command window looks like this
 >>>python file_support.py
..... all kinds of output
 >>>

When I run test.py (which calls fie_support) , I get this
 >>>python test.py
.... all kinds of output (the same as before)

Now I've to explicitly press an enter to get the command prompt back.
This might not sound important,
but the problem is somewhat more complex,
all these scripts are ran from another program,
and although everything works fine under windows,
the program hangs on Ubuntu.
So I guess that this is the (first) problem to solve.

thanks,
Stef





>  Which window is taking the enter, and
> how do you run test.py? 
>
> Diez
> --
> http://mail.python.org/mailman/listinfo/python-list
>   




More information about the Python-list mailing list