twisted and py2exe

Waldemar Osuch waldemar.osuch at gmail.com
Fri Oct 17 00:25:28 EDT 2008


On Oct 16, 11:47 am, Linnorm <linn... at gmail.com> wrote:
> I've written an app using twisted to create an ssh forwarding tunnel
> for our erp app.  When I run it with the interpreter it works
> perfectly, but when I package it up with py2exe it looks like the
> tunnel never gets created.  I don't get any exceptions during the
> build, but I do get the following:
>
> The following modules appear to be missing
> ['Crypto.PublicKey._fastmath', 'Crypto.Util.winrandom', 'FCNTL',
> 'IronPythonConsole', 'OpenSSL', 'System',
> 'System.Windows.Forms.Clipboard', 'clr', 'email.Generator',
> 'email.Iterators', 'email.Utils', 'gmpy', 'modes.editingmodes',
> 'pkg_resources', 'resource', 'startup']

These can be probably ignored.

>
> I've tried including all of these at the command line, but all that
> seems to do is increase the exe size.
>
> Also, this file (_zope_interface_coptimizations.pyd) appears on the

Yup, you need this one.  There should be more *.pyd files.  Usually
they end up in the same directory as the executable.
I always specify zipfile = "lib/library.zip" parameter in my setup.py
This way all the dll end up neatly copied into lib/ sub folder.

> list of libraries that may need to be distributed with the app.  I
> verified that that it is in the library.zip file and I've also tried
> copying it to the app directory and C:\Windows\system32.
>
> Am I missing something?  I've searched Google but can't find anything
> relevant.

Look for message from your Twisted service in "Event Viewer-
>Application"
If some of your imports fail that is where trace would end up.


Waldemar



More information about the Python-list mailing list