<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>I am tring to convert a 
twisted .tap file (gridnoded.tap) to a service</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>for windows 2000 and 
XP.</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>I installed the required 
python packages:</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT face=Arial>- inno</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT face=Arial>- win32 extensions</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT 
face=Arial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>What I have 
done:</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004>&nbsp;&nbsp;&nbsp; <FONT face=Arial>created 
.tap file</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004>&nbsp;&nbsp;&nbsp; <FONT face=Arial>run with 
twistd&nbsp; (checks out ok)</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004>&nbsp;&nbsp;&nbsp; </SPAN></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>When I run tap2ntsvc 
--help,&nbsp; I get no output (error or help message).</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>what else do I have to do 
to get this going?</FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial>Thanks for your efforts 
with tap2ntsvc,&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=480122421-19012004><FONT face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=480122421-19012004><FONT 
face=Arial>Mike</FONT></SPAN></DIV></DIV>
<DIV><SPAN 
class=480122421-19012004>------------------------------------------------------------------------------</SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>I've finished the initial work on tap2ntsvc.&nbsp; This script does 
the<BR>tedious work of creating an installer around your Twisted service.&nbsp; 
A<BR>quick howto:<BR><BR>1. Create a tap or tac file for your application, using 
the method you<BR>normally use.&nbsp; **Test with twistd to make sure that you 
can start the<BR>app from the command line, _before_ you wrap a service around 
it.**<BR><BR>2. Acquire and install the prerequisites of tap2ntsvc.&nbsp; It 
depends on<BR>software outside of Twisted, specifically:<BR>win32all @ <A 
href="http://starship.python.net/crew/mhammond/win32/Downloads.html">http://starship.python.net/crew/mhammond/win32/Downloads.html</A><BR>Innoconda 
@ <A 
href="http://twistedmatrix.com/~moonfallen/innoconda.html">http://twistedmatrix.com/~moonfallen/innoconda.html</A><BR><BR>3. 
Run tap2ntsvc from the command line.&nbsp; (*This is not yet integrated<BR>with 
the "Twisted Command Prompt" available on MSWindows with the<BR>official Twisted 
installer, but it will be when the script becomes an<BR>official part of 
Twisted.) Use --help to get the command line options.<BR>To start with, all you 
need to provide is the name of your tap or tac file.<BR>|<I> python 
.../Twisted/sandbox/moonfallen/tap2ntsvc myapp.tac<BR></I>This will build an 
installable package using Innoconda.<BR><BR>4. Install the package.&nbsp; It 
will be in myappsvc/myapp-...-setup.exe.<BR><BR>5. Start the service; it will 
fail, but you'll find out what modules you<BR>need to add.<BR>|<I> net start 
myapp<BR></I>**It's ok if this doesn't work.**<BR><BR>6. Check the Application 
event log to find out what modules failed to<BR>import; you will be re-running 
py2exe after you add the missing modules.<BR><BR>7. Either: (a) re-run tap2ntsvc 
with the -i option or (b) add your<BR>modules to myappsvc/setup.cfg on the 
"includes=" line.&nbsp; If you choose to<BR>do the latter, read 
myappsvc/README.txt to find out how to recompile<BR>just the parts you 
need.<BR><BR>8. Redo steps 3 through 7 until you no longer get ImportErrors in 
the<BR>Application log.<BR><BR>9. Some applications need data files.&nbsp; If 
you need data files in your<BR>application, consult myappsvc/README.txt and edit 
myappsvc/myapp.fms.<BR>myapp.fms uses a special command language to make adding 
data files as<BR>intuitive as possible.&nbsp; You can put files in c:\Program 
Files\myapp or<BR>any subdirectory thereof, so make sure your application code 
can find<BR>data files there.<BR><BR>When you're done, you should be able to 
'net start myapp' successfully.<BR>~&nbsp;&nbsp; When you want to rebuild it in 
the future, just keep these files in<BR>your version control:<BR>~&nbsp; 
myappsvc/do_inno_script.py<BR>~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
do_inno.py<BR>~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setup.cfg<BR>~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setup.py<BR>~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
myapp.fms<BR><BR>Caveats, bugs, TODO:<BR>- - you must be able to start your 
application in py2exe.&nbsp; Things most<BR>likely to not work are finding 
important data files based on the value<BR>of __file__ in some module.<BR>- - if 
you install the same service multiple times without uninstalling it<BR>in 
between installs, then start it, then uninstall it, it will crash 
on<BR>uninstall.&nbsp; Just be sure to uninstall it in between installs 
while<BR>you're experimenting.<BR>- - I want to make the module finder more 
foolproof, saving several of the<BR>steps above.&nbsp; This is a non-trivial 
problem, however.<BR>- - Really, it needs a frontend.&nbsp; And I hate Tk.&nbsp; 
Can I put a Gtk app into<BR>~ Twisted proper? :-)<BR><BR><BR>The future:<BR>I 
want to move tap2ntsvc out of sandbox and into main Twisted.&nbsp; I 
want<BR>people to read this email over and try it before I do so, in case 
there<BR>are important concerns I need to address.&nbsp; We need to give some 
thought<BR>to what to do about the 2 significant dependencies.&nbsp; Should this 
block<BR>tap2ntsvc from being in Twisted proper?&nbsp; Is there a policy for 
this sort<BR>of thing?<BR><BR></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>Michael Schneider</FONT></DIV>
<DIV><FONT face=Arial size=2>Senior Software Engineering Consultant</FONT></DIV>
<DIV><FONT face=Arial size=2>UGS&nbsp;PLM Solutions - an EDS 
Company</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>"The Greatest Performance Improvement Is 
the&nbsp;transitioning from&nbsp;a non-working state to the working 
state"</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>