Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43152 > unrolled thread

Python module vs library

Started byk.lykourgos@gmail.com
First post2013-04-09 02:58 -0700
Last post2013-04-09 09:08 -0600
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  Python module vs library k.lykourgos@gmail.com - 2013-04-09 02:58 -0700
    Re: Python module vs library Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-09 10:02 -0400
    Re: Python module vs library Michael Torrie <torriem@gmail.com> - 2013-04-09 08:18 -0600
      Re: Python module vs library rusi <rustompmody@gmail.com> - 2013-04-09 07:29 -0700
        Re: Python module vs library Michael Torrie <torriem@gmail.com> - 2013-04-09 09:08 -0600

#43152 — Python module vs library

Fromk.lykourgos@gmail.com
Date2013-04-09 02:58 -0700
SubjectPython module vs library
Message-ID<03ee1902-ac8a-4d1f-9f2b-8e796fcccfe8@googlegroups.com>
Hi, what is the difference between python module and library ?

[toc] | [next] | [standalone]


#43172

FromTerry Jan Reedy <tjreedy@udel.edu>
Date2013-04-09 10:02 -0400
Message-ID<mailman.347.1365516135.3114.python-list@python.org>
In reply to#43152
On 4/9/2013 5:58 AM, k.lykourgos@gmail.com wrote:
> Hi, what is the difference between python module and library ?

They are in different categories. A Python module is a namespace (a 
mapping of names to objects) created by running Python code as a main 
module or by import statements within Python code (or by executing 
import functions within a Python interpreter). A library in general is a 
collection of functions and classes used by multiple applications. A 
Python library is composed of Python modules, packages, and collections 
of such.

[toc] | [prev] | [next] | [standalone]


#43175

FromMichael Torrie <torriem@gmail.com>
Date2013-04-09 08:18 -0600
Message-ID<mailman.350.1365517106.3114.python-list@python.org>
In reply to#43152
On 04/09/2013 03:58 AM, k.lykourgos@gmail.com wrote:
> Hi, what is the difference between python module and library ?

"library" doesn't really mean anything specifically to Python's
interpreter.  It's not a valid keyword and is only used by humans to
describe the abstract function and nature of a bunch of arbitrary Python
code, usually in a module or library.

Python does have a concept of modules and packages.  Both serve the same
purpose, which is to bring together a collection of attributes into a
namespace that can be imported into the current namespace (IE a library!).

[toc] | [prev] | [next] | [standalone]


#43177

Fromrusi <rustompmody@gmail.com>
Date2013-04-09 07:29 -0700
Message-ID<4963dfe6-4fa1-444e-b703-5d6e05a942f7@ul7g2000pbc.googlegroups.com>
In reply to#43175
On Apr 9, 7:18 pm, Michael Torrie <torr...@gmail.com> wrote:
> On 04/09/2013 03:58 AM, k.lykour...@gmail.com wrote:
>
> > Hi, what is the difference between python module and library ?
>
> "library" doesn't really mean anything specifically to Python's
> interpreter.  It's not a valid keyword and is only used by humans to
> describe the abstract function and nature of a bunch of arbitrary Python
> code, usually in a module or library.

I guess Michael meant "...module or package."
Else the next question is going to be "Can you explain recursion in
python?" :-)


>
> Python does have a concept of modules and packages.  Both serve the same
> purpose, which is to bring together a collection of attributes into a
> namespace that can be imported into the current namespace (IE a library!).

[toc] | [prev] | [next] | [standalone]


#43182

FromMichael Torrie <torriem@gmail.com>
Date2013-04-09 09:08 -0600
Message-ID<mailman.354.1365520122.3114.python-list@python.org>
In reply to#43177
On 04/09/2013 08:29 AM, rusi wrote:
> I guess Michael meant "...module or package."
> Else the next question is going to be "Can you explain recursion in
> python?" :-)

You're right.  On both counts. :)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web