Python How is the quakelib package structured in this software?

  • Thread starter Thread starter ShayanJ
  • Start date Start date
AI Thread Summary
The discussion centers on the structure of a software package, specifically regarding the quakelib directory and its relationship to the pyvq.py file. The user notes that quakelib is imported despite the absence of a quakelib.py file, as it only contains a directory with an __init__.py file located in a subdirectory. This raises questions about its classification as a package since the standard structure requires the __init__.py file to be directly under the package directory. Additionally, the quakelib directory is not located in the same directory as pyvq.py, complicating the import process. A reference to Python's import system is shared, highlighting potential differences between Python 2.7 and 3.3. It is suggested that quakelib may actually be a C library rather than a Python package, with an interface potentially created using SWIG, a tool for generating bindings between C/C++ code and various programming languages, including Python.
ShayanJ
Science Advisor
Insights Author
Messages
2,801
Reaction score
606
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?
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Back
Top