Index: C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/modules/thread.java =================================================================== --- C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/modules/thread.java (revision 3128) +++ C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/modules/thread.java (working copy) @@ -40,10 +40,15 @@ public static PyObject error = new PyString("thread.error"); public static void start_new_thread(PyObject func, PyTuple args) { - Thread pt = new FunctionThread(func, args.getArray()); - pt.start(); - } - + Thread pt = new FunctionThread(func, args.getArray()); + PyObject currentThread = func.__findattr__("im_self"); + if (currentThread != null) { + PyObject isDaemon = currentThread.__getattr__("isDaemon"); + boolean d = isDaemon.__call__().__nonzero__(); + pt.setDaemon(d); + } + pt.start(); + } public static PyLock allocate_lock() { return new PyLock(); } Index: C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/util/InteractiveInterpreter.java =================================================================== --- C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/util/InteractiveInterpreter.java (revision 3128) +++ C:/Documents and Settings/Teresa/workspace/jyhton/src/org/python/util/InteractiveInterpreter.java (working copy) @@ -6,13 +6,16 @@ public class InteractiveInterpreter extends PythonInterpreter { public InteractiveInterpreter() { - super(); - cflags = new CompilerFlags(); + this(null, null); } public InteractiveInterpreter(PyObject locals) { - super(locals); - cflags = new CompilerFlags(); + this(locals, null); + } + public InteractiveInterpreter(PyObject locals, PySystemState systemState) { + super(locals, systemState); + cflags = new CompilerFlags(); + } /** * Compile and run some source in the interpreter.