Where to put data
Rick Johnson
rantingrickjohnson at gmail.com
Wed Jan 25 13:33:15 EST 2012
On Jan 25, 11:26 am, bvdp <b... at mellowood.ca> wrote:
> I've got 2 issues with this:
>
> 1. I don't know if putting data in the python tree is "legit".
> 2. I'd have to do a lot of rewritting. My modules currently use:
I would not put anything in the toplevel Python folder. You need to
place everything under site-packages --> "Python27\Lib\site-packages
\PackageName\blah". Of course client created files should be saved to
a more accessible place.
> [...]
> unless there is python way to drop the "myprogram" bit?
Considering mymodules is a valid python package, you can do:
py> from mymodules import foobar
More information about the Python-list
mailing list