[Tutor] How To structure a program for cmd line mode & gui mode

Tony Cappellini cappy2112 at gmail.com
Fri Dec 1 09:21:33 CET 2006


I"m writing a cmd line program which will automate getting some modules out
of cvs, based on some
input criteria.

Initiallly, I will do a cmd line version, but would like to make a gui
version later with QT.

I would like to find out how to structure the program so that when the gui
version is finised, it will still be fully functional in cmd line mode
(without gui).

The gui itself will be very simple- A listbox, and button or two.

python program.py

would run incmd line mode

python program.py -g

would run in gui mode.


How difficult is this to do? Can anyone think of a simple example of a
python app that runs in gui mode & cmd line mode?

thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061201/8f2e3cf0/attachment.html 


More information about the Tutor mailing list