Sorry for the errorneous quote-only response, gmail managed to send it
without me typing a thing.

On Fri, Aug 29, 2014 at 5:01 PM, Richard Dillon <dillo...@comcast.net> wrote:
>     infile = open(r'\OS\Users\richarddillon\Desktop\my_file','r')

On the Mac, you don’t need to specify a drive there; the main drive is just /.

Also, the path separator is a forward slash (/).  This also lets you
remove the r in front of the string, which is needed for backslashes
unless you escape them.  The corrected code is:

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

-- 
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to