Re: the 'right way' to distribute and access data files in a packaged Python module

2009-02-02 Thread David Moss
> There is a zip-safe flag that you can specify that tells setuptools that > installing your egg only works if it is unarchived. However, there is also > the pkg_resources-package that allows you to access streams from within a > package, even if it is zipped. You should investigate these two opti

the 'right way' to distribute and access data files in a packaged Python module

2009-02-02 Thread David Moss
Hi, I'm the author of netaddr :- http://pypi.python.org/pypi/netaddr/0.6 For release 0.6 I've added setuptools support so it can be distributed as a Python egg package using the easy_install tool. In 0.6, I've started bundling some data files from IEEE and IANA with the code below the site-

A service for testing Python code on multiple platforms and versions

2008-09-13 Thread David Moss
Hopefully a service like this already exists and I just haven't found it yet. If not it could be an idea for some kind soul(s) to pick up and run with ;-) As someone who writes and releases Python modules for the community, I find it difficult to have a decent level of confidence in the efficacy o

Re: property() usage - is this as good as it gets?

2008-08-26 Thread David Moss
Venerable Pythonistas, Looks like a pretty unanimous vote in favour of custom descriptor usage rather than the more generic property() BIF for my purposes. This is going to tidy and firm up my library code very nicely ;-) Thanks very much for your responses. Your assistance is greatly appreciate

property() usage - is this as good as it gets?

2008-08-22 Thread David Moss
Hi, I want to manage and control access to several important attributes in a class and override the behaviour of some of them in various subclasses. Below is a stripped version of how I've implemented this in my current bit of work. It works well enough, but I can't help feeling there a cleaner