<div class="gmail_quote">On Thu, Oct 1, 2009 at 2:17 PM, Valeriy Pogrebitskiy <span dir="ltr">&lt;<a href="mailto:vpogrebi@verizon.net">vpogrebi@verizon.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">I came across some problem using &#39;twistd&#39; utility - that I would not have expected from it. The problem is - using &#39;twistd&#39; to start application that requires command-line arguments. In other words, I would expect that &#39;twistd&#39; passes command-line arguments to Python application - just as Python does. <div>
</div></div></blockquote><div><br>While this is a reasonable expectation, twistd does quite a lot and it wouldn&#39;t be quite right to pass on all the arguments in a flat list the way Python does.<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div>My question is: how is it possible to use &#39;twistd&#39; to start applications that do require command-line arguments? Does anyone have suggestions?<br></div></div></blockquote><div><br>twistd doesn&#39;t do this for scripts passed with the &#39;-y&#39; option.  Those are supposed to be fully-formed configuration files; the options are present in the file itself.<br>
<br>However, it&#39;s fairly straightforward to get what you want.  Instead of writing a python configuration file, write a plug-in for twistd.  The technique for doing so is documented here:<br><br>&lt;<a href="http://twistedmatrix.com/projects/core/documentation/howto/tap.html">http://twistedmatrix.com/projects/core/documentation/howto/tap.html</a>&gt;<br>

</div></div><br>Hope this helps.<br>