Jump to content

[Solved] Python 3.2 Not Work.


Guest Arcanck

Recommended Posts

Guest herberth

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!

Link to comment
Share on other sites

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!');

Link to comment
Share on other sites

Guest herberth

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

Thank you very much!

Link to comment
Share on other sites

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