How to make a "command line basd" interactive program?

Jarek Zgoda jzgoda at o2.usun.pl
Fri Apr 11 05:37:09 EDT 2008


Evan napisał(a):
> Hope this hasn't been posted hundreds of times. I'm new for this.
> 
> Before using python for this kind of script, I was using TCL to write
> down a "command line based" interactive program.  it likes a "tclsh",
> or "python" command, after that, you can work under a prompt,  for
> example, " - >> ", and then you can execute any commands what you
> defined in script.
> 
> Now, in python, are there any common way(class) to finish this work?
> or does anybody has a example to do that?

See module cmd and class Cmd there.

-- 
Jarek Zgoda
Skype: jzgoda | GTalk: zgoda at jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)



More information about the Python-list mailing list