<div class="gmail_quote">On Thu, Oct 1, 2009 at 2:17 PM, Valeriy Pogrebitskiy <span dir="ltr"><<a href="mailto:vpogrebi@verizon.net">vpogrebi@verizon.net</a>></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 'twistd' utility - that I would not have expected from it. The problem is - using 'twistd' to start application that requires command-line arguments. In other words, I would expect that 'twistd' 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'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 'twistd' to start applications that do require command-line arguments? Does anyone have suggestions?<br></div></div></blockquote><div><br>twistd doesn't do this for scripts passed with the '-y' option. Those are supposed to be fully-formed configuration files; the options are present in the file itself.<br>
<br>However, it'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><<a href="http://twistedmatrix.com/projects/core/documentation/howto/tap.html">http://twistedmatrix.com/projects/core/documentation/howto/tap.html</a>><br>
</div></div><br>Hope this helps.<br>