[Twisted-Python] tap-relative filenames?

Paul Moore lists at morpheus.demon.co.uk
Thu Nov 14 15:46:21 EST 2002

Moshe Zadka <m at moshez.org> writes:

> On Wed, 13 Nov 2002, Paul Moore <lists at morpheus.demon.co.uk> wrote:
>> 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.
> This is not a good idea -- on Debian systems, for example, tha tap
> would be somewhere on /etc while the data files would be under
> /var. In general, the tap should store the actual file names.

On Unix, yes, quite probably. But on Windows, storing data in an
application-relative location is quite common.

On Windows, there are no standardised directories like /etc or
/var. So absolute filenames are much less usable, in general.

> This seems akin to the classic UNIX question "how do I find the name
> of the executable?" to which the answer is "you don't".

Yes, but on Windows, the answer is to use the Windows API
GetModuleFileName(). It's a cultural difference between the two
operating systems.

If there isn't a way of locating the tap file at the moment, is there
any possibility of one getting added? (I can't do so myself, I'm
nowhere near familiar enough with the internals of Twisted yet).


This signature intentionally left blank

More information about the Twisted-Python mailing list