PDA

View Full Version : Newbie Python Question



/usr/sbin
July 20th, 2009, 04:26 PM
I would like to start to code and looking at some back issues of Linux Format python seemed to be a good code to learn. So i thought i would start off with trying to do a text editor. When i downloaded Pyword to have a look at it there were quite a few different files which confused me. I had a look around on the internet and i couldnt find an answer. So what do i need to make a basic console based text editor?

I do not have any previous experience with other languages.

Thanks Adam

prem1er
July 20th, 2009, 04:30 PM
Do you have experience with any other languages?

/usr/sbin
July 20th, 2009, 04:31 PM
No i dont, i thoguht that python seemed an easy language to start off with. Im sorry i didnt make that clear at the start.

.Maleficus.
July 20th, 2009, 04:33 PM
Before going right to a text editor, I'd probably start with something a little more basic if you've never used the language before. I'd recommend reading the book "Learning Python"; it's a great introduction to the language that covers most of the core features (and then some).


Edit: Once you feel comfortable with the language, you should check out Project Euler (http://projecteuler.net/) and PythonChallenge (http://www.pythonchallenge.com/). If you can get through a few of those challenges with relative ease you're ready for larger-scale projects like a text editor.

/usr/sbin
July 20th, 2009, 04:35 PM
Ok, thankyou for the recomendation. Where can i find this book please?

.Maleficus.
July 20th, 2009, 04:38 PM
Ok, thankyou for the recomendation. Where can i find this book please?
I got my copy at Barnes and Noble, but (assuming you're in the US) you might find it at Borders or another bookstore. Amazon.com has it if you like online shopping.

/usr/sbin
July 20th, 2009, 04:38 PM
After a quick google search I have found the book, I will buy and read that first. Thanks for the tip :)

.Maleficus.
July 20th, 2009, 04:40 PM
No problem. After you read that, the book "Programming Python" is the most comprehensive reference/guide I've ever seen, so that might be something to check out late. It's by the same author, so if you like "Learning Python" you'll like "Programming Python".

/usr/sbin
July 20th, 2009, 04:43 PM
I shall look into that book also. Thank you for helping me :)

stevescripts
July 20th, 2009, 04:59 PM
I certainly agree with getting some experience prior to undertaking a text editor.

Also, If you want to write a text editor, why console based, rather than GUI based? <curiosity... ;) >

That said - simplistic python/tkinter code for the *beginnings* of a simple text editor(both oo style and procedural)
http://ubuntuforums.org/showthread.php?t=960600

post #5

Steve

/usr/sbin
July 20th, 2009, 05:11 PM
I certainly agree with getting some experience prior to undertaking a text editor.

Also, If you want to write a text editor, why console based, rather than GUI based? <curiosity... ;) >

That said - simplistic python/tkinter code for the *beginnings* of a simple text editor(both oo style and procedural)
http://ubuntuforums.org/showthread.php?t=960600

post #5

Steve

Well i thought that i would have to get all of the icons etc for a gui either that or create them which i can't do!

ahmatti
July 20th, 2009, 06:07 PM
I started learning Python using this tutorial: http://www.zetcode.com/tutorials/pythontutorial/, the same site also has very nice tutorials for GUI programming with different toolkits.

I'm also thinking of buying either "Learning Python" or "Programming Python", which do you guys recommend considering I already have some experience using the language and some programming background?

.Maleficus.
July 20th, 2009, 06:21 PM
"Learning Python" was written with the intent of teaching you the language; "Programming Python" was written as a reference and assumes you have a solid foundation with the language. If you would still consider yourself a beginner, get "Learning Python". If you've written non-trivial Python code before, you might be fine with "Programming Python".

ahmatti
July 20th, 2009, 06:23 PM
Thanks, I'll need to see if I can convince my Boss that I need both :)