![]() |
|
|
|
#1 |
|
At http://docs.python.org/dist/node12.html it is described how to add package data to a module. This was pretty easy to do, but now how do I access this data from my module? Is there an API to load a 'package resource' ala Java's classloader? S. Stefan Arentz |
|
|
|
|
#2 |
|
Posts: n/a
|
Stefan Arentz wrote:
> > At http://docs.python.org/dist/node12.html it is described how to add > package data to a module. This was pretty easy to do, but now how do I > access this data from my module? Is there an API to load a 'package > resource' ala Java's classloader? You can always use os.path + the __file__-attribute of the containing package. And there is the 3rd-party pkg_resources, part of setuptools: http://peak.telecommunity.com/DevCenter/PkgResources Diez Diez B. Roggisch |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wonderful data input with web reporting tool | freezea | Software | 0 | 09-09-2009 05:30 AM |
| Re: HDD Data Recovery | Glenn | A+ Certification | 0 | 08-29-2006 04:01 PM |
| Address Bus and External Data Bus Confusion | LoXodonte | A+ Certification | 1 | 04-18-2006 10:09 PM |
| The Practice Test Package Development: A New Service on the Certification Market | David Johnson | A+ Certification | 0 | 01-19-2005 10:52 AM |
| Re: Backing up data to reinstall or replace a Operating system? | Barry Watzman | A+ Certification | 0 | 08-21-2003 06:59 PM |