[Tutor] Files and file attributes

Remco Gerlich scarblac@pino.selwerd.nl
Thu, 22 Feb 2001 11:33:09 +0100


On Wed, Feb 21, 2001 at 09:44:20PM -0600, Chris Watson wrote:
> > Another problem I am having is trying  to open files in other directories.  For example,
> >  
> >    f=open('C:\tmp\testfile','r+') just doesn't work for me.
> 
> 	ACK! First try using a mailer that word wraps at 80 lines :-)
> 
> Try using f = open("C:\tmp\testfile", "r")
> 
> Give that a shot. That should fix you right up. I get confused sometimes
> between '' and "" for things as well. :-)

In Python, there is no difference between '' and "" strings except that you
have to escape ' in the first and " in the latter.

Confused with other languages? :)

-- 
Remco Gerlich