Excluding specific module from import

Tom Harris TomH at optiscan.com
Tue Sep 3 21:41:56 EDT 2002


> Anthony Tuininga [mailto:anthony at computronix.com]

>You might want to mention what method you are using for building an
>executable as there are several methods available! Each has a slightly
>different method for eliminating modules from the final executable.Sure, I
am using py2exe.

Sure, its py2exe.

On Tue, 2002-09-03 at 18:31, Tom Harris wrote:
> Greetings
> 
> I have a library that tries to import mx.DateTime, and on failure uses its
> own implementation. The problem is that I am building an executable, and I
> would much rather not have mx imported, as it increases the size of the
> executable by a factor of two. Could someone give me an idea how to frob
> things so that import will fail to import mx.*. I cannot frob sys.path as
it
> only contains a path to site-packages. I would sooner not rewrite the
> library.
> Thanks
> 
> Tom Harris, Software Engineer
> Optiscan Imaging, 15-17 Normanby Rd, Notting Hill, Melbourne, Vic 3168,
> Australia
> email tomh at optiscan.com     ph +61 3 9538 3333  fax +61 3 9562 7742
> 
> This email may contain confidential information. If you have received this
> email in error, please delete it immediately,and inform us of the mistake
by
> return email. Any form of reproduction, or further dissemination of this
> email is strictly prohibited. Also, please note that opinions expressed in
> this email are those of the author, and are not necessarily those of
> Optiscan Pty Ltd.
> 
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list