explainations about standard library and modules in Python.

H

Hung ho

Hi.
I just finished reading an introductory Python book called "Python Programming for the absolute beginner" by Michael Dawson. I found it very interesting, and easy to follow. Python does really look similar to C/C++ and Java. In the book, the author imported other modules that were from the standard library of Python. I tried reading some of the modules in the standard library in Python's Lib folder. I'm just a beginner to Python, and didn't understand anything in any of the modules.
My question is that, can anyone recommend me any book, or online materials that could explain what the functions some of the modules in the standard library can do that are packaged along with Python v. 2.3.4?. For example, I read some modules such as os.py, sys.py, and random.py The documents in those modules didn't help me to comprehend what the purpose of the modules, and how to use them in Python. What are their functions, and how do I use them.
Thank You.
 
P

Peter Hansen

Hung said:
My question is that, can anyone recommend me any book, or online materials that
> could explain what the functions some of the modules in the standard
> library can do that are packaged along with Python v. 2.3.4?. For
> example, I read some modules such as os.py, sys.py, and random.py
> The documents in those modules didn't help me to comprehend what
> the purpose of the modules, and how to use them in Python.

No beginner is expected to read the source code itself to figure
things out. Go to the online documentation at http://docs.python.org
and browse through it. Make sure you read the tutorial, but if
you have questions about specific modules, go to the Global Module
Index.

For example, read the first sentence of each of these two learn the
purpose of the modules you mentioned:

http://docs.python.org/lib/module-sys.html
http://docs.python.org/lib/module-os.html
http://docs.python.org/lib/module-random.html

-Peter
 
T

Trent Mick

[Hung ho wrote]
My question is that, can anyone recommend me any book, or online
materials that could explain what the functions some of the modules in
the standard library can do that are packaged along with Python v.
2.3.4?. For example, I read some modules such as os.py, sys.py, and
random.py The documents in those modules didn't help me to comprehend
what the purpose of the modules, and how to use them in Python. What
are their functions, and how do I use them. Thank You.

http://docs.python.org/lib/lib.html

Specifically:
http://docs.python.org/lib/module-os.html
http://docs.python.org/lib/module-sys.html
http://docs.python.org/lib/module-random.html

Cheers,
Trent
 
C

Colin J. Williams

Hung said:
Hi.
I just finished reading an introductory Python book called "Python Programming for the absolute beginner" by Michael Dawson. I found it very interesting, and easy to follow. Python does really look similar to C/C++ and Java. In the book, the author imported other modules that were from the standard library of Python. I tried reading some of the modules in the standard library in Python's Lib folder. I'm just a beginner to Python, and didn't understand anything in any of the modules.
My question is that, can anyone recommend me any book, or online materials that could explain what the functions some of the modules in the standard library can do that are packaged along with Python v. 2.3.4?. For example, I read some modules such as os.py, sys.py, and random.py The documents in those modules didn't help me to comprehend what the purpose of the modules, and how to use them in Python. What are their functions, and how do I use them.
Thank You.

For someone who has previous programming experience, Alex Martelli's
Python in a Nutshell is an excellent reference.

Colin W.
 
P

Porky Pig Jr

Hung ho said:
My question is that, can anyone recommend me any book, or online
materials that could explain what the functions some of the modules in
the standard library can do that are packaged along with Python v.
2.3.4?. For example, I read some modules such as os.py, sys.py, and
random.py The documents in those modules didn't help me to comprehend
what the purpose of the modules, and how to use them in Python. What are
their functions, and how do I use them.
Thank You.

Python in a Nutshell has a nice concise converage of key functions of
a built-in modules including both os.py and sys.py. 'Programming
Python' goes into greater details, gives lots of coding examples.

I agree on-line information you can retrieve with 'help' can be rather
confusing. Doing something like

help(random)

got me lost in the forest, not seeing the trees. Once again, Python in
a Nutshell has a nice page on random module with a list and short
explanation of key functions. Granted, it mostly duplicates the staff
from help(random), but it lists only those you really need to know to
start using random.
 
B

Brian van den Broek

Hung ho said unto the world upon 2004-09-02 14:44:
Hi. I just finished reading an introductory Python book called "Python
Programming for the absolute beginner" by Michael Dawson. I found it
very interesting, and easy to follow. Python does really look similar
to C/C++ and Java. In the book, the author imported other modules that
were from the standard library of Python. I tried reading some of the
modules in the standard library in Python's Lib folder. I'm just a
beginner to Python, and didn't understand anything in any of the
modules. My question is that, can anyone recommend me any book, or
online materials that could explain what the functions some of the
modules in the standard library can do that are packaged along with
Python v. 2.3.4?. For example, I read some modules such as os.py,
sys.py, and random.py The documents in those modules didn't help me to
comprehend what the purpose of the modules, and how to use them in
Python. What are their functions, and how do I use them. Thank You.

Hi,

I am a relative newcomer to Python and programming both.

You've already been pointed to Python in a Nutshell. I'll add my voice to
that.

I'd also suggest The Python Standard library by Lundh. There is an
O'Reilly dead-tree <http://www.oreilly.com/catalog/pythonsl/> and a free
version at <http://effbot.org/zone/librarybook-index.htm>. It is a bit out
of date (IIRC it is geared to Python 2.0), but it has been helpful to me
nevertheless.

Between the docs, the Nutshell book and the Lundh, the helpful people on
the tutor list have been spared many posts from me ;-)

Best,

Brian vdB
 
A

Alex Martelli

materials that could explain what the functions some of the modules in
the standard library can do that are packaged along with Python v.
2.3.4?. For
...
For someone who has previous programming experience, Alex Martelli's
Python in a Nutshell is an excellent reference.

Thanks Colin, your usual agent's fee will be forthcoming of course (now
wouldn't be funny if I mistakenly posted this to the whole list instead
of privately to you, ha ha, no chance of course I'd so such a mistake!).


Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top