Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Python A question about packages

  1. Jan 29, 2017 #1

    ShayanJ

    User Avatar
    Gold Member

    I'm trying to understand the structure of this software. If you look at the file vq/PyVQ/pyvq/pyvq.py, you can see that a package named quakelib is imported. I call it a package because I couldn't find a quakelib.py file, and there was just a quakelib directory. But a directory should contain a __init__.py file directly under it to be a package. Instead, quakelib has a __init__.py inside its python subdirectory. So how is this a package?
    Another problem is that the quakelib directory is not in the same directory as the pyvq.py that imports it. So how can it import quakelib?
    Thanks
     
  2. jcsd
  3. Jan 29, 2017 #2

    jedishrfu

    Staff: Mentor

  4. Jan 29, 2017 #3

    ShayanJ

    User Avatar
    Gold Member

    Yeah, I've read python docs, not that particular page though. But it didn't help. I also couldn't find the corresponding page for python 2.7.
    Could you take a look at the link I gave in the OP?
     
  5. Jan 29, 2017 #4

    jedishrfu

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: A question about packages
  1. Question about Java (Replies: 4)

Loading...