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

  • Thread starter Arkadiusz Miskiewicz
  • Start date
A

Arkadiusz Miskiewicz

Hi,

Simple code fails in python 2.3:

[root@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.Traceback (most recent call last):
File "<stdin>", line 1, in ?
IOError: [Errno 21] Is a directory


but works in 2.2
[arekm@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.
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.
 
K

Keith Jones

Well, open is just an alias for file, so my novice butt is guessing
bugfix.

And once you've opened it; it doesn't seem there's much you can do with it
anyway. (this is in 2.2)Traceback (most recent call last):
File "<pyshell#11>", line 1, in ?
x.readline()
IOError: [Errno 21] Is a directory


Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top