Beginner's guide to Python

S

Steve Hayes

Can anyone recommend a web site that gives a good beginner's guide to Python?

One that tells one, especially --

-- what kind of projects Python is good for
-- what kind of projects it is not good for
-- a simple explanation of how it works
-- a kind of beginner's tutotial and guide to its syntax

I've read about Python, and installed it on my computer when I found it on a
DVD that came with a magazine, but I haven't got a clue about how to use it.

So any advice on the best web sites for absolute novices would be welcome.
 
C

Chris Angelico

Can anyone recommend a web site that gives a good beginner's guide to Python?

One that tells one, especially --

-- what kind of projects Python is good for
-- what kind of projects it is not good for
-- a simple explanation of how it works
-- a kind of beginner's tutotial and guide to its syntax

I've read about Python, and installed it on my computer when I found it on a
DVD that came with a magazine, but I haven't got a clue about how to use it.

So any advice on the best web sites for absolute novices would be welcome.

I'd start with the standard docs tutorial:

http://docs.python.org/3/tutorial/

Which version of Python have you installed? You may want to consider,
if the DVD has an old version, getting the latest one off the web
site.

ChrisA
 
G

Grant Edwards

Can anyone recommend a web site that gives a good beginner's guide to Python?
http://www.greenteapress.com/thinkpython/

-- what kind of projects Python is good for

Text processing
Scientific data analysis and visualization
Database stuff
CRM
Web sites
Data communications
Games
System administration tools
-- what kind of projects it is not good for

OS kernels and device drivers
-- a simple explanation of how it works

That depends on what "it" is.
-- a kind of beginner's tutotial and guide to its syntax

Google "python tutorial"
 
S

Steve Hayes

Text processing
Scientific data analysis and visualization
Database stuff
CRM
Web sites
Data communications
Games
System administration tools


OS kernels and device drivers

Thanks very much for this, and to others who also replied.
 
D

Dennis Lee Bieber

Can anyone recommend a web site that gives a good beginner's guide to Python?

One that tells one, especially --

-- what kind of projects Python is good for

So far as I know, Python is "Turing-complete" -- it can be used for
anything...
-- what kind of projects it is not good for

.... anything that the implementation is not sufficient to support (a
web-server with few connections per second is probably fine; trying to run
Google search in pure Python, maybe not -- though lots of Google may use
Python)
-- a simple explanation of how it works

Python is a byte-code compiled/interpreted language in the most common
implementation -- without the overhead of having to first run the
compilation phase (a la Pascal P-code or Java); imported modules are
compiled the first time they are imported, thereafter the compiled file is
imported instead.
-- a kind of beginner's tutotial and guide to its syntax
Uhm... The Python Tutorial and Language Reference Manual -- included as
part of most all installation packages.
 
A

Andrew Berg

So far as I know, Python is "Turing-complete" -- it can be used for
anything...
So is Brainfuck, but I wouldn't say it's good for *any* project...
 
C

Chris Angelico

So is Brainfuck, but I wouldn't say it's good for *any* project...

There are always surprises. A few years ago (okay, a good few now) I
was gobsmacked to learn that JavaScript, which I'd always thought was
for web browsers only, could be used for writing web *servers*. And
the inverse is true, too - Pike, a language specifically designed for
building servers (specifically MUDs - plain text), has bindings for
GTK, so it can be used for writing graphical desktop applications.

But there are definite goals and philosophies that affect whether a
language is good for something or not. Python is extremely well suited
to short scripts that do one tiny thing and immediately shut down,
because it has an absolute minimum of boilerplate; other languages,
where you have to wrap your code up in "int main() { ... }" are less
suited to that. On the flip side, Python's object model tends to be
less well suited to massive scaling; I don't know about PyPy and other
Pythons, but certainly CPython isn't designed to run on arbitrary
numbers of cores (once you go to multiprocessing, you then need to
worry about IPC; if you work in a lower level language like C, you can
use threads and directly access each other's memory). "Everything is
permissible" - but not everything is constructive. [1] Sometimes
you're fighting the language rather than working with it.

ChrisA

[1] Did you know that the Corinthian church needed advice on
programming? First letter, tenth chapter, twenty-third verse.
 
S

Steven D'Aprano

...Python's object model tends to be less well suited to massive
scaling;

That's probably true.

I don't know about PyPy and other Pythons, but certainly
CPython isn't designed to run on arbitrary numbers of cores (once you go
to multiprocessing, you then need to worry about IPC; if you work in a
lower level language like C, you can use threads and directly access
each other's memory).

I think that's an exaggeration. CPython *is* designed to run on an
arbitrary number of cores, but you need to approach it via techniques
that you might not use in other languages.

It would only be valid to say that "CPython is not designed to use
multiple cores" if threads were the *only* valid way to use multiple
cores. "Use multiprocessing" is just as much a valid way to use multiple
cores as "use threads" might be in another language, and by some
accounts, better than threads.

Or you can use IronPython or Jython, neither of which have the GIL. Or
use Stackless:

http://entitycrisis.blogspot.com.au/2009/06/stackless-vs-gil-its-draw.html
 

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,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top