View Full Version : python help please
onewaytrip
April 9th, 2006, 04:03 AM
ok im a total newbie when it comes to programming on a linux system please be kind. alright im running ubuntu, dapper drake flight 6, and would like to start programming on it. ive been programming on windows platform only, mainly C, and would like to start learning python since it comes with ubuntu. ok, now the problem is that i dont how to begin, i see there is a text editor already install and i can select the language i wish code in but i have no idea how to run the program after im done. so can anyone point in the direction of a good tutorial on how to program on ubuntu.
if anything i said doesnt make any sense im sorry but its 4am so im a little daze.
thanks in advance.
nanotube
April 9th, 2006, 04:44 AM
you can find a bunch of really great documentation on python.org website. start with that. (http://docs.python.org/ - the "tutorial" is a good one to start with)
in general though, to run a python program, just open up a terminal, cd to the directory where your python program is, and type "python myprogram.py"
and that will run your program.
btw python is a really cool language, so have fun learning it! :)
krypto_wizard
April 9th, 2006, 05:10 AM
To being with first go through the tutorial of 'A Byte of Python". Thats the most easiest one. Then you can look around some good docs on python. Start writing programs. Checking out comp.lang.python isn't a bad idea.
I am myself new to python but yes people around here are very helpful and you will find lots of help for python. Begin your journey..bon voyage!!!
dolson
April 9th, 2006, 05:56 AM
You can use C on Linux as well you know.. Not that I discourage you from learning python. :)
onewaytrip
April 9th, 2006, 02:48 PM
yeah i know i can use C in linux, im just new to the linux environment. so i wanted to know how do the compliers work on linux, because on windows its just write code then click and as someone stated earlier you have to go into the terminal to run the program. but thanks a lot guys, im gonna read through these tutorials and start programming, i think it shouldnt be too difficult for me because the python shares similar syntax with C. i think the only problem would be getting use to the whole whitespace thing, which i think is pretty cool but could get confusing with multiple lines of code.
dolson
April 10th, 2006, 07:35 AM
yeah i know i can use C in linux, im just new to the linux environment. so i wanted to know how do the compliers work on linux, because on windows its just write code then click and as someone stated earlier you have to go into the terminal to run the program. but thanks a lot guys, im gonna read through these tutorials and start programming, i think it shouldnt be too difficult for me because the python shares similar syntax with C. i think the only problem would be getting use to the whole whitespace thing, which i think is pretty cool but could get confusing with multiple lines of code.
Er, I guess whoever told you that didn't hear of an IDE like Anjuta or Kdevelop before.. Check them out. I use Anjuta myself. For a Python IDE, check out Scite or PIDA (there are others too, but I never tried them)
Choad
April 10th, 2006, 09:17 AM
yeah i know i can use C in linux, im just new to the linux environment. so i wanted to know how do the compliers work on linux, because on windows its just write code then click and as someone stated earlier you have to go into the terminal to run the program. but thanks a lot guys, im gonna read through these tutorials and start programming, i think it shouldnt be too difficult for me because the python shares similar syntax with C. i think the only problem would be getting use to the whole whitespace thing, which i think is pretty cool but could get confusing with multiple lines of code.
with ubuntu if you set up the file permissions so you can execute the file
(right click > properties > permissions > set "owner execute")
then you can just double click it from the file manager. you will get an option to run it then :)
onewaytrip
April 11th, 2006, 02:41 PM
cool thanks i started already with one of the tutorials given above and im liking python a lot but its a strange language at first since im so use to C but its becoming more natural.
fng
April 11th, 2006, 05:28 PM
I really liked the "How think like a computer scientist" book (http://www.greenteapress.com/thinkpython/). It's a bit more for people with no previous programming expirience.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.