"Terry Carroll" <[EMAIL PROTECTED]> wrote > I figure one way to do it is to write the nuts and bolts of it using > plain > old line oriented techniques; and then write the GUI, calling the > functions already written.
Absolutely, taking care to put the code the GUI will use in separate functions, ideally in a separate module, with no UI elements (GUI or otherwise). You might also think about bundling functions and data into classes at this stage too. Its much easier to get a command line version working than to get a GUI vesion right. Once you know the core works OK then add the GUI gloss. > The other way would be to write a GUI shell with all the controls, > but > calling dummy functions; then write the functions to do the tasks. I do this if the GUI is the bulk of the work. That is, if there will be lots of forms and complex navigation between them and the core processing is just fetching data from a database, say. But for any significant processing of data I always write a CLI first. Incidentally the same applies if I'm writing a networked app, first get it running locally, then add the client/server gloss then finally recast the client as a GUI, or the server as a web app as needed. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor