<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>loading application files from zip files for frozen exes</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi All,</FONT>
</P>

<P><FONT SIZE=2>When packaging a twisted server implementation with py2exe that uses .tac (.py) files one ends up with a zip file with all the python dependencies (as .pyo bytecode), an .exe and the .tac files in the package directory. To me this seems a bit messy since the distribution is by definition a 'frozen' exe and any changes to the python modules in the zip will require a rebuild.</FONT></P>

<P><FONT SIZE=2>With this limitation in mind I initially wrote several patches to twisted core modules to allow an application to be loaded from a zip file (only .py modules) which i attached to issue 1092 (<A HREF="http://twistedmatrix.com/bugs/issue1092" TARGET="_blank">http://twistedmatrix.com/bugs/issue1092</A>). Upon further reflection I realised that this functionality is only really useful in the case of exes frozen with py2exe and I rewrote my patch to be completely external to the twisted core (code and test modules which i have attached to this mail). Would you consider perhaps inclusion of this in the twisted/scripts directory with a short note in a howto?</FONT></P>

<P><FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Grant M</FONT>
</P>

<P><FONT SIZE=2>P.S. this allows you to specify:</FONT>
</P>

<P><FONT SIZE=2>twistd.exe -y &lt;name&gt;</FONT>
</P>

<P><FONT SIZE=2>where &lt;name&gt; is the python module name without the .py</FONT>
</P>

<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>&nbsp;

</BODY>
<!--[object_id=#infocomp.com#]--><P><FONT face=Arial color=#808080 size=1>Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email. </FONT></P>
<P><FONT face=Arial color=#808080 size=1>WARNING: Although Infocomp has taken reasonable precautions so that no viruses&nbsp;are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.</FONT></P></HTML>