1

Is it wrong to refer to Python modules and packages as "libraries" ? Is there a technical differense ? Python documentation never mentions the word "library" in the packages or modules entry, but always refers to Pythons' built-in code as "library".

0

1 Answer 1

3

What's in a name? But as we are at it: 'library' is no technical/syntactical term in python and there is no organisational structure that would you call a python library. officially specified or mandatory way how you would organize your files and directories in your repository in order to call your project/package/module a library (while package is basically a directory with a __init__.py and a module is a *.py file.)

But that term is widely used for modules and packages which provide a collection of features, functions, classes and so on for other python projects and applications. You would call them a library as they are not intended to be a stand-alone application.

E.g. gentoo's portage is a python application while urllib is a library. There are python packages where this not so clear, like nosetests - I implement some of their classes and methods as if it is a library but then I call nosetests from the command line as if it is a stand-alone application.

As @StefanPochmann pointed out, there is a thing called 'The Python Standard Library'.

Sign up to request clarification or add additional context in comments.

2 Comments

@StefanPochmann: Sorry, wrong term. See my edit, I hope I made myself clear now.
Yeah, I think now it's ok :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.