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)