Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread Fredrik Lundh
"spike grobstein" write: > I understand why it wasn't working and it makes sense based on the > structure of namespaces that python defines, however, I'm just > surprised that there isn't some kind of built-in facility for dealing > with these types of things. > > Module packages are a spectacular

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread spike grobstein
I understand why it wasn't working and it makes sense based on the structure of namespaces that python defines, however, I'm just surprised that there isn't some kind of built-in facility for dealing with these types of things. Module packages are a spectacular idea, it is just kinda easy to get c

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread Heiko Wundram
spike grobstein wrote: > so, since python supports module packages like it does, you'd think > that it would have ways of making add-on or extension modules to be > more self contained. Errm... You're not quite understanding what the problem is about. A class is just an object. A class object may

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread spike grobstein
oh, wow. that works!!! thanks for the help! so, since python supports module packages like it does, you'd think that it would have ways of making add-on or extension modules to be more self contained. Thanks, again! -- http://mail.python.org/mailman/listinfo/python-list

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread Heiko Wundram
spike grobstein wrote: > I'd like the packages to define a file path for supporting files > (graphics, etc) that are stored inside the package. The problem is that > the superclass's definition (stored elsewhere) has all of the code for > actually opening the files, so when I use the > os.path.dirn