ahout os.exeve()
发表于 : 2007-10-07 18:08
$cat hello,py
print 'hello world'
$python
>>>execfile('hello.py')
hello world
>>>import os
>>>os.execve('hello.py', (), {})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 8] Exec format error
In windows, os.execve() works fine, but in ubunbtu, it doesnot work.
print 'hello world'
$python
>>>execfile('hello.py')
hello world
>>>import os
>>>os.execve('hello.py', (), {})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 8] Exec format error
In windows, os.execve() works fine, but in ubunbtu, it doesnot work.