Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19412

Where to put data

From bvdp <bob@mellowood.ca>
Newsgroups comp.lang.python
Subject Where to put data
Date 2012-01-25 09:26 -0800
Organization http://groups.google.com
Message-ID <8184572.1820.1327512393386.JavaMail.geo-discussion-forums@prj1> (permalink)

Show all headers | View raw


I'm having a disagreement with a buddy on the packaging of a program we're doing in Python. It's got a number of modules and large number of library files. The library stuff is data, not code. 

I'd like to put the modules in /usr/lib/pythonX.Y/mymodules or wherever setup.py decides. And the data in /usr/share/lib/myprogram.

My buddy says, that it'll be hard to be consistant in the /usr/share/.. when we consider platforms other than linux. So, he wants:

   /usr/lib/pythonX.Y/myprogram
       mymodules ...
       mydata  ....

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:

           include mymodules.foobar
                x=mymodules.foobar.func()

   and I would need to change that to:

            include myprogram.mymodules.foobar

                x=myprogram.mymodules.foobar.func()


unless there is python way to drop the "myprogram" bit?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 09:26 -0800
  Re: Where to put data Rick Johnson <rantingrickjohnson@gmail.com> - 2012-01-25 10:33 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:27 -0800
  Re: Where to put data Evan Driscoll <edriscoll@wisc.edu> - 2012-01-25 12:48 -0600
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:29 -0800
      Re: Where to put data Michael Torrie <torriem@gmail.com> - 2012-01-25 20:30 -0700
        Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-26 08:30 -0800
          Re: Where to put data Michael Torrie <torriem@gmail.com> - 2012-01-26 20:20 -0700
            Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:11 -0800
            Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:11 -0800
        Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-26 08:30 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-25 14:29 -0800
  Re: Where to put data "Martin P. Hellwig" <martin.hellwig@gmail.com> - 2012-01-26 02:16 +0000
  Re: Where to put data John Nagle <nagle@animats.com> - 2012-01-27 14:15 -0800
    Re: Where to put data bvdp <bob@mellowood.ca> - 2012-01-27 19:13 -0800

csiph-web