On Oct 27, 11:27 am, Hans Mulder <han...@xs4all.nl> wrote: > On 27/10/11 10:57:55, faucheuse wrote: > > > I'm trying to launch my python program with another process name than > > "python.exe". > > Which version of Python are you using? > Which version of which operating system? > > > In order to do that I'm trying to use the os.execvp function : > > > os.execvp("./Launch.py", ["ProcessName"]) > > > Launch.py is the file that Launch the program and ProcessName is > > the ... Process Name ^^ > > > I get this error : OSError : [Errno 8] Exec format error. > > Maybe ./Lauch.py is not executable..... > > Can you run ./Launch.py from the command line? > Does it have a valid shebang line? > Is the 'x' bit set? > What does "file ./Launch.py" report? > > > I searched and found many solutions like : os.execvp("./Launch.py", > > ["./Launch.py","ProcessName"]), but nothing worked so far. > > This works for me: > > os.execvp("./Launch.py", ["ProcessName"]]) > > -- HansM
Hello, This worked for me: os.execvp("./Launch.py", ["python", "ProcessName"]) Best regards, James -- http://mail.python.org/mailman/listinfo/python-list