Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > close has no effect on Mac OSX Python 3.0

Reply
Thread Tools

close has no effect on Mac OSX Python 3.0

 
 
resi147
Guest
Posts: n/a
 
      12-08-2008
I'm wondering if it's really a bug since it's so trivial:

fp = open('/etc/services')
ct = fp.read(104
print(ct[-80:], end='')
fp.close()
ct = fp.read(17)
print(ct)

the second read should fail, but happily continues reading the file.
Really a bug?
As said in the subject, I use MacOSX 10.5.5 with Python 3.0,
officially released
these days.

Karl

 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      12-09-2008
En Mon, 08 Dec 2008 20:09:23 -0200, resi147 <(E-Mail Removed)> escribió:

> I'm wondering if it's really a bug since it's so trivial:
>
> fp = open('/etc/services')
> ct = fp.read(104
> print(ct[-80:], end='')
> fp.close()
> ct = fp.read(17)
> print(ct)
>
> the second read should fail, but happily continues reading the file.
> Really a bug?


Looks like a real bug to me. In fact it is already reported:
http://bugs.python.org/issue4604

--
Gabriel Genellina

 
Reply With Quote
 
 
 
 
resi147
Guest
Posts: n/a
 
      12-09-2008
On 9 Dez., 07:51, "Gabriel Genellina" <(E-Mail Removed)> wrote:
> En Mon, 08 Dec 2008 20:09:23 -0200, resi147 <(E-Mail Removed)> escribió:
>
> > I'm wondering if it's really a bug since it's so trivial:

>
> > fp = open('/etc/services')
> > ct = fp.read(104
> > print(ct[-80:], end='')
> > fp.close()
> > ct = fp.read(17)
> > print(ct)

>
> > the second read should fail, but happily continues reading the file.
> > Really a bug?

>
> Looks like a real bug to me. In fact it is already reported:http://bugs.python.org/issue4604
>
> --
> Gabriel Genellina



Thanks to Skip Montanaro, he did it (for me, thanks

Karl.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) Iñaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
python 2.3.4 installation as framework (Mac OSX): test failed Sven Hilmahr Python 0 09-23-2004 09:47 PM
Problem with Python on MAC OSX edadk Python 4 06-30-2004 08:11 AM
Playing a .wav file in MAC OSX with Python 2.2 without visuals. Christopher Mahan Python 1 11-16-2003 07:44 AM



Advertisments