|
|
|
|
 ahout os.exeve() - zaxis [ 2007-10-12 22:22 | 531 byte(s)]
 Re: ahout os.exeve() - zaxis [ 2007-10-13 17:45 | 31 byte(s)]
 Re: ahout os.exeve() - passworld [ 2007-10-14 15:08 | 209 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
$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.
|
|
|
----
LDMFD SP!, {R0-R12, PC}^
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
should be
$cat hello,py
#!/usr/bin/python
print 'hello world'
Under Unix, extension means nothing. So .py will not call python to run the file.
|
|
|
----
|
|
[Original]
[Print]
[Top]
|
|
|