XAMPP and Python

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

XAMPP and Python

Postby collinpollock » 04. April 2014 19:23

I'm new to Python programming and I'm trying to run a python script to display the results in a web browser.

I'm currently using XAMPP 1.8.3-1 on a MAC OSX 10.9.2. I also have Python 3.3 running on my MAC.

When I try to run the .py file in an browser, I get the following error:

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
End of script output before headers: lab9_1.py

Any suggestions on where I can start to straighten out this issue?

Here's the code from the lab9_1.py file:

Code: Select all
#!/usr/local/bin/

print("Content-Type: text/html\n\n")


# Initialize a few variables.

x, y, z = 15, 7.125, 27


print("Original values:<br>")


# print(the values.

print("x:", x)

print("y:", y)

print("z:", z, "<br>")


# Swap the values.

x, y = y, x
print("Swapped values:<br>")


# print(the values.

print("x:", x)
print("y:", y)

print("z:", z, "<br>")


# Right associative assignment.

x = y = z


print("Right associated values:<br>")


# print(the values.

print("x:", x)

print("y:", y)

print("z:", z)
collinpollock
 
Posts: 1
Joined: 04. April 2014 18:45
Operating System: MAC OSX 10.9.2

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests