PDA

View Full Version : [SOLVED] python?



banquo
October 17th, 2009, 10:12 AM
Hi!
I have some basic programming-experience (mostly in java,and matlab).
I know the basic stuff with loops etc, and some swing in java as well.
Havent programmed for a while, but now I'm getting interested again,
and I've heard that python is a good easy-to-use language,
my questions are:

are there built in compilers for python in ubuntu/linux?

how do i run the output?

how good is python for graphic (prefferably even realtime, not sure about the exact term what i mean is like platform games) programming?

where could i get reference/info on syntax etc?

thanks :) / Oskar

matmatmat
October 17th, 2009, 10:16 AM
1) Python is interpreted
2)
python <filename>
3) Google pygame
4) The python docs, I would recomend this (http://www.amazon.co.uk/Core-PYTHON-Programming-Wesley-Chun/dp/0132269937/ref=sr_1_1?ie=UTF8&s=books&qid=1255770966&sr=8-1) book

cguy
October 17th, 2009, 10:20 AM
Yes, there are built-in compilers in every major Linux distro.

Say you save the source file as p.py. Open a console, switch to the desired directory and type python p.py. Alternatively, make the file an executable and double-click. :)

Python is good for simple graphics; complex 3D games is too much to ask for.

Google will give you plenty of links if you search for "python tutorial"

--
And it's really easy to learn! I needed only 2 days to become able to implement my own algorithms.

Rinzwind
October 17th, 2009, 10:20 AM
Hello,
You can use any text editor to code in python. My fav. would be Boa Constructor ( :D )

Python is an interpreter so it does not need compiling.
By putting #!/usr/bin/python at the top of your python program file and
making the file itself executable, it will run just fine.

Python has a module called pygame that is suited for creating games. It has functions for keyboard input etc etc.

Links:
http://docs.python.org/reference/
http://www.pygame.org/news.html

banquo
October 17th, 2009, 11:15 AM
nice, thanks alot guys :)
I'll give this a shot =)