Quantcast

FW: [New-bugs-announce] [issue29294] ctypes.windll.LoadLibrary refuses unicode argument

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FW: [New-bugs-announce] [issue29294] ctypes.windll.LoadLibrary refuses unicode argument

Joseph Lee
Hi all,

If you are using Eurobraille or other Python modules where you need to use
Unicode in ctypes, the below bug report was just brought up:
http://bugs.python.org/issue29294
Cheers,
Joseph

-----Original Message-----
From: New-bugs-announce
[mailto:new-bugs-announce-bounces+joseph.lee22590=[hidden email]] On
Behalf Of Thomas Heller
Sent: Tuesday, January 17, 2017 1:13 AM
To: [hidden email]
Subject: [New-bugs-announce] [issue29294] ctypes.windll.LoadLibrary refuses
unicode argument


New submission from Thomas Heller:

ctypes.windll.LoadLibrary refuses unicode argument; this is a regression in
Python 2.7.13:

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32
bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for
more information.
>>> from ctypes import windll
>>> windll.LoadLibrary(u"kernel32.dll")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\ctypes\__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be string, not unicode
>>>

It did work in Python 2.7.12 and before:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32
bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for
more information.
>>> from ctypes import windll
>>> windll.LoadLibrary(u"kernel32")
<WinDLL 'kernel32', handle 77360000 at 3606f10>
>>>

----------
components: ctypes
messages: 285628
nosy: theller
priority: normal
severity: normal
status: open
title: ctypes.windll.LoadLibrary refuses unicode argument
versions: Python 2.7

_______________________________________
Python tracker <[hidden email]>
<http://bugs.python.org/issue29294>
_______________________________________
_______________________________________________
New-bugs-announce mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/new-bugs-announce


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nvda-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nvda-devel
Loading...