Inserting-embedding some html data at the end of a .py file
Michael Ross
gmx at ross.cx
Wed Mar 6 19:25:09 EST 2013
On Thu, 07 Mar 2013 00:18:44 +0100, Νίκος Γκρ33κ <nikos.gr33k at gmail.com>
wrote:
> Τη Τετάρτη, 6 Μαρτίου 2013 2:06:33 π.μ. UTC+2, ο χρήστης Michael Ross
> έγραψε:
>
>> check_output is available as of Python 2.7
>> I guess you are still on version 2.6 ?
>
>
> I can access each of these from my jailed shell user account without
> issue, and especially i try /usr/bin/python3
>
> nikos at superhost.gr [~]# /usr/bin/python -V
> Python 2.6.6
>
> nikos at superhost.gr [~]# /opt/python3/bin/python3 -V
> Python 3.2.3
>
> nikos at superhost.gr [~]# /usr/bin/python3 -V
> Python 3.2.3
>
>
> Problem is that when i change my shebang constructor to
> #!/sur/bin/python3 my '/cgi-bin/metrites.py' python cgi scripts produces
> an internal server error while with #!/sur/bin/python the script works.
>
> Any ideas as to why? I can post ocde if you want to.
You need to post the Traceback.
Either run /usr/bin/python3 /cgi-bin/metrites.py on the shell
or better look in your webserver error log.
Guess:
In Python 3 "print" is a function.
So
print "something"
will not work. You need to
print("something")
More information about the Python-list
mailing list