What is the libs subfolder for?

For me, it is located in the folder C: \ Python33 \ libs.

For reference, this is not the same folder as C: \ Python33 \ Lib - note the uppercase and the lack of "s".

On one computer that I was working on, I just dropped the .py file into the libs folder and could import and use it as a library / module (sorry, I don't know the terminology very well), regardless of where the project I was working on , - this.

However, trying to duplicate this on another machine, this does not work. The attempt to import simply gives the error "no module named X".

So it’s clear that I don’t understand the purpose of the libs folder and how it differs from the Lib folder.

So what is the difference?

+4
source share
2 answers

If you are comparing libs / vs. Lib /, you will notice that the latter is filled with * .py files, and the former has * .lib files. Further research using a text editor will show that * .py files are readable (I hope), but * .lib files are not.

And that is really the difference. If you want to know more, .lib files are static link libraries that are used to create DLL files, C extensions, and all this good stuff. Head for the rabbit hole if it interests you. docs :

, . , spam.py , sys.path. sys.path :

  • , script ( ).
  • PYTHONPATH ( , PATH).
  • .

% PATH% % PYTHONPATH%, , ; , python % PATH% , , , . , Python33/libs/, , .

+2

(Windows 7)/libs - (*.lib) python /Lib. readme :

- with-libs = 'libs': 'libs' LIBS, python        .

/.

; , - - , .

0

All Articles