Re: More like a shell command.

2008-08-06 Thread castironpi
On Aug 6, 9:38 am, Bill <[EMAIL PROTECTED]> wrote: > Is there anyway I can extend python to accept a command > which looks more like shell syntax than a function call. > > I want to be able to do this: > >     if blah : >         MyCommand  Arg1  Arg2 > > as opposed to this: > >     if blah : >    

Re: More like a shell command.

2008-08-06 Thread Thor
Maybe this module would work fine: http://docs.python.org/lib/module-cmd.html -- Angel -- http://mail.python.org/mailman/listinfo/python-list

Re: More like a shell command.

2008-08-06 Thread Richie Hindle
[Bill] > Is there anyway I can extend python to accept a command > which looks more like shell syntax than a function call. > > I want to be able to do this: > > if blah : > MyCommand Arg1 Arg2 As a general rule, if Python gives you a syntax error then you can't achieve what you want

Re: More like a shell command.

2008-08-06 Thread Miki
Hello, > Is there anyway I can extend python to accept a command > which looks more like shell syntax than a function call. > > I want to be able to do this: > >     if blah : >         MyCommand  Arg1  Arg2 > > as opposed to this: > >     if blah : >         MyCommand(Arg1,Arg2) > > or this: > >

Re: More like a shell command.

2008-08-06 Thread Mike Driscoll
On Aug 6, 9:38 am, Bill <[EMAIL PROTECTED]> wrote: > Is there anyway I can extend python to accept a command > which looks more like shell syntax than a function call. > > I want to be able to do this: > >     if blah : >         MyCommand  Arg1  Arg2 > > as opposed to this: > >     if blah : >    

More like a shell command.

2008-08-06 Thread Bill
Is there anyway I can extend python to accept a command which looks more like shell syntax than a function call. I want to be able to do this: if blah : MyCommand Arg1 Arg2 as opposed to this: if blah : MyCommand(Arg1,Arg2) or this: if blah : x("MyCommand