[Twisted-Python] tap-relative filenames?
lists at morpheus.demon.co.uk
Wed Nov 13 16:36:20 EST 2002
I'm not even sure I know how to ask this question properly, so please
bear with me...
I'm writing an application in Twisted (a news server, serving mbox
files as read-only groups, FWIW). I'm including a simple interface to
dynamically add new files (groups). No problem, but I'd rather keep
things as relocatable as possible.
Ultimately, I'll have a tap file, which I'll use to start the
application using the twistd daemon. So what I'd like to do is store
filenames relative to the directory which contains the tap file. OK,
so I can cd to that directory, and start twistd from there. But in the
more general case, I may start the app from an arbitrary directory and
give the full path to the tap file.
So what I'm saying is, can I find the name of the tap file from within
the application code? I imagine this is non-trivial, because the code
won't always even be started from a tap file (my test rig does
reactor.listenTCP/reactor.run manually) but when it isn't then names
won't be getting persisted, so I don't care (I guess...)
Can anybody help? Does anyone even follow the question??? :-)
This signature intentionally left blank
More information about the Twisted-Python