open('.', 'rb') on python 2.3

Arkadiusz Miskiewicz arekm at pld-linux.org
Mon Aug 4 21:46:57 CEST 2003


Hi,

Simple code fails in python 2.3:

[root at maja rdiff-backup]# python
Python 2.3 (#1, Jul 31 2003, 10:41:08)
[GCC 3.3 (PLD Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> fp = open('.', 'rb')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IOError: [Errno 21] Is a directory


but works in 2.2
[arekm at perfo arekm]$ python
Python 2.2.2 (#1, Dec 28 2002, 23:32:35)
[GCC 2.95.4 20010319 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> fp = open('.', 'rb')
>>>

Is that bug, bugfix, change in python 2.3? (patch of course welcome)

System is Linux 2.4.21, glibc 2.3.2, filesystem ext3, xfs.

-- 
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekmatssedotpl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux





More information about the Python-list mailing list