El divendres, 9 gener de 2015 11:10:31 UTC+1, Martin Z va escriure: > > On Friday 09 of January 2015 01:56:25 Kfeina feina wrote: > > Is there any improvement in the final size of the .exe depending of how > we > > import the functions? > > Interesting question. Personally, I have never tried that. > > > For example: > > from httplib2 import iri2uri will produce a smaller .exe respect from > > httplib2 import * ? > > Explicit import (from httplib2 import iri2uri) makes it easier for > pyinstaller > to detect other dependent modules. >
Ok, explicit imports are easier for pyinstaller. But in the following example, where I only want to execute one function (abort()): 1- import os -> you are loading all the modules and functions of the package. 2- from os import abort -> your are loading only the abort function. The first case will produce a bigger exe? Or not? Thanks again for your time. > > With 'from module import *' you will more likely get ImportError when > running > created .exe. > > On windows upx makes a big difference in file size. And recently there was > added > to upx 64bit support for windows dll/exe. > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/d/optout.
