[issue10144] Buffering bug after calling curses function

2010-10-18 Thread Wes McKinney

New submission from Wes McKinney wesmck...@gmail.com:

We tracked a bug originating in IPython to the Python interpreter itself, seems 
to be present in 2.6.x and 2.7.x but not 3.1.x. This is on Ubuntu Linux 10.04, 
does not seem to occur in OS X 10.6.

Reference: http://article.gmane.org/gmane.comp.python.ipython.user/5336

 cat bufferbug.py
Strange bug in buffering of sys.stdout after calling curses functions.

import time
import curses

def bug():
   curses.initscr()
   curses.endwin()

def f(n=2):
   s = 0.75
   for i in range(n):
   print i
   time.sleep(s)
   print i+1

if __name__ == '__main__':
   f()
   print 'Calling bug() now!'
   bug()
   f()



--
components: Interpreter Core
messages: 119115
nosy: Wes.McKinney
priority: normal
severity: normal
status: open
title: Buffering bug after calling curses function
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10144
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: socket.MSG_WAITALL flag broken on Windows XP in Python 2.5.4?

2009-09-16 Thread Wes McKinney
On Sep 16, 3:53 pm, Irmen de Jong irmen.nos...@xs4all.nl wrote:
 Tim Roberts wrote:
  Wes McKinney wesmck...@gmail.com wrote:
  I noticed the flag socket.MSG_WAITALL seems to have crept its way into
  Python 2.5 on Windows (it's in 2.5.4, but not in 2.5.1, not sure about
  intermediate releases). I do not think Windows supports it. It seems
  to cause some problems in some libraries (like Pyro) that use it if
  it's available in the socket module.

  Does anyone know more about this?

  MSG_WAITALL is supported, starting with Windows Server 2003.

  It's a tough situation.  Ideally, you'd want socket to remove that symbol
  on the systems where it's not supported, but that's asking a lot.

 My installation doesn't have _socket.MSG_WAITALL, Wes, I wonder where yours 
 is coming from?
 (Python 2.5.4 and 2.5.2, on Windows XP.  On my Mac (OS X) it does have the 
 flag, and
 it's working fine there.).

 --irmen

I am running what is apparently a custom Python 2.5.4 (part of the
Enthought Python Distribution) which should be identical to the one on
python.org, but is not. I contacted Enthought about the issue-- it can
be worked around in the Pyro configuration for the time being.

Thanks a lot for the debugging help,
Wes
-- 
http://mail.python.org/mailman/listinfo/python-list


socket.MSG_WAITALL flag broken on Windows XP in Python 2.5.4?

2009-09-15 Thread Wes McKinney
I noticed the flag socket.MSG_WAITALL seems to have crept its way into
Python 2.5 on Windows (it's in 2.5.4, but not in 2.5.1, not sure about
intermediate releases). I do not think Windows supports it. It seems
to cause some problems in some libraries (like Pyro) that use it if
it's available in the socket module.

Does anyone know more about this?

Thanks,
Wes
-- 
http://mail.python.org/mailman/listinfo/python-list