py2exe, why tcl files???

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Oct 2 04:34:20 EDT 2002


jubafre at brturbo.com wrote in
news:mailman.1033500603.30294.python-list at python.org: 

> #mont.py
> import re
> from sre import *

Don't use sre directly, your 'import re' line gives you everything you need 
for regular expressions. Also, try to never use 'from <module> import *' as 
it pollutes your namespace unnecessarily.

> import __builtin__
> from struct import *
> import py2exe     

You are importing py2exe. This is the root of your problem. Does your 
script really need you to import this to work?

> 
> # setup.py
> from distutils.core import setup
> import py2exe
> 
> setup(name="re",
>       scripts=["mont.py"],
> )
>      
> why py2exe create a tcl files??? my binary file have 5mb with tcl
> files, how can i take off tcl?? 

py2exe can build programs with tkinter support. Therefore it sometimes has 
to import tkinter, therefore if you import py2exe, your program uses 
tkinter so it will be included in the build.


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list