Jump to content

[Solved] Python 3.2 Not Work.


Recommended Posts

Guest herberth
Posted

The 2.4 and 2.7 Python versions work normally. But 3.2 ever gives me 500 status (Internal Server Error).

What can it be?

My source code of test:

#!/usr/local/bin/python3.2

print 'Content-Type: text/plain\n\n';
print 'Its work!';

 

Thanks in advance!

Guest herberth
Posted

Please, somebody help me.

Posted

Did you make the scripts permissions 775?

Also try:

#!/usr/local/bin/python3

print 'Content-Type: text/plain\n\n';
print 'Its work!';

 

Also I just remembered that the print() function works differently in python 3.2, try this:

#!/usr/local/bin/python3.2

print('Content-Type: text/plain\n\n');
print('Its work!');

Guest herberth
Posted

Problem solved! I did not know the syntax of the print is different in Python 3.2.

Thank you very much!

Guest
This topic is now closed to further replies.
×
×
  • Create New...