Embedding a executable inside Python Script

Shankarjee Krishnamoorthi shankarjee at gmail.com
Wed Sep 19 12:49:50 EDT 2007


Hi
    I have a python routine which calls an executable file created by
someone else (I dont have the source code. All I have is an exe file).
I do

# My Python Code
output = os.system('other_executable.exe')
# Rest of my program.

I need to give this routine to others to use it. I have a exe made
with py2exe for my Python routine. The issue I am running into is
this. All the exes (mycode.exe and other_executable.exe) are placed in
a Network drive(Say I:) so that people can access it.

When the user calls this from a Local Drice(Say C:) The output is like this
C:> I:\mycode.exe input_file
other_executable_file.exe is not found.....

Is there any way where I can circumvent this. Thanks

Shankarjee



More information about the Python-list mailing list