PDA

View Full Version : [Python] Programming by Example



swatto
September 2nd, 2009, 12:52 PM
Hey all,

Ive recently registered on sourceforge and was wondering if it would be a good idea to Develop/look at projects that already exist when getting to grips with Python and look at the source code to try and work out how everything integrates. Im finding it quite difficult to 'think up' programs to write and thought that jumping in at the deep end would perhaps be better and more enjoyable?

What do you think? :)

aeiah
September 2nd, 2009, 01:03 PM
if you're new to programming in general or at a relativley 'beginner' stage, you may find a lot of the code quite baffling and time consuming to understand for large programs. there's many lines of code to trawl through for most applications. i suggest getting your thinking cap on and finding ideas for small programs and scripts first.

very simple ones could include:

various dice games

a conky weather script

a wrapper to automate dvd authoring using mencoder and dvdauthor

a program that uses imdbpy (http://imdbpy.sourceforge.net/) and other stuff (http://www.devshed.com/c/a/Python/Python-for-PDF-Generation/) to generate a dvd cover with a synopsis, review, rating and cast for a given movie

a text adventure game

swatto
September 2nd, 2009, 01:33 PM
Thankyou for your reply aeiah :)

I know about the concepts of programming, functions, classes etc but have had no experience actually writing an application and would have no idea where to start. The IMDBpy idea sounds the most interesting but again I have no clue as to how I get started - I suppose downloading the source code to it would be the first logical step.

KIAaze
September 2nd, 2009, 07:11 PM
Oh, I can give you a little list of python programs that I think could use some help:
http://code.google.com/p/spacebloutch/ (well, I'll have to discuss that with the lead dev first. Activity has been low lately due mostly to IRL work for me.)
http://code.google.com/p/pycracker/
http://joey101.net/snowballz/
https://launchpad.net/gchildcare
https://launchpad.net/webcontentcontrol (not pure python, but I'll gladly accept python scripts)
https://launchpad.net/scripting -> submit useful python scripts :)
https://launchpad.net/comicget

Sorry, no sourceforge project in there. ^^'
I only know C or C++ sourceforge projects.

I don't think working on an existing project directly is necessarily bad.
You can learn by modifying the code and if you don't know how to do something, you'll write a little test app first anyway.
If you write some bad code, other more experienced devs might correct you and you'll learn from it.