I have tried several ways, this is the way I like best (I develop in
Windows, but this technique should work in *NIX for your application)
:: \whereever\whereever\ (the directory your module is in,
obviously somewhere where PYTHONPATH can
Larry Bates wrote:
> Personally I would do this as a class and pass a path to where
> the file is stored as an argument to instantiate it (maybe try
> to help user if they don't pass it). Something like:
>
> class morph:
> def __init__(self, pathtodictionary=None):
> if pathtodictiona
Personally I would do this as a class and pass a path to where
the file is stored as an argument to instantiate it (maybe try
to help user if they don't pass it). Something like:
class morph:
def __init__(self, pathtodictionary=None):
if pathtodictionary is None:
#
Terry Hancock wrote:
> On Thu, 17 Nov 2005 12:18:51 -0700
> Steven Bethard <[EMAIL PROTECTED]> wrote:
>
>>My problem is with the text file. Where should I keep it?
>>
>>I can only think of a few obvious places where I could
>>find the text file at import time -- in the same
>>directory as the mo
On Thu, 17 Nov 2005 12:18:51 -0700
Steven Bethard <[EMAIL PROTECTED]> wrote:
> My problem is with the text file. Where should I keep it?
>
> I can only think of a few obvious places where I could
> find the text file at import time -- in the same
> directory as the module (e.g. lib/site-package
Steven Bethard wrote:
[Text file for a module's internal use.]
> My problem is with the text file. Where should I keep it? If I want to
> keep the module simple, I need to be able to identify the location of
> the file at module import time. That way, I can read all the data into
> the appropr