Embedded Python : Why does thread lock here?

2009-07-07 Thread roschler
I have the Python Intepreter embedded in a Delphi (Object Pascal) program. In the Python script shown below, I have a module that creates a thread object and starts it. The thread's run() call calls a function called deleteOutputVariables() declared at the module level. In my code's first incarn

Lock down Internet Access from Python script?

2009-04-07 Thread roschler
I know it's not possible to "sandbox" the Python Interpreter like you can the Java VM, but I'm wondering if there is a way to at least lock down internet access? Trying to do it at the O/S service level on Windows like ZoneAlarm does isn't feasible for me, but I thought there might be a way to do

Re: Safe to call Py_Initialize() frequently?

2009-03-20 Thread roschler
On Mar 20, 7:27 pm, Mark Hammond wrote: > On 21/03/2009 4:20 AM, roschler wrote: > > Calling Py_Initialize() multiple times has no effect.  Calling > Py_Initialize and Py_Finalize multiple times does leak (Python 3 has > mechanisms so this need to always be true in the future,

Safe to call Py_Initialize() frequently?

2009-03-20 Thread roschler
I've created a Python server that embeds Python 2.5 and runs Python jobs. I want to be able to completely "flush" the interpreter between each job. That means resetting all variables, stopping all user created threads, and resetting the interpreter sys module path. If it does not cause memory le