[issue20899] Nested namespace imports do not work inside zip archives

2020-03-24 Thread Thomas Heller
Change by Thomas Heller : -- nosy: -theller ___ Python tracker <https://bugs.python.org/issue20899> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32745] ctypes string pointer fields should accept embedded null characters

2018-02-01 Thread Thomas Heller
New submission from Thomas Heller <thel...@ctypes.org>: ctypes Structure fields of type c_char_p or c_wchar_p used to accept strings with embedded null characters. I noticed that Python 3.6.4 does refuse them. It seems this has been changed in recent version(s). There ARE use

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29294> ___ _

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
Thomas Heller added the comment: Yes, seems that it is fixed in the repository. So I have to use 2.7.12 or wait for 2.7.14. Thanks! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29294] ctypes.windll.LoadLibrary refuses unicode argument

2017-01-17 Thread Thomas Heller
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

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
Thomas Heller added the comment: Thanks Martin and eryk for correcting me and finding the real cause of the problem. Am 21.12.2016 um 13:04 schrieb eryk sun: > ... the private names _COORD, _FILETIME, _LARGE_INTEGER, > _POINTL, _RECTL, _SMALL_RECT, and _ULARGE_INTEGER are skipped by a

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
New submission from Thomas Heller: The documentation states that 'from module import *' imports all symbols that are listed in the module's __all__ list. In Python 3, unlike Python 2, only symbols that do NOT start with an underscore are actually imported. The following code works in Python

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- nosy: +theller ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26137> ___ __

[issue27417] Call CoInitializeEx on startup

2016-07-01 Thread Thomas Heller
Changes by Thomas Heller <thel...@ctypes.org>: -- nosy: +theller ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27417> ___ __

[issue20899] Nested namespace imports do not work inside zip archives

2014-11-26 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20899 ___ ___ Python-bugs-list

py2exe 0.9.2.2 released

2014-10-21 Thread Thomas Heller
py2exe version 0.9.2.2 released === `py2exe` is a distutils extension which allows to build standalone Windows executable programs (32-bit and 64-bit) from Python scripts; Python 3.3 and later are supported. It can build console executables, windows (GUI)

Re: very lightweight gui for win32 + python 3.4

2014-09-13 Thread Thomas Heller
Am 13.09.2014 03:19, schrieb Grant Edwards: On 2014-09-12, Thomas Heller thel...@ctypes.org wrote: Am 12.09.2014 18:38, schrieb Chris Angelico: Does Tkinter really work well with cx_Freeze? I doubt it (from my experiences with py2exe). I never had any problems with Tkinter and py2exe

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Thomas Heller
Am 12.09.2014 18:38, schrieb Chris Angelico: On Sat, Sep 13, 2014 at 2:35 AM, Nagy László Zsolt gand...@shopzeus.com wrote: So I need to create a GUI mode version of my program. That the customer should be able to see a progress bar. What kind of GUI toolkit should I use for this? I would like

Re: Distributing python applications as a zip file

2014-07-23 Thread Thomas Heller
Am 23.07.2014 06:23, schrieb Steven D'Aprano: A little known feature of Python: you can wrap your Python application in a zip file and distribute it as a single file. The trick to make it runnable is to put your main function inside a file called __main__.py inside the zip file. Look here:

Re: comtypes

2014-06-21 Thread Thomas Heller
Am 21.06.2014 09:08, schrieb peter.balazo...@emspin.com: Dears, I am not sure I am at right place here. Now I've started working with comtypes 1.1.0 package within python 2.7.6.1. I have ActiveX COM object I want access and work with it. I do following from comtypes.client import

[issue5950] Make zipimport work with zipfile containing comments

2014-05-28 Thread Thomas Heller
Thomas Heller added the comment: As for progress, the answer is no as the hope is to eventually replace zipimport with something in pure Python thanks to importlib. Does this mean there is no chance to put this into 3.4 and 3.3, do we really have to wait until 3.5 with it's pure-python

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-17 Thread Thomas Heller
Thomas Heller added the comment: When you say os.path.isdir(...) works fine, you mean it's returning False? As shown in the original report (http://bugs.python.org/issue21516#msg218664) os.path.isdir() returns True; which is correct since c:\Users\admin is a directory on my machine

[issue21516] pathlib.Path(...).is_dir() crashes on readonly directories (Windows)

2014-05-16 Thread Thomas Heller
New submission from Thomas Heller: On Windows, pathlib.Path(...).is_dir() crashes on readonly directories while os.path.isdir(...) works fine. Example on Windows7: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:24:06) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits

[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2014-05-16 Thread Thomas Heller
Thomas Heller added the comment: Well, not 'readonly' directories but directories where the user has no access rights. I corrected the title of this bug. -- title: pathlib.Path(...).is_dir() crashes on readonly directories (Windows) - pathlib.Path(...).is_dir() crashes on some

py2exe for Python 3 released

2014-05-13 Thread Thomas Heller
Finally there is py2exe for Python3! `py2exe` is a distutils extension which allows to build standalone Windows executable programs (32-bit and 64-bit) from Python scripts; Python 3.3 and later are supported. It can build console executables, windows (GUI) executables, windows services, and

[issue21130] equivalent functools.partial instances should compare equal

2014-04-04 Thread Thomas Heller
Thomas Heller added the comment: My usecase is: I create kind of bound methods with functools.partial. Apologies for the confusion by using the word 'equivalent'; what I mean is that partial instances should (IMO) compare equal when they contain the same function and args/keywords which

[issue21157] Update imp docs for a PEP 451 world

2014-04-04 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21157 ___ ___ Python-bugs-list

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
New submission from Thomas Heller: I think that 'equivalent' functools.partial objects should compare equal, so the following snippet SHOULD print True: import functools f = lambda x: x a = functools.partial(f, 42) b = functools.partial(f, 42) a == b False -- components: Library

[issue21130] equivalent functools.partial instances should compare equal

2014-04-02 Thread Thomas Heller
Thomas Heller added the comment: Sure. I'm not sure 'equivalent' is the word I should have used. I suggest (and I would have expected) that partial instances (a, b) should compare equal when a.func == b.func \ and a.args == b.args \ and a.keywords == b.keywords

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Thomas Heller
New submission from Thomas Heller: With python 3.4 and pywin32 version 218 it is only possible to import win32com or win32api when pywintypes has been imported before. Here is part of a session with 'python -v': import win32api Traceback (most recent call last): File stdin, line 1

[issue21050] Failure to import win32api (from pywin32)

2014-03-24 Thread Thomas Heller
Thomas Heller added the comment: It was most certainly an issue on my side, something with leftover files or directories from a previous installation. After cleaning everything up it works now. Sorry for the confusion. (A personal remark: sometimes, the bdist_wininst uninstaller does

Re: Best practices to overcome python's dynamic data type nature

2014-02-14 Thread Thomas Heller
Am 14.02.2014 17:32, schrieb Ethan Furman: On 02/14/2014 08:10 AM, Sam wrote: Dynamic data type has pros and cons. It is easier to program but also easier to create bugs. What are the best practices to reduce bugs caused by Python's dynamic data-type characteristic? Can the experienced

[issue16296] Patch to fix building on Win32/64 under VS 2010

2014-02-04 Thread Thomas Heller
Thomas Heller added the comment: Hm, what's the problem? For me, the patch applies cleanly (in Python 3.4.0b3, 32-bit and 64-bit on Windows), and py -3.4(-32) -m pip install numpy works correctly. At least py -3.4(-32) -c import numpy; print(numpy.__version__) prints 1.8.0

[issue17633] zipimport's handling of namespace packages is incorrect

2014-01-31 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17633 ___ ___ Python-bugs-list

[issue20391] windows python launcher should support explicit 64-bit version

2014-01-25 Thread Thomas Heller
New submission from Thomas Heller: The windows python launcher supports the '-3.3' resp. '-3.3-32' command line switches to ask for 'the best 3.3' version resp. 'the 32-bit 3.3' version, but does not support a '-3.3-64' switch to explicitely request the 64-bit version of Python. I suggest

[issue20020] modernize the modulefinder module

2013-12-19 Thread Thomas Heller
Thomas Heller added the comment: I have written a new modulefinder based on importlib. It is not a refactoring of the old one, so it is no plug-in replacement. Instead it has some new features: - Better logging output - collects dependencies (self._depgraph maps module names to callers

Re: Packaging a private project

2013-12-17 Thread Thomas Heller
Am 16.12.2013 12:18, schrieb Nicholas Cole: Dear List, What is the best way to distribute a private, pure python, Python 3 project that needs several modules (some available on pypi but some private and used by several separate projects) in order to run? I'd like to include everything that my

Terry Jones: Monty Python to reunite for stage show

2013-11-19 Thread Thomas Heller
All of the surviving members of comedy group Monty Python are to reform for a stage show, one of the Pythons, Terry Jones, has confirmed. See: http://www.bbc.co.uk/news/entertainment-arts-24999401 Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get raw bytes for ctypes functions that return c_wchar_p

2013-11-19 Thread Thomas Heller
Am 19.11.2013 17:58, schrieb Mark Summerfield: Hi, I am using ctypes to access a function in a DLL using Python 3.3 32-bit on Windows 7 64-bit: dplGetPageText = dpl.DPLGetPageText dplGetPageText.argtypes = (ctypes.c_int, ctypes.c_int) dplGetPageText.restype = ctypes.c_wchar_p Python returns

[issue19538] Changed function prototypes in the PEP 384 stable ABI

2013-11-09 Thread Thomas Heller
New submission from Thomas Heller: (As requested by email in python-dev I'm reporting this problem) Some function prototypes in the stable ABI have been changed between Python 3.3 and 3.4. PyObject_CallFunction is an example, the second parameter has been changed from 'char *' to 'const char

[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18986 ___ ___ Python-bugs-list

[issue18852] site.py does not handle readline.__doc__ being None

2013-09-06 Thread Thomas Heller
Thomas Heller added the comment: I suggest to remove the comment part from the patch and then apply it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18852

[issue18852] Problem with pyreadline

2013-08-27 Thread Thomas Heller
New submission from Thomas Heller: In site.py, line 477, I find this code: # Reading the initialization (config) file may not be enough to set a # completion key, so we set one first and then read the file if 'libedit' in getattr(readline, '__doc__

[issue15767] add ModuleNotFoundError

2013-07-02 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15767 ___ ___ Python-bugs-list

Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. When I do this, I get a metaclass conflict: class MyEnum(ctypes.c_int, enum.Enum): ...FOOBAR = 0 ... Traceback

Re: Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
Am 28.06.2013 17:16, schrieb Ethan Furman: On 06/28/2013 03:48 AM, Thomas Heller wrote: trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. Have you tried using

Re: Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
Am 28.06.2013 17:25, schrieb Thomas Heller: Robert Kern: enum.EnumMeta uses super() in its __new__() implementation but _ctypes.PyCSimpleType doesn't. Thus, only _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the order of the two might work. Robert found the problem

[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Thomas Heller
Thomas Heller added the comment: Brett, can these changes be merged into 3.3 also? -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18058

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-08 Thread Thomas Heller
Thomas Heller added the comment: The modulefinder usage is directly exposed in its API as the return value of a find_module method, which makes removal a pain. Adding Thomas Heller to see what he has to say. Some months ago, I have started to implement a brand-new modulefinder, which

[issue17623] Typo in Doc/whatsnew/3.3.rst

2013-04-03 Thread Thomas Heller
New submission from Thomas Heller: Typo: trucate instead of truncate -- assignee: docs@python components: Documentation files: work.patch keywords: patch messages: 185901 nosy: docs@python, theller priority: normal severity: normal status: open title: Typo in Doc/whatsnew/3.3.rst Added

Unicode

2013-03-15 Thread Thomas Heller
I thought I understand unicode (somewhat, at least), but this seems not to be the case. I expected the following code to print 'µm' two times to the console: code # -*- coding: cp850 -*- a = uµm b = u\u03bcm print(a) print(b) /code But what I get is this: output µm Traceback (most recent

Re: Unicode

2013-03-15 Thread Thomas Heller
Am 15.03.2013 11:58, schrieb Steven D'Aprano: On Fri, 15 Mar 2013 11:46:36 +0100, Thomas Heller wrote: [Windows: Problems with unicode output to console] You can isolate the error by noting that the second one only raises an exception when you try to print it. That suggests that the problem

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Thomas Heller
Thomas Heller added the comment: Patch looks good. Please apply. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17378 ___ ___ Python-bugs-list

Re: A new webpage promoting Compiler technology for CPython

2013-02-17 Thread Thomas Heller
Am 15.02.2013 08:11, schrieb Travis Oliphant: Hey all, With Numba and Blaze we have been doing a lot of work on what essentially is compiler technology and realizing more and more that we are treading on ground that has been plowed before with many other projects. So, we wanted to create a

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: I have only tried my code with 3.4; but still get problems with the modules 'builtins' and '_frozenimportlib'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: I confirm that the bug is fixed, my test-code works now (a modulefinder using importlib instead of imp to find modules). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098

[issue17098] Set __loader__ on modules imported by the C level

2013-02-01 Thread Thomas Heller
Thomas Heller added the comment: Thanks for the very fast fix Brett :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17098 ___ ___ Python-bugs

Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Thomas Heller
Has someone managed to patch python-mode.el to use the PEP 397 python launcher when you hit C-c C-c? It seems that emacs should parse the shebang line in the edited python script and pass the corresponding arguments to py.exe. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Thomas Heller
Am 31.01.2013 12:05, schrieb Andreas Röhler: Am 31.01.2013 10:03, schrieb Thomas Heller: Has someone managed to patch python-mode.el to use the PEP 397 python launcher when you hit C-c C-c? It seems that emacs should parse the shebang line in the edited python script and pass the corresponding

[issue17028] launcher does not read shebang line when arguments are given

2013-01-29 Thread Thomas Heller
Thomas Heller added the comment: Hope it is ok to assign this to you, vinay. -- assignee: - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17028

[issue17028] launcher

2013-01-25 Thread Thomas Heller
New submission from Thomas Heller: The python launcher does not parse the shebang if arguments for the Python interpreter are given on the command line. For example: py.exe test.py # uses shebang line py.exe -u test.py # does NOT use shebang line The attached patch fixes

[issue17028] launcher does not read shebang line when arguments are given

2013-01-25 Thread Thomas Heller
Changes by Thomas Heller thel...@ctypes.org: -- title: launcher - launcher does not read shebang line when arguments are given ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17028

Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Thomas Heller
Am 24.01.2013 16:54, schrieb rusi: [I personally use emacs. It would be sadistic to make that into a recommendation] It would be truly sadistic to force a long-time emacs user to any other editor. Thomas -- http://mail.python.org/mailman/listinfo/python-list

[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Thomas Heller
New submission from Thomas Heller: It seems the statement import importlib is missing in 3.3's modulefinder.py -- components: Library (Lib) messages: 177951 nosy: theller priority: normal severity: normal status: open title: Missing import in modulefinder.py versions: Python 3.3

[issue15459] ctypes Structures with subclassed types in the _fields_ list

2012-07-26 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: When a ctypes Structure uses a subclass of c_int, c_short, c_byte in the _fields_ list to define bitfields, the results are wrong. The attached script showbug.py demonstrates this behaviour. -- components: ctypes files: showbug.py

[issue15459] ctypes Structures with subclassed types in the _fields_ list

2012-07-26 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The attached patch for branch default fixes this issue. It also contains a unittest. -- Added file: http://bugs.python.org/file26530/bitfields.patch ___ Python tracker rep...@bugs.python.org http

Re: 2to6 ?

2012-07-02 Thread Thomas Heller
Am 27.06.2012 20:06, schrieb Terry Reedy: On 6/27/2012 10:36 AM, Thomas Heller wrote: Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Others have expressed a similar wish, but I do not know that anyone

2to6 ?

2012-06-27 Thread Thomas Heller
Is there a tool, similar to 2to3, which converts python2 code to code using six.py, so that it runs unchanged with python2 *and* python 3? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Thomas Heller
Am 02.05.2012 19:40, schrieb Petr Jakes: Hi, I am trying to work with HW peripherals on Raspberry Pi To achieve this, it is necessary read/write some values from/to the memory directly. I am looking for some wise way how to organize the bit twiddling. To set some specific bit, for example, it

Re: mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Thomas Heller
Am 02.05.2012 22:05, schrieb Thomas Heller: class GPIO(BitVector): def __init__(self, address, value=0xFF, nbits=8): self.address = address super(GPIO, self).__init__(value, nbits) def _get_value(self): read an 8-bit value from the hardware as 8-bit integer

[issue14201] libc.time != libc['time']

2012-03-07 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The rationale was to allow different packages (for example) in the same process to have their own private instance of a foreign function, with possibly different definitions of restype, argtypes and/or errcheck

Re: Finding x is 1, and x is 'foo' comparisons in a code base

2012-01-17 Thread Thomas Heller
Am 17.01.2012 18:10, schrieb Alex Willmer: Hello, I'm looking for a way to find the occurrences of x is y comparisons in an existing code base. Except for a few special cases (e.g. x is [not] None) they're a usually mistakes, the correct test being x == y. However they happen to work most of

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Thomas Heller
Am 12.10.2011 10:22, schrieb Christian Wutte: Hello all, as stated in the docs [1] os.startfile relies on Win32 ShellExecute(). So maybe someone can explain it to me, why there is no support for program arguments. That's quite a pity since os.startfile is the easiest way for an elevated run

Re: List of WindowsError error codes and meanings

2011-05-26 Thread Thomas Heller
Am 20.05.2011 19:56, schrieb Andrew Berg: This is probably somewhat off-topic, but where would I find a list of what each error code in WindowsError means? WindowsError is so broad that it could be difficult to decide what to do in an except clause. Fortunately, sys.exc_info()[1][0] holds the

Re: Problem receiving UDP broadcast packets.

2011-04-20 Thread Thomas Heller
Am 20.04.2011 00:21, schrieb Grant Edwards: I'm have problems figuring out how to receive UDP broadcast packets on Linux. [...] On the receiving machine, I've used tcpdump to verify that broadcast packets are being seen and have a destination IP of 255.255.255.255 and destination MAC of

Re: [issue10296] ctypes catches BreakPoint error on windows 32

2010-12-23 Thread Thomas Heller
ctypes has _always_ catched exceptions raised in function calls. On Windows ;-). ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-09 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thomas, it seems this change doesn't work for py3k. Buildbots complain and my working copy does as well. Example: http://www.python.org/dev/buildbot/all/builders/x86%20gentoo%203.1/builds/990 I do not know why this happens. It works

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: issue5504-py27-2.patch is the updated patch that now also works on Windows. -- Added file: http://bugs.python.org/file18439/issue5504-py27-2.patch ___ Python tracker rep...@bugs.python.org http

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev 83836 (release27-maint branch) and rev. 83837 (py3k branch). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5504

[issue6869] Embedded python crashed on 4th run, if ctypes is used

2010-08-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev 83841 (py3k), rev 83842 (release31-maint), and rev 83843 (release27-maint). Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-03 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The libffi library included with Python has been updated in the meantime, so most of the issue5504-linux.patch is unneeded now. Here is a new patch, issue5504-py27.patch, against the current release27-maint branch. Seems it is exactly

[issue9055] test_issue_8959_b fails when run from a service

2010-06-22 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: To test windows callbacks, I suggest to use EnumResourceTypes() instead, which is more likely to work in any condition: Unfortunately the proposed test doesn't detect the problem in Python2.7 rc1. It runs without crashing, even

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Fixed in rev. 82127 (trunk) and rev 82138 (py3k). Added test for the issues reported here so that it doen't happen again. -- resolution: - fixed status: open - closed ___ Python tracker rep

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thanks, Michael, for reporting this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-20 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Is r80761 something that can be safely reverted? Yes, I think so. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: The commit that breaks the examples is revision 80761. Tested on WinXP 32 bit. Someone should test on Win 64bit too ;-). -- priority: normal - release blocker ___ Python tracker rep

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-06 Thread Thomas Heller
Paul Moore schrieb: From a quick experiment, it seems that select.select with a timeout doesn't react to a keyboard interrupt until the timeout expires. Specifically, if I do s = socket.socket() select.select([s], [], [], 30) and then press Ctrl-C, Python waits for the 30 seconds before

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2010-04-26 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I'm not sure this issue is really done. The current state works fine, but there is one problem remaining: There are Python extensions that seem to need a manifest pointing to the MSVC runtime libs: dlls that start in-process com servers

Re: ctypes: delay conversion from c_char_p to string

2010-04-24 Thread Thomas Heller
Brendan Miller schrieb: I have a function exposed through ctypes that returns a c_char_p. Since I need to deallocate that c_char_p, it's inconvenient that ctypes copies the c_char_p into a string instead of giving me the raw pointer. I believe this will cause a memory leak, unless ctypes is

[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-08 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Martin, you should probably post your patch to upstream libffi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8314

Splitting a string

2010-04-02 Thread Thomas Heller
Maybe I'm just lazy, but what is the fastest way to convert a string into a tuple containing character sequences and integer numbers, like this: 'si_pos_99_rep_1_0.ita' - ('si_pos_', 99, '_rep_', 1, '_', 0, '.ita') Thanks for ideas, Thomas --

Re: Splitting a string

2010-04-02 Thread Thomas Heller
Patrick Maupin schrieb: On Apr 2, 6:24 am, Peter Otten __pete...@web.de wrote: Thomas Heller wrote: Maybe I'm just lazy, but what is the fastest way to convert a string into a tuple containing character sequences and integer numbers, like this: 'si_pos_99_rep_1_0.ita' - ('si_pos_', 99

[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-23 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: It appears to me that no-one is maintaining this separate ctypes code-base anymore so I'll have to ditch dependencies that use it (Shapely) unfortunately. This is correct, the separate ctypes code base is linked via svn:external

[issue8142] libffi update to 3.0.9

2010-03-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: We should revert the following chunk for configure.ac to generate the Makefile's again, so that we are able to run the testsuite at least with dejagnu: -AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man

[issue8142] libffi update to 3.0.9

2010-03-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: done, and updated the patch for the merge from the trunk. -- Added file: http://bugs.python.org/file16590/libffi-update3.diff This patch passes the ctypes tests and libffi testsuite on this system: Linux tubu64 2.6.24-27

[issue8142] libffi update to 3.0.9

2010-03-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: the ports which are maintained separately still need an update: libffi_msvc libffi trunk now has a port to x86/msvc. might require some extra updates from libffi. I'll take care of this one. Would it be a good idea to upgrade

[issue8154] os.execlp('true') crashes the interpreter on 2.x

2010-03-18 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Thomas, Do you remember why your patch for issue1039 was not backported? Probably an oversight only. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8154

Re: libc Sleep api performs a busy waiting

2010-03-09 Thread Thomas Heller
Joe Fox schrieb: Hi, actually i have simplified my scenario a lot here , In my actual case , i have to call a C-api which blocks on c select , in a separate thread. my thread is getting struck in that api , and thus blocking all the other threads. Can you point to something which

[issue887237] Machine integers

2010-03-05 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: Code duplication is unavoidable because the goal is to give access to machine arithmetics which means (# types) x (# operations) of very similar looking functions. I considered reducing (perceived) code duplication through some pre

[issue7959] ctypes memory leak

2010-02-23 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: CThunkObject is not registered correctly with the cycle GC. The attached patch, against trunk, fixes the issue. -- keywords: +patch Added file: http://bugs.python.org/file16345/issue7957.patch

[issue7959] ctypes memory leak

2010-02-18 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: This little script 'ctypes-leak.py' leaks memory: import gc from ctypes import * PROTO = WINFUNCTYPE(None) class Test(object): def func(self): pass def __init__(self): self.v = PROTO(self.func) while 1: try

Re: comtypes 0.6.2 released

2010-01-18 Thread Thomas Heller
Am 16.01.2010 17:22, schrieb Thomas Heller: I'm happy to announce the 0.6.2 comtypes release: http://sourceforge.net/projects/comtypes/ I forgot to mention what comtypes is, sorry for that: comtypes **comtypes** is a lightweight Python COM package, based on the ctypes FFI library

Re: ctypes: How to call unexported functions in a dll

2010-01-05 Thread Thomas Heller
Am 05.01.2010 12:19, schrieb Coert Klaver (DT): Hi, I am using ctypes in python 3 on a WXP machine Loading a dll and using its exported functions works fine. Now I want to use a function in the dll that is not exported. In C this can be done by just casting the address in the dll of

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2009-11-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I'm curious: Which output do you get from: 'LANG=C /sbin/ldconfig -p | fgrep GL' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7356

[issue7356] parsing of ldconfig output in ctypes/utils.py depends on the locale

2009-11-19 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I assume the patch is fine, would you like to apply it? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7356

  1   2   3   4   5   6   7   8   >