Achim Domma (Procoders) wrote:
> I'm writing a simple shell using cmd.Cmd. It would be very usefull if I
> could read the commands as batchjob from a file. I've tried the following:
[...]
Your original approach should work too if you clear the use_rawinput flag
and provide a do_EOF() method that
Achim Domma (Procoders) wrote:
> I'm writing a simple shell using cmd.Cmd. It would be very usefull if I
> could read the commands as batchjob from a file. I've tried the following:
>
> class MyShell(cmd.Cmd):
> def __init__(self,stdin):
> cmd.Cmd.__init__(self,stdin=stdin)
>
Hi,
I'm writing a simple shell using cmd.Cmd. It would be very usefull if I
could read the commands as batchjob from a file. I've tried the following:
class MyShell(cmd.Cmd):
def __init__(self,stdin):
cmd.Cmd.__init__(self,stdin=stdin)
...
...
if __name__=='__main__'