[Twisted-Python] Freezing twisted successfully?

Gabe Rudy rudy at goldenhelix.com
Thu Feb 16 11:55:03 MST 2006


> Adding a dummy function for dependency tracking solved the problem for me:
>
> def __dependencies_for_freezing():
>      import Crypto.Cipher.AES
>
> I guess that you may have to add even more ciphers depending on
> your ssh config.
>
> - Ralf
>

Sweet, that was it. For future reference, if you want to use conch ssh in a 
PyInstaller frozen program, you need to add a file 
$PyInstallerHome/hooks/hook-twisted.conch.ssh.py that has the line:

hiddenimports = [     "Crypto.Cipher.AES"     ]

or with cx_Freeze add --include-modules=Crypto.Crypto.AES to your FreezePython 
command.

Like Ralf said, you might need more ciphers based on your ssh config.

Thanks guys (Ralf in particular), I don't know if I ever would have figured 
that one out, and using python -v is a neat trick to remember for similarly 
weird situations.

--gabe




More information about the Twisted-Python mailing list