> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Reedick, Andrew
> Sent: Thursday, May 15, 2008 12:11 PM
> To: globalrev; python-list@python.org
> Subject: RE: exists=false, but no complaint when i open it!?
> 
> >
> > print os.path.exists('C:\Users\saftarn\Desktop\NetFlixDataSet
> > \trainingsetunzipped\training_set\mv_0000001.txt')
> >
> 
> 
> You're falling victim to string interpolation because of the
> backslashes.  (\n == newline, \N == N).
> 
> Try using a raw string r'filename', instead of 'filename':
>       print
>
os.path.exists(r'C:\Users\saftarn\Desktop\NetFlixDataSet\trainingsetunz
> i
> pped\training_set\mv_0000001.txt')
> 
> 

Specificially, the \t in '\trainingsetunzipped' and in '\training_set'
were being treated as tab characters.  Ignore my comment about '\N ==
N'.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to