[prev in list] [next in list] [prev in thread] [next in thread] 

List:       py2exe-users
Subject:    Re: [Py2exe-users] ImportError: MemoryLoadLibrary failed loading
From:       "Andrea Gavana" <andrea.gavana () gmail ! com>
Date:       2008-08-02 17:36:10
Message-ID: d5ff27200808021036g59aaf1ffpa83d18db882b9084 () mail ! gmail ! com
[Download RAW message or body]

Hi Mike,

On Sat, Aug 2, 2008 at 4:17 AM, Mike Driscoll wrote:
> Larry Bates wrote:
>> bundle = 3 doesn't mean 3 files it means don't bundle.
>>
>> Maybe this will help from docs:
>>
>> The bundle option
>>
>> By default py2exe creates these files in the dist directory which you must
>> deploy:
>>
>>        1. One (or more) .exe files
>>        2. The python##.dll
>>        3. A couple of .pyd files which are the compiled extensions that the exe
>> files need, plus any other .dll files that the extensions need.
>>        4. A library.zip file which contains the compiled pure python modules as
>> .pyc or .pyo files (if you have specified 'zipfile=None' in the setup script
>> this file is append to the .exe files and not present in the dist-directory).
>>
>> The --bundle <level> or -b <level> command line switch will create less files
>> because binary extensions, runtime dlls, and even the Python-dll itself is
>> bundled into the executable itself, or inside the library-archive if you prefer
>> that.
>>
>> The bundled pyds and dlls are never unpacked to the file system, instead they
>> are transparently loaded at runtime from the bundle. The resulting executable
>> appears to be statically linked.
>>
>> Specifying a level of 2 includes the .pyd and .dll files into the zip-archive or
>> the executable. Thus, the dist directory will contain your exe file(s), the
>> library.zip file (if you haven't specified 'zipfile=None'), and the python dll.
>> The advantage of this scheme is that the application can still load extension
>> modules from the file system if you extend sys.path at runtime.
>>
>> Using a level of 1 includes the .pyd and .dll files into the zip-archive or the
>> executable itself, and does the same for pythonXY.dll. The advantage is that you
>> only need to distribute one file per exe, which will however be quite large.
>> Another advantage is that inproc COM servers will run completely isolated from
>> other Python interpreters in the same exe. The disadvantage of this scheme is
>> that it is impossible to load other extensions from the file system, the
>> application will crash with a fatal Python error if you try this. I have still
>> to find a way to prevent this and raise an ImportError instead - any suggestions
>> how this can be implemented would be very welcome.
>>
>> The bundle-option has been tested with some popular extensions, but of course
>> there's no guarantee that any extension will work in bundled form - be sure to
>> test the executable (which you should do anyway).
>>
>> The bundle option achieves its magic by code which emulates the Windows
>> LoadLibrary api, it is compiled into the exe-stubs that py2exe uses. For
>> experimentation, it is also installed as a normal Python extension _memimporte
>>
>> -Larry
>>
>>
>
> <snip>
>
> Wow! That's a lot of information. I understand py2exe somewhat better
> now. I'm not sure where you learn about things like the LoadLibrary api
> and such, but it's good to know the nomenclature. Hopefully I will be
> able to make more informed questions next time.

You can get all the docs, switches and py2exe options help even from
GUI2Exe, by choosing the menu "View" ==> "Compiler Switches". This
will open a web browser window in which all (or almost alll) the
py2exe switches are explained.

HTH.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic