[IPython-dev] IPython help systems fails with 0.7.1 under windows
Fernando Perez
Fernando.Perez at colorado.edu
Wed Jan 25 02:37:35 EST 2006
Vivian De Smedt wrote:
> Dear All,
>
> This is a bug report. I just download the last IPython version 0.7.1.
>
> C:\Documents and
> Settings\vds.AISYSTEMS\Desktop\ipython-0.7.1\IPython\winconsole.py in
> get_console_size(defaultx, defaul
> ty)
> 33
> 34 h = ctypes.windll.kernel32.GetStdHandle(-11)
> ---> 35 csbi = ctypes.create_string_buffer(22)
> 36 res = ctypes.windll.kernel32.GetConsoleScreenBufferInfo(h, csbi)
> 37
>
> AttributeError: 'module' object has no attribute 'create_string_buffer'
What version of ctypes are you running? I can't test this code (win32), but I
just downloaded ctypes current (0.9.6), and a quick grep does show that
function in a LOT of places:
abdul[ctypes-0.9.6]> egrep -rn create_string_buffer *
ctypes/__init__.py:43:def create_string_buffer(init, size=None):
ctypes/__init__.py:44: """create_string_buffer(aString) -> character array
ctypes/__init__.py:45: create_string_buffer(anInteger) -> character array
ctypes/__init__.py:46: create_string_buffer(aString, anInteger) ->
character array
ctypes/__init__.py:62:## "deprecated, use create_string_buffer instead"
ctypes/__init__.py:64:## warnings.warn("c_buffer is deprecated, use
create_string_buffer instead",
ctypes/__init__.py:66: return create_string_buffer(init, size)
ctypes/decorators.py:13:... buf = create_string_buffer(256)
docs/tutorial.stx:232: blocks, ctypes has a 'create_string_buffer' function
which creates these in
docs/tutorial.stx:238: >>> p = create_string_buffer(3) # create a 3
byte buffer, initialized to NUL bytes
docs/tutorial.stx:241: >>> p = create_string_buffer("Hello") #
create a buffer containing a NUL terminated string
docs/tutorial.stx:246: >>> p = create_string_buffer("Hello", 10) #
create a 10 byte buffer
docs/tutorial.stx:254: The 'create_string_buffer' function replaces the
'c_buffer'
docs/tutorial.stx:454: >>> s = create_string_buffer('\000' * 32)
NEWS.txt:30: Both create_string_buffer and create_unicode_buffer can now be
unittests/test_unicode.py:102: buf =
ctypes.create_string_buffer(u"abc")
unittests/test_unicode.py:106: buf =
ctypes.create_string_buffer(u"ab�")
unittests/test_unicode.py:110: buf =
ctypes.create_string_buffer(u"ab�")
unittests/test_memfunctions.py:6: a = create_string_buffer(32)
unittests/test_memfunctions.py:16: a = create_string_buffer(32)
unittests/test_buffers.py:7: b = create_string_buffer(32)
unittests/test_buffers.py:12: b = create_string_buffer("abc")
unittests/test_buffers.py:20: b = create_string_buffer(u"abc")
Perhaps you could try updating ctypes, and seeing what happens.
f
More information about the IPython-dev
mailing list