[Twisted-Python] twistd and passphrase

Lorenzo Allegrucci l.allegrucci at gmail.com
Mon Jul 17 04:22:58 MDT 2006


Hi, I'm using twistd to run my server as a daemon (by "twistd -y
app.py").
Below is a sample of my code:

----app.py----
class MyService(internet.SSLServer):
    ...

application = service.Application("MyApp")
myService = MyService()
myService.setServiceParent(application)
----app.py----

Now, app.py needs a passphrase to read its SSL key and I wish to prompt
the user to enter such passphrase. I tried getpass() but it doesn't work
because /dev/stdin is already redirected to /dev/null.
How can I ask for a passphrase using twistd?
Thanks






More information about the Twisted-Python mailing list