How is the quakelib package structured in this software?

  • Context: Python 
  • Thread starter Thread starter ShayanJ
  • Start date Start date
Click For Summary

Discussion Overview

The discussion centers around the structure of the quakelib package within a software project, specifically addressing how it is organized and imported in relation to Python's package requirements. Participants explore the implications of the directory structure and the nature of quakelib as it relates to Python and C libraries.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant notes that quakelib is imported in the file pyvq.py but questions its status as a package due to the absence of a quakelib.py file and the presence of __init__.py only in a subdirectory.
  • Another participant suggests consulting the Python documentation for clarification on package structure and import behavior, referencing a specific page for Python 3.3.
  • A participant acknowledges reading the Python documentation but indicates it did not resolve their confusion, particularly regarding Python 2.7.
  • One participant proposes that quakelib may actually be a C library rather than a Python package, suggesting the possibility of an interface being built using SWIG.
  • The mention of LD_LIB_PATH in Linux environments is brought up as a factor in locating shared libraries.

Areas of Agreement / Disagreement

Participants express differing views on whether quakelib is a Python package or a C library, indicating a lack of consensus on its classification and the implications for its importation.

Contextual Notes

There is uncertainty regarding the specific requirements for Python package structure and how they apply to the quakelib directory. Additionally, the discussion does not resolve the differences in behavior between Python 2.7 and Python 3.x.

ShayanJ
Science Advisor
Insights Author
Messages
2,802
Reaction score
605
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
 
Technology news on Phys.org
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?
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
5
Views
17K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 14 ·
Replies
14
Views
8K
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K