REPOST: Re: Newbie question

G. Willoughby sab at NOSPAM.freeuk.com
Wed Dec 26 20:24:16 EST 2001


Hi Peak Allan,
    I learned the basics by reading 'Learning Python' from O'reilly's, i
found it very helpful.   :)   I think perhaps it would help to have a little
experience in another language too. I am looking forward to reading 'Python
on win32' from the same publishers!   :)

G. Willoughby.

"Peak Allan" <apeak_2000 at yahoo.com> wrote in message
news:mailman.1009150409.8361.python-list at python.org...
> I copied this code from one of the tutorials on the
> python.org website, but when I tried to run it, I got
> an error.
>
> # Program FileTest
>
> out_file = open("test.txt", "w")
> out_file.write("This crap is going to out file\n")
> out_file.close()
>
> in_file = open("test.txt", "r")
> text = in_file.read()
> in_file.close()
> print text
>
> bash-2.05$ ./fileTest.py
> ./fileTest.py: line 3: syntax error near unexpected
> token `open("'
> ./fileTest.py: line 3: `out_file = open("test.txt",
> "w")'
>
> Can someone please tell me what I did wrong?
>
> Also, are the tutorials at python.org a good way to
> learn Python?  If not, are there any other good online resources?
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!news.maxwell.syr.edu!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: "G. Willoughby" <sab at NOSPAM.freeuk.com>
Newsgroups: comp.lang.python
Subject: cmsg cancel <a0dt8k$6if$1 at newsg1.svr.pol.co.uk>
Control: cancel <a0dt8k$6if$1 at newsg1.svr.pol.co.uk>
Date: Mon, 31 Dec 2001 01:35:25 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.a0dt8k$6if$1 at newsg1.svr.pol.co.uk>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009775996 27193 211.57.49.2 (31 Dec 2001 05:19:56 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:19:56 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list