[Chicago] Got it Re: opening a file for read in 3.2

Randall Baxley rlbax777 at swbell.net
Wed Oct 31 22:53:53 CET 2012


Answer if you want though I got going again.  For some reason .txt did not get appended to the file name.
Randy
--- On Wed, 10/31/12, Randall Baxley <rlbax777 at swbell.net> wrote:

From: Randall Baxley <rlbax777 at swbell.net>
Subject: [Chicago] opening a file for read in 3.2
To: "The Chicago Python Users Group" <chicago at python.org>
Date: Wednesday, October 31, 2012, 4:22 PM


Perhaps someone here can help me.  I had worked through the pythonlearn.com exercises and was able to open and work with files in 2.7 by having the file in the same directory as I opened Python.
This does not seem to be working in 3.2 for the course I am taking in Coursera from the U of Toronto.
>>> FF = "C:\Python32\FF.txt" >>> ff = open(FF, 'r') Traceback (most recent call last): File "<pyshell#74>", line 1, in <module> ff = open(FF, 'r') IOError: [Errno 2] No such file or directory: 'C:\Python32\FF.txt'Where am I going wrong here? Is there a more complete path in Windows that I am not seeing? In a new window I can open this file for editing so I know it is there.Thank you,Randy

-----Inline Attachment Follows-----

_______________________________________________
Chicago mailing list
Chicago at python.org
http://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20121031/90c07634/attachment.html>


More information about the Chicago mailing list