[Tutor] Python 3.4.1 question for Mac users

Chris “Kwpolska” Warrick kwpolska at gmail.com
Fri Aug 29 20:06:47 CEST 2014


Please make sure to add tutor at python.org to the To: field so everyone gets
to read your answer.  Also, please don’t post in HTML.


On Fri, Aug 29, 2014 at 7:39 PM, Richard Dillon <dillonrw at comcast.net>
wrote:

> Still getting an error message.
>
>
>
It is trying to open a file named 'my_file' on your desktop, which does not
exist.  In this case, you want:

infile = open('/Users/richarddillon/Desktop/' + my_file, 'r')

This concatenates (puts together) the string with the path to your desktop
and the variable my_file.

Also, .rtf files are not going to work well with Python, you need a plain
text file (.txt).

-- 
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140829/b55ac72a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2014-08-29 at 10.37.02 AM.png
Type: image/png
Size: 184041 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140829/b55ac72a/attachment-0001.png>


More information about the Tutor mailing list