confusion about opening files
robie at 1373.net
Mon Sep 23 22:49:17 EDT 2002
O. K. Now I am confused. I thought that when I imported the os module, i
would have to call its functions like this: os.open() Why am I just using
the function name?
"Erik Max Francis" <max at alcyone.com> wrote in message
news:3D8FCFF3.FD52AFE5 at alcyone.com...
> robie1373 wrote:
> > file = os.open("e:\\d12", "r")
> > TypeError: an integer is required
> > I get this error if the mode is r, r+, a+ or whatever. I also get it
> > whether the file exists or not. Can someone explain what I am doing
> > wrong?
> You meant open, not os.open.
> Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
> __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
> / \ Insight -- the titillating knack for hurting!
> \__/ Colette
> Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
> A highly categorized list of Web links.
More information about the Python-list