On Sat 3/07/2010 4:25 AM, Anthony Tuininga wrote:
> On Thu, Jul 1, 2010 at 9:03 PM, Craig McQueen
> <[email protected]>  wrote:
>> I looked at the source code, and found that in the initscripts/Console.py--
>> http://cx-freeze.svn.sourceforge.net/viewvc/cx-freeze/trunk/initscripts/Console.py?revision=205&view=markup
>>
>> --there are the following lines:
>>
>>      if sys.version_info[:2]>= (2, 5):
>>          module = sys.modules.get("threading")
>>          if module is not None:
>>              module._shutdown()
>>
>> If these lines are commented-out, then the error message at exit does not
>> occur.
>>
>> Why are those lines there, and what is the consequence of me removing them?
> Hi Craig,
>
> The reason those lines are there is because without them any threads
> that are currently running will simply die when the application ends.
> The Python interpreter itself calls an internal routine that waits for
> the threads to terminate on their own. Its unfortunate that this isn't
> included inside Py_Finalize() but its not. Before Python 2.5, this was
> done via means of an atexit function (which happened inside
> Py_Finalize) but with Python 2.5 and up this has been changed to call
> a special function within the main routine of the Python interpreter.
> I have replicated the behavior using the above lines and that has
> worked for me for some time. Would you be able to send me a sample
> program that I can run and that demonstrates the problem? Thanks.
>
> Anthony
>

Try a Python program that contains only a single line:

     import threading

Of course, it does nothing useful, and should just return without doing or 
printing anything.

On Python 2.6.5, on both Windows 2000 and Ubuntu Linux 10.04, if I make an 
executable with cx_Freeze 
4.1.2, when I run it I get the error message as described above.

Regards,
Craig McQueen



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to