tags:

views:

301

answers:

3

i want to code in python and i know the syntax well.. but i have got no idea how to compile and run it ..!! i mean i am from ruby , java , c , c++ background and there after saving it in a file we go to command prompt and type the command and the file name to compile and run it . then what about python ? why does python filename.py doesnt work ?

and how to make a file run then ? and which python books to follow for better understanding

i am using windows os .! and i dont want to run it line by line on the idle .. i want to write the whole code and then run it from windows command prompt

+1  A: 

what operating system are you using?... you dont need to compile python code its interprated. just invoke the command line interpreter followed by the name of your .py file

Umair Ahmed
+4  A: 

If you're using Windows, you'll need to add the path to your Python executable to the Path environment variable; on Linux, and I presume Mac, this should already be done.

Oh, and you don't compile python programs, they are interpreted at run time.

John McCollum
+2  A: 

If you are from Ruby background, you should be able to handle another interpreted language, which is what python is too.

Good starter resource:

Dive into Python

Anthony Kong
Full ACK, cannot believe that someone who knows ruby can't work with python...
André