How to actually write a program?
ville at spammers.com
Sat Sep 4 17:21:47 CEST 2004
>>>>> "nick" == Nick Evans <nick at huff.org.uk> writes:
nick> have a possably rough idea of how the program will work. You
nick> have opened an empty text file and saved it as
nick> 'mykewlprogram.py' and now your sitting in front of an empty
nick> text file... Now then.... where do I start.
Typically, a program reads a bunch of data, crunches it and outputs
it. Find a trivial way to get the necessary data into elementary
Python data structures like lists, tuples and dicts (many typical
programs don't need classes at all). Write a function to process that
data, resulting in a bunch of new objects (data
structures). pprint.pprint the resulting objects, and after you are
satisfied with the output, perform the necessary actions according to
the objects. The rest is just chrome.
If you are interested in starting with the chrome (a'la VB), check out
PythonCard (or Boa constructor, or equivalent).
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list