[Zope] How do you call a shell command from an external method

Passin, Tom tpassin@mitretek.org
Wed, 25 Sep 2002 18:53:12 -0400


[ Friedlander Paul]
>=20
> I have been trying to get Ploticus to work from an external=20
> method with no luck. I put the file (pl.exe) in the=20
> Extensions directory for the quick test and used the following code"
>=20
> import os
>=20
> def test(self):
>     result =3D os.system("c:\\Progra~1\\WebSite\\Extensions\\pl=20
> gantt.pl -gif -o test.gif")
>     return result
>=20
> If I run the command from the prompt it works great. When I=20
> call this function from Zope I get a return value of 1 and no=20
> file is created. I have tried numerous variations on the path=20
> with no luck.
>=20
> Does anyone know how I can shell out to the program?

Call it from an External Method.

Cheers,

Tom P