unable to call exe using python -


i calling exe (which dependent on other batch files) , python giving error. able call exe (which independent)

what doing is..

import os os.system("notepad.exe")    # working 

but

os.system("c:/ank.exe")     # giving error ank.exe dependent on other batch     files 

you have first change current directory executable want run can find dependencies:

target = "c:/ank.exe" os.chdir(os.path.dirname(target)) os.system(target) 

otherwise, os.system() executes in directory of running script.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -