On Tue, Oct 25, 2005 at 04:11:39PM +0100, Matthew Fowler wrote: > "problem with execution of xhpl on AxisProduct: [Errno 8] Exec format > error" In this case, it appears that Python is reporting the error of some operating system call, such as execve.
On my operating system, here's a program which creates an executable file which is not a valid ELF file. When it is executed with execve, -1 is returned and errno is set to ENOEXEC ("Exec format error") #----------------------------------------------------------------------- import tempfile, os t, n = tempfile.mkstemp() os.write(t, "\x7fELF\1\1\1\0\0\0\0\0\0\0\0\0\0\0\0") os.close(t) os.chmod(n, 0700) try: print os.execv(n, ['example']) finally: os.unlink(n) #----------------------------------------------------------------------- $ python badexec.py Traceback (most recent call last): File "badexec.py", line 9, in ? print os.execv(n, ['example']) OSError: [Errno 8] Exec format error Jeff > Hi there > > I have been porting python to the Etrax platform and everything seems to > be working. > > However when I run the program in question I get: > > > Im looking for any help to try and solve this issue. Am I correct in > thinking that Python is reporting this problem? If so has anybody > experienced this problem before? > > Thank You > > Matt > -- > http://mail.python.org/mailman/listinfo/python-list >
pgpc3VIheL4DC.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list