error on windows with commands.getstatusoutput

Pierre Bourdon delroth at gmail.com
Sun Dec 28 16:12:43 EST 2008


The commands module is Unix only. See its documentation :
http://docs.python.org/library/commands.html

On Sun, Dec 28, 2008 at 10:03 PM, Lee Harr <missive at hotmail.com> wrote:
>
> My application is trying to start twistd in a cross-platform way.
>
> Unfortunately, it works fine on my linux system, but I do not
> have windows, and I am trying to debug this remotely on a
> system I never use  :o(
>
> Anyhow, here is the error I am getting:
>
> cmd = '%s -y %s -l %s' % (conf.twistd, conf.tztac, conf.twistdlog)
> status, output = commands.getstatusoutput(cmd)
>
>
>
> Error code: 1
> Command: C:/Python25/Scripts/twistd.bat -y tzmud.tac -l var/log/twistd.log
> Output:
> '{' is not recognized as an internal or external command,
> operable program or batch file.
>
>
> Apparently, the Command works fine from the command line.
>
>
> So...
>
> Can I run a .bat file on windows with getstatusoutput?
>
> Anyone recognize this kind of error?
>
>
> Thanks for any assistance.
>
>
> _________________________________________________________________
> Show them the way! Add maps and directions to your party invites.
> http://www.microsoft.com/windows/windowslive/events.aspx
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list