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

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -