Problems compiling python

Florian Lindner Florian.Lindner at xgm.de
Sun Jan 4 15:49:30 EST 2004


Hello,
I want to compile that small python script:

bastet:/ # cat test.py
#!/usr/bin/python
import sys, os
username = os.getlogin()
print username
os.spawnv(os.P_WAIT, "/root/mailboxmgm.py", sys.argv)

Python 2.3.2 (#1, Oct 12 2003, 14:27:24)
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import py_compile
>>> py_compile.compile("test.py")
>>>
bastet:/ # chmod u+x test.pyc
bastet:/ # ./test.pyc
./test.pyc: line 1: syntax error near unexpected token `;'
'/test.pyc: line 1: `;ò
bastet:/ #

What is wrong?

Thanks,
Florian



More information about the Python-list mailing list