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

Chris Hengge pyro9219 at gmail.com
Fri Dec 1 23:34:15 CET 2006


I'm wondering if this (snipped from another poster)

1. Look at module cmd in the Python standard library if you have
  not already.  (see http://docs.python.org/lib/module-cmd.html)

would be used for something like a built in console found in alot of games?

On 12/1/06, Tony Cappellini <cappy2112 at gmail.com> wrote:
>
>
> 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
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061201/77625c74/attachment.html 


More information about the Tutor mailing list