I have python 2.5.2 and I know that one comes with panda 3d. I was reading byte of python and came across he issuse of invalid syntax. This is what it all looks like
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type [color=green]“copyright”, [color=green]“credits” [color=yellow]or [color=green]“license()” [color=yellow]for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer[color=green]'s internal loopback
interface. This connection [color=yellow]is not visible on [color=indigo]any external
interface [color=yellow]and no data [color=yellow]is sent to [color=yellow]or received [color=yellow]from the Internet.
****************************************************************
The 5 in python 2.5.2. is highlighted red. Ive pressed Ctrl F5 right after making the program and then right after opening and closing it again. Another IDLE opens after it fails. A popup right after says There’s an error in your program: Invalid Syntax. The words in the title aren’t colored until after I save and open it. I have Panda 1.6.1 if that is helpful.
does panda itself run outside your IDE? does regular python work outside the IDE? does your IDE works with the wrong python version?
btw. i have not the slightest idea what your IDE is doing with all those colors. colors dont exist for the interpreter. they only exist for readability reasons.
if there is a syntax error you should check the syntax. i dont see anything wrong with the “hello world” part thought.
i’m confused.
Wait, I’m pretty confused about what exactly you typed. Do you mean you typed the words “Python 2.5.2” in your program? Because if so, um, the only part of all that text that is actually program code is
print 'Hello World'
Or do you mean you typed the stuff after the triple carats >>>? Because if so, that’s not a program you run either; the triple carats are the interactive prompt that follows along as you type. To run the code with F5 you’d need to type your program into a separate file that you save as something.py
I’m following a tutoriall and it says to type #!/usr/bin/python and
Filename : helloworld.py before hello world. Then it says to save it. I did that and then I opened it and pressed Ctrl F5 and the .5 in the text python 2.5.2 in the very first line highlight right after I try to run it. There’s a popup right after that says: There’s an error in your program: Invalid Syntax on it. The 5 in python 2.5.2 in first line gets highlighted red. I think it may be counting that as a code, but I don’t know how to get rid of it. Also how do you check syntax. Also I have a suspition that this code is for Linux I use Windows
Please don’t leave us hanging like that, I’m curious to know what exactly you were doing. From your post after mine I’m starting to think you typed those lines at IDLE’s interactive prompt, and then saved all the text on the screen and attempted to run that. Is that what you were doing?