[python-win32] how to run exe from python with out using command prompt

Nalli Dinesh nalli.dinesh at gmail.com
Fri May 13 17:59:21 CEST 2005


Use popen3 to do the same. Eg: code for u

import os
FILENAME='test2.py'
env={};env['ENVIRON_UPDATE']='123';os.environ.update(env)
os.environ['ENVIRON_DIRECT_SETTING']='123'
cmdline='c:\python24\python.exe -u %s'%FILENAME
fs=os.popen3(cmdline,'b')
print fs[1].read()


On 5/13/05, Bhanuprakash <bhanu.nukala at neilsoft.com> wrote:
> 
> 
> Hi
> 
>     I would like to ask something
> 
>             How to run .exe from python without using following code
> 
>             
> 
>  
> 
> Import os
> 
> Os.system ('some.exe')
> 
>  
> 
> Am awaiting for your response
> 
>  
> 
> With regards
> 
>  
> 
> Bhanu Prakash Nukala,
> 
> Neilsoft Ltd,
> 
> PUNE
> 
> Phone : +912026052851/52 ext : 239,
> 
> Mobile:   9850757838
> 
>  
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
> 
> 
>


More information about the Python-win32 mailing list