[Tutor] Re:Where to find example source codes.

Deirdre Saoirse deirdre@deirdre.net
Tue, 2 Jan 2001 13:32:21 -0800 (PST)


On Tue, 2 Jan 2001, cruciatuz wrote:

> Hello tutor-request,

tutor@python.org is the list address. Thus, I've changed it. Tutor-request
is an address for requesting subscription changes.

>   1. print something to stdout

print "foo"
(goes to stdout by default)

>   1.1 format this output

you can use c-like formatting. You can also see the strings module for
some formatting (such as strings.zfill)

See also: 
http://www.python.org/doc/current/tut/node9.html#SECTION009100000000000000000

>   2. open a file

f = open('filename', 'r')

See the same URL above for file info.

>   I don't remember where i found this file and i
>   already deleted it since it was for java
>   programmers and i am not a java programmer (was
>   not the right language for me). but it was a
>   bigger help for me than the very technical and
>   indirect official java-tutorial. a single
>   question which is answered with a few lines of
>   example code and a short explanation is better than
>   a whole technically chapter in a bloated book :)
> 
>   let's set up something like that at python.org
>   or somewhere else, that would be great!

There's already a tutorial at python.org, but if you want to write another
with a specific format, you're welcome to. :)

-- 
_Deirdre      *      http://www.sfknit.org      *      http://www.deirdre.net 
"We have an open door policy." -- Sheridan
"And an open airlock policy." -- Ivanova