[Import-SIG] New PEP draft: "Simplified Package Layout and Partitioning"

Barry Warsaw barry at python.org
Thu Jul 21 22:37:00 CEST 2011


On Jul 19, 2011, at 08:07 AM, Nick Coghlan wrote:

>pkgutil.get_data() needs to be updated to handle this case, so
>retrieving the contents of a specific file in the directory above
>could be written as either of the following:
>
>pkgutil.get_data(foo, 'test/data/file.dat')
>pkgutil.get_data(foo.test, 'data/file.dat')

The latter looks fine to me.

>The question of PEP 302 and listing *available* data files (and other
>directory-style or lazy data access I/O operations) remains open
>(independent of the changes in this PEP). Note that os.path.join based
>approaches already break as soon as you put the package and data files
>in a zipfile.

Yep.

>In reality, I believe people should be using the appropriate packaging
>APIs so that source files and data files may be deployed to distinct
>locations.

Completely agree.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/import-sig/attachments/20110721/ba452114/attachment.pgp>


More information about the Import-SIG mailing list