Hi, I need to invoke an executable file from zope. I am not able to import modules like os or nt in python script. I also tried to use an external method, but am not able to do so. Zope hangs and I am not able to restart it without restarting the machine. Is there any built-in functions in python to accomplish this? Can we do this from zope itself?? Plz explain. Thanks and regards,
--On Montag, 7. Juni 2004 15:01 Uhr +0530 Kailashnath_Ganesan <Kailashnath_Ganesan@infosys.com> wrote:
Hi, I need to invoke an executable file from zope. I am not able to import modules like os or nt in python script.
right, they are restricted
I also tried to use an external method, but am not able to do so.
why not? which os are you using? how can one reproduce this? starting external programs through an external method is a common task that works. -aj
On Monday 07 June 2004 04:31 am, Kailashnath_Ganesan wrote:
I need to invoke an executable file from zope. I am not able to import modules like os or nt in python script. I also tried to use an external method, but am not able to do so. Zope hangs and I am not able to restart it without restarting the machine. Is there any built-in functions in python to accomplish this? Can we do this from zope itself?? Plz explain.
Research "External Method" and "Extensions". It's well documented and exactly what you are looking for. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
On Monday 07 June 2004 04:31 am, Kailashnath_Ganesan wrote:
I also tried to use an external method, but am not able to do so. Zope hangs and I am not able to restart it without restarting the machine.
Sorry I missed this. You should assume you have a bug in your code that is hanging the machine. Test it thoroughly outside of Zope before attempting to use it. Zope can only be hanging because your code isn't returning (ISTM). Are you using an extension library for Python (i.e. could the hang be happening inside of a C library call?). External methods are well-tested and it's pretty arbitrary what you can execute -- I have run external programs via os.system() from them without incident (e.g. for image processing or generation). Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
participants (3)
-
Andreas Jung -
Kailashnath_Ganesan -
Terry Hancock