[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: That's a great idea. Just before doing a C library function call, ctypes would copy this variable into the real C-level errno; and Is the ctypes.set_errno(...) function really needed? Wouldn't it be sufficient if errno is simply set to zero

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: But would it hurt to set errno to zero before *any* function call? My experiments show that it is faster to clear errno always instead of trying to get a previously set value from tls storage in a ctypes-global object created by calling

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: This does not work because Python can run arbitrary code, even in the same thread, between the call to a function in a shared library and the call to get_errno(). __ Tracker [EMAIL PROTECTED] http

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: How can Python run arbitrary code between the return from a ctypes method and the next Python instruction? None of the code should have any effect on errno. By freeing objects because their refcount has reached zero

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Using the native errno instead of a custom TLS value is bad because a lot of things can occur So what's the semantics of set_errno then? Set the real errno? If so, what if it gets changed between the call to set_errno, and the actual

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-05-23 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real errno. The copy is copied into the 'real' errno just before ffi_call (in Modules/_ctypes/callproc.c), and the real errno is copied in to ctypes copy right after

[issue2939] Apache mod_python python-func strftime

2008-05-22 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Has nothing to do with ctypes. -- assignee: theller - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2939

Re: Access to sysctl on FreeBSD?

2008-05-21 Thread Thomas Heller
Skye schrieb: Great, thanks for the help (I'm fairly new to Python, didn't know about ctypes) from ctypes import * libc = CDLL(libc.so.7) size = c_uint(0) libc.sysctlbyname(net.inet.ip.stats, None, byref(size), None, 0) buf = c_char_p( * size.value)

Re: [ctypes] convert pointer to string?

2008-05-21 Thread Thomas Heller
Neal Becker schrieb: In an earlier post, I was interested in passing a pointer to a structure to fcntl.ioctl. This works: c = create_string_buffer (...) args = struct.pack(iP, len(c), cast (pointer (c), c_void_p).value) err = fcntl.ioctl(eos_fd, request, args) Now to do the same with

[issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries

2008-05-21 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: The OS X find_library code was not written by me, the code was ripped from Bob Ippolitos macholib. Can some OS X expert please look into this? Shamelessly assigning to Ronald - feel free to unassign if you have no time. -- assignee

[issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries

2008-05-21 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Thanks, Ronald. Sounds like this bug could be closed then. Bill, if you want a library search function with different semantics, I suggest you open a feature request, describe the sematics that should be used and (ideally) provide a patch

[issue1793] ctypes.util.find_msvcrt() function

2008-05-16 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Committed in trunk as rev. 63395. I've changed the code that Amaury suggested so that None is returned when get_build_version() returns None. Thanks. -- resolution: - fixed status: open - closed

[issue2764] c_char doesn't implement py3k buffer interface

2008-05-05 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Thanks for your efforts, Christian. This test needs an object which implements the readonly buffer interface. Unfortunately the bytes object that I would like to use is broken: http://bugs.python.org/issue2538

Re: py2exe Icon Resources

2008-04-30 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: I have created an app using python and then converting it to an exe using py2exe, and have the following code: icon_resources: [(1, appFavicon.ico), (2, dataFavicon.ico)] in my py2exe setup file, the appFavicon works fine and it sets that as the app icon thats

[issue1971] ctypes exposing the pep 3118 buffer interface

2008-04-30 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Instead of waiting for review I've committed this as rev 62597. -- assignee: - theller resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1971

[issue2692] bytes object wrongly exposes writeable buffer interface

2008-04-30 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Duplicate of issue #2538. -- resolution: - duplicate status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2692

[issue2538] memoryview of bytes is not readonly

2008-04-30 Thread Thomas Heller
Changes by Thomas Heller [EMAIL PROTECTED]: -- nosy: +theller __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2538 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-25 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Can you please elaborate your (apparent) concerns about this patch? IOW, why did you not check it in? I have no concerns about the patch, and I am currently committing it. I'm uploading so that I can points others to it, and (hopefully

[issue2655] Create ctypes instances from buffer interface

2008-04-25 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Implemented from_buffer() and from_buffer_copy() as rev 62497 to SVN trunk. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2655

[issue2655] Create ctypes instances from buffer interface

2008-04-25 Thread Thomas Heller
Changes by Thomas Heller [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10057/from_buffer.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2655 __ ___ Python

[issue2692] bytes object wrongly exposes writeable buffer interface

2008-04-25 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: IIUC, the bytes object should be immutable (in contrast to bytearray). But PyObject_FromWriteBuffer() does not fail. It seems that the attached patch fixes it; however there are lots of failures in the testsuite with the patch - even

[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-25 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Also fixed in release25-maint, rev 62504. -- resolution: accepted - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2682

[issue2680] gotcha: _fields_ is final but accepts lists

2008-04-24 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: The __slots__ member of a class object has the same behavior. You may mutate it (even replace it) but this has no effect: only the value available when the class statement was executed is relevant. The rules in ctypes are a little bit more

[issue2655] Create ctypes instances from buffer interface

2008-04-24 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: The suggestion by Lenard Lindstrom was an additional method named 'from_buffer_copy'. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2655

[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-24 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: Zachary Pincus posted a message about this cyclic reference in ctypes CFunctionType objects. The reference has the problem that these objects are cleaned up later than expected. The attached patch fixes this problem by removing the cyclic

[issue2680] gotcha: _fields_ is final but accepts lists

2008-04-24 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Closing as won't fix. -- resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2680

[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-24 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Can you please elaborate your (apparent) concerns about this patch? IOW, why did you not check it in? I have no concerns about the patch, and I am currently committing it. I'm uploading so that I can points others to it, and (hopefully

[issue2682] cyclic reference in ctypes CFunctionType objects

2008-04-24 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Fixed in trunk and py3k, committed as rev 62481 (trunk), rev 62484 (py3k). I'll leave this open until the decision about backporting to release25-maint is made. -- resolution: - accepted __ Tracker

[issue2655] Create ctypes instances from buffer interface

2008-04-18 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: This patch implements a .from_buffer(source, offset=0) class method from ctypes types. 'source' must expose a writeable buffer interface; the created ctypes instance will share the internal buffer of the source object; also it holds

[issue2655] Create ctypes instances from buffer interface

2008-04-18 Thread Thomas Heller
Changes by Thomas Heller [EMAIL PROTECTED]: -- type: - behavior __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2655 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2559] atom sorting error when building ctypes

2008-04-14 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: So closing this as won't fix. -- resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2559

[issue1797] ctypes function pointer enhancements

2008-04-14 Thread Thomas Heller
Changes by Thomas Heller [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9129/ctypes-funcptr.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1797 __ ___ Python

[issue1797] ctypes function pointer enhancements

2008-04-14 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Remove useless file (doesn't contain a patch). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1797 __ ___ Python-bugs-list

[issue2616] ctypes.pointer(), ctypes.POINTER() speedup

2008-04-14 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Committed a slightly modified patch as rev 62338; will also be merged into py3k. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2616

[issue2616] ctypes.pointer(), ctypes.POINTER() speedup

2008-04-11 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: This patch implements the POINTER() and the pointer() function in C; giving a speedup of roughly a factor of 2. -- assignee: theller components: ctypes files: ctypes-pointer.diff keywords: patch, patch messages: 65356 nosy: theller

[issue2559] atom sorting error when building ctypes

2008-04-11 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: I see this also, on Leopard x86. The linker error is not printed on Tiger PPC. At least, the ctypes test suite does work ok so it may be that it can be ignored. Googling for this error, I find that it may be related to linker changes

[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C

2008-04-05 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: I'm curious: Why do you insist on using the sun compiler? Are there political or technical reasons? Another thing: in principle it should be possible to build a libffi shared library with gcc, and use it in a sun-c compiled python build

Re: Ignoring windows registry PythonPath subkeys

2008-04-04 Thread Thomas Heller
Floris Bruynooghe schrieb: Hi We basically want the same as the OP in [1], i.e. when python starts up we don't want to load *any* sys.path entries from the registry, including subkeys of the PythonPath key. The result of that thread seems to be to edit PC/getpathp.c[2] and recompile.

[issue2548] Undetected error in exception handling

2008-04-04 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: [Found by Daniel Diniz (ajaksu2), see issue #2542] The following code triggers an undetected error with a debug build: import sys def g(): try: return g() except: return sys.exc_info() g() print 42 Running the code prints

[issue2542] PyErr_ExceptionMatches must not fail

2008-04-04 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Daniel, IMO you've found a separate bug. I added it as issue #2548. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2542

[issue2543] Make ctypes compatible with Python 2.3, 2.4, and 2.5, as per PEP291

2008-04-04 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Committed as rev 62143. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2543

[issue2544] link with gcc -shared on HP systems

2008-04-04 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Committed as rev 62145. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2544

[issue2551] Python 2.6a2 on Solaris 10 built with SUN C

2008-04-04 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: On *nix-like systems, ctypes will most likely only compile with gcc. Since I do not have access to such systems, neither the expertise for them, this will not change unless someone provides patches. -- nosy: +theller

Re: State of ctypes Support on HP-UX?

2008-04-03 Thread Thomas Heller
Phil Thompson schrieb: Could somebody confirm how well ctypes is supported on HP-UX (for both PA-RISC and Itanium) for both Python v2.4 and v2.5? I don't have access to an HP system and Google doesn't come up with a definitive answer (which may just mean it works fine, but prior

Re: State of ctypes Support on HP-UX?

2008-04-03 Thread Thomas Heller
Phil Thompson schrieb: On Thursday 03 April 2008, Thomas Heller wrote: Phil Thompson schrieb: Could somebody confirm how well ctypes is supported on HP-UX (for both PA-RISC and Itanium) for both Python v2.4 and v2.5? I cannot answer your question, but if you want to try it out yourself

[issue2542] PyErr_ExceptionMatches must not fail

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: PyErr_ExceptionMatches must not fail, according to the docs. So an error code from PyObject_IsSubclass() cannot be returned. The attached patch calls PyErr_WriteUnraisable in this case, and returns an arbitrary value (0 was chosen

[issue2543] Make ctypes compatible with Python 2.3, 2.4, and 2.5, as per PEP291

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: To be committed after the current release is out. -- assignee: theller components: ctypes files: ctypes-compat-py23.diff keywords: patch, patch messages: 64904 nosy: theller severity: normal status: open title: Make ctypes compatible

[issue2544] link with gcc -shared on HP systems

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: As discussed in issue #1582742, this patch uses 'gcc -shared' as linker on HP systems when compiling with gcc. It fixes a problem in the ctypes test-suite, that _ctypes_test.so cannot be dynloaded because of missing symbols. To be committed

[issue1582742] Python is dumping core after the test test_ctypes

2008-04-03 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: See issue #2544, this problem will be solved in Python 2.6. In Python 2.5, ctypes does not work on HPUX. -- assignee: - theller resolution: - rejected status: open - closed _ Tracker [EMAIL

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-04-02 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Issue #2534 has a patch which speeds up isinstance and issubclass by implementing type.__instancecheck__ and type.__subclasscheck__. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2303

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: This patch implements type.__instancecheck__ and type.__subclasscheck__, which speeds up isinstance and issubclass calls quite a bit. See also issue #2303. Here are the performance figures for the current trunk version: Current SNV trunk

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Running Daniels code interactively, with a debug build on Windows, additionally prints 'XXX undetected error' before the Runtime error is raised. I cannot see anything that is wrong with my code. Maybe this, and the test failure, has to do

[issue2152] make sqlite.Row hashable correctly

2008-03-31 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Here's a patch against trunk that implements tp_richcompare. It does apply to and work also in the py3k branch. I have only implemented the '__eq__' and '__ne__' comparisons. Added file: http://bugs.python.org/file9913/sqliterow-richcmp.diff

[issue2513] 64bit cross compilation on windows

2008-03-31 Thread Thomas Heller
Changes by Thomas Heller [EMAIL PROTECTED]: -- nosy: +theller __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2513 __ ___ Python-bugs-list mailing list Unsubscribe

[issue2513] 64bit cross compilation on windows

2008-03-31 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: I had to make additional changes to PCBuild\pcbuild.sln to create a 64-bit wininst-9.0-amd64.exe (but I was not able to try out if it works or not). Added file: http://bugs.python.org/file9914/pcbuild.diff

Re: py2exe socket.gaierror (10093)

2008-03-26 Thread Thomas Heller
Knut schrieb: The script can't resolve the server name. Try to do it by hand using nslookup or even ping (you may want to add a few print statements inside the script to see the exact host name it is trying to connect to, in case it isn't what you expect) If you can't resolve the host name

[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-25 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: In the simplest case, convert import dl libc = dl.open(libc.so.6) iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2) print(iconv) to import ctypes libc = ctypes.CDLL(libc.so.6) iconv = libc.iconv_open(ISO-8859-1, ISO-8859-2

[issue2470] Need fixer for dl (removed) - ctypes module

2008-03-25 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Thomas Heller schrieb: Thomas Heller [EMAIL PROTECTED] added the comment: In the simplest case, convert import dl libc = dl.open(libc.so.6) iconv = libc.call(iconv_open, ISO-8859-1, ISO-8859-2) print(iconv) to import ctypes libc

[issue1971] ctypes exposing the pep 3118 buffer interface

2008-03-20 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Travis, can you please review this / when can you review this issue for compliance with pep 3118? -- nosy: +teoliphant __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1971

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2008-03-18 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: I applied the patch to SVN trunk as rev 61520. It would probably be better to have a configure test for alloca.h. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-03-18 Thread Thomas Heller
Thomas Heller [EMAIL PROTECTED] added the comment: Would it help to implement a default __instancecheck__ and __subclasscheck__ for object (or for type), that subclasses can override? -- nosy: +theller __ Tracker [EMAIL PROTECTED] http://bugs.python.org

Re: comtypes question

2008-03-17 Thread Thomas Heller
Jorgen Bodde schrieb: Hi All, I am trying to automate a 3rd party application, and all I have to work on is the type library and some documentation. I hope a Python / COM guru can answer this or put me on the right path because I don't know why it does not work. First I imported the

Re: app runs fine with interpreter, but not under py2exe

2008-03-16 Thread Thomas Heller
Doug Morse schrieb: Peter, Genius! You nailed it -- thanks! py2exe is apparently getting confused by the fact that packages Numeric and numpy both have files multiarray.pyd and umath.pyd. It copies just one of each -- from $PYTHONHOME/Lib/site-packages/numpy/core -- and puts both of

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-03-05 Thread Thomas Heller
Thomas Heller added the comment: libffi3-branch has been merged to trunk; the Modules/_ctypes/libffi files are from the libffi 3.0.4 release now. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1292

Re: Why this ref leak?

2008-02-27 Thread Thomas Heller
Gerhard Häring schrieb: import sys def foo(): class C(object): pass foo() print , sys.gettotalrefcount() foo() print , sys.gettotalrefcount() foo() print , sys.gettotalrefcount() 21366 21387 21408 [9779 refs] Both Python 2.4 and 2.5 don't clean up

[issue2152] make sqlite.Row hashable correctly

2008-02-21 Thread Thomas Heller
New submission from Thomas Heller: The attached patch implements hash and cmp for sqlite3.Row objects. -- files: sqliterow.patch keywords: patch messages: 62615 nosy: theller severity: normal status: open title: make sqlite.Row hashable correctly type: behavior versions: Python 2.6

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-02-21 Thread Thomas Heller
Thomas Heller added the comment: I'm reopening this. libffi 3 has been released; I have created the libffi3-branch for this work in Python svn. -- status: closed - open __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1292

[issue2146] ctypes: support double for calling function

2008-02-20 Thread Thomas Heller
Thomas Heller added the comment: I reject this patch. It would be an arbitrary decision whether a Python float should be passed as a C float or as a C double, and the docs explicitely mention which native Python types can be passed to function calls when argtypes is not set; see the bottom

[issue2145] ctypes.util.find_library(): posix .so without SONAME

2008-02-20 Thread Thomas Heller
Thomas Heller added the comment: Honestly I do not know enough about linux shared libraries to have any opinion about this issue. IIRC, the find_library should behave in a similar way as dynamic linking works on linux. If this libdistorm64.so is not a real so library, as you write, then maybe

[issue2123] ctypes pointer not always keeping target alive

2008-02-15 Thread Thomas Heller
Thomas Heller added the comment: May I ask: do you have a real use case for this, or is it a carefully constructed example? Of course I take all the blame for not defining/documenting this stuff. My current view is this: Python code C code

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: I think this is a serious problem (and thanks, amaury, for finding the spot). comtypes, like ctypes, uses quite a bit of isinstance calls. It is the reason that the comtypes unit tests run between 8% and 25% slower with trunk than with python 2.5.1. If I

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: PyObject_IsSubclass() has the same problem. BTW; calling PyObject_GetAttr() with interned strings for __instancecheck__ and __subclasscheck__ brings not enough speedup. __ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Thomas Heller
Thomas Heller added the comment: Lib/platform.py contains this notice at the top: #This module is maintained by Marc-Andre Lemburg [EMAIL PROTECTED]. #If you find problems, please submit bug reports/patches via the #Python SourceForge Project Page and assign them to lemburg

[issue1971] ctypes exposing the pep 3118 buffer interface

2008-01-30 Thread Thomas Heller
New submission from Thomas Heller: The attached patch against py3k makes ctypes expose the pep 3118 buffer interface. The code is also available in the py3k-ctypes-pep3118 branch. -- components: Extension Modules files: ctypes-pep3118.patch keywords: patch messages: 61844 nosy: theller

[issue1941] 2.6 stdlib using with statement

2008-01-26 Thread Thomas Heller
Thomas Heller added the comment: modulefinder should be kept compatible with Python 2.2, so please do not apply the patch for this module. See also PEP 291. No idea about the other modules. -- nosy: +theller __ Tracker [EMAIL PROTECTED] http

Re: Windows AVIFile problems

2008-01-25 Thread Thomas Heller
c d saunter schrieb: Hi All, I'm trying to access individual video frames of an AVI file from within Python 2.4 or 2.5 under Windows XP. I have found this example code here for that does exactly what I want, using the windows avifile.dll but I am unable to find the AVIFile.h header...

Re: Python and binary compatibility

2008-01-24 Thread Thomas Heller
Ambush Commander schrieb: I'm a newbie to Python; various packages I've used in the past (Lyx, LilyPond and Inkscape, to name a few) have bundled Python with them for various scripting needs, and Cygwin also had an install lying around, so when I started to use Mercurial (also Python) I

[issue1919] Backport of io.py

2008-01-24 Thread Thomas Heller
Thomas Heller added the comment: * backport bytearray and the new buffer interface from 3.0 backport of the new buffer interface is required for PEP 3118 which is marked accepted: It is intended that this PEP will be back-ported to Python 2.6 by adding the C-API and the two functions

Re: ctypes CDLL - which paths are searched?

2008-01-22 Thread Thomas Heller
Helmut Jarausch schrieb: Thomas Heller wrote: Helmut Jarausch schrieb: Hi, how can I specify the paths to be searched for a dynamic library to be loaded by ctypes' CDLL class on a Linux system. Do I have to set os.environment['LD_LIBRARY_PATH'] ? ctypes passes the argument given

Re: ctypes CDLL - which paths are searched?

2008-01-21 Thread Thomas Heller
Helmut Jarausch schrieb: Hi, how can I specify the paths to be searched for a dynamic library to be loaded by ctypes' CDLL class on a Linux system. Do I have to set os.environment['LD_LIBRARY_PATH'] ? ctypes passes the argument given to CDLL(path) straight to the dlopen(3) call, so your

[issue1872] change the bool struct format code from 't' to '?'

2008-01-19 Thread Thomas Heller
New submission from Thomas Heller: Currently the struct module uses the format code 't' for the bool datatype (this was added in python 2.6, in revision 53508). This conflicts with the specification in PEP 3118, which proposes the '?' format character for the bool type, 't' is proposed

[issue1872] change the bool struct format code from 't' to '?'

2008-01-19 Thread Thomas Heller
Changes by Thomas Heller: -- components: +Documentation __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1872 __ ___ Python-bugs-list mailing list Unsubscribe: http

Re: Embedding Python - Freeing Python Objects Not Using Py_DECREF

2008-01-17 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: Hello, I'm embedding Python interpreter in a Win32 console application. I use C++. I would like to use the WinAPI LoadLibrary function to load the python dll at runtime (followed by GetProcAddress calls), so that I have to make no assumptions about the location

[issue1831] ctypes.Structure constructor arguments

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Committed as rev. 60003 in trunk. I'll also change the too many arguments... exception to a TypeError. Thanks. -- assignee: - theller resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Lenard Lindstrom convinced me that tuples should not be allowed when an array is expected. -- resolution: - rejected status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1796

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Matthias, can this issue be set to 'fixed' and 'closed' now? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1292 __ ___ Python-bugs-list mailing

[issue1793] ctypes.util.find_msvcrt() function

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Amaury Forgeot d'Arc schrieb: This code works on all pythons I have on my machine: official builds, custom builds (relase/debug) with several MS compilers... I did not test it with other compiled vendors (mingw32...). What I do not like about your code

[issue1252550] modulefinder misses modules

2008-01-16 Thread Thomas Heller
Changes by Thomas Heller: -- resolution: - out of date status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1252550 _ ___ Python-bugs-list

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: This would require to build the 'char *format' string at runtime, the 'char *keywords[]' array too, and pass a variable number of arguments into the call. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Do you have any idea how this could be implemented? -- nosy: +theller __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831 __ ___ Python

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Oops, uploaded the wrong file. Added file: http://bugs.python.org/file9177/ctypes-struct.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9176/ctypes-struct.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831 __ ___ Python-bugs-list mailing

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Yes, I came up with a similar solution in the meantime; see the attached patch. Added file: http://bugs.python.org/file9176/ctypes-struct.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Ok, added the missing Py_DECREF, changed to TypeError, and added a test. Added file: http://bugs.python.org/file9178/ctypes-struct.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9177/ctypes-struct.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1831 __ ___ Python-bugs-list mailing

[issue1821] configure.ac change for FreeBSD

2008-01-14 Thread Thomas Heller
Thomas Heller added the comment: Thanks. Committed in trunk as rev. 59952. -- assignee: - theller nosy: +theller resolution: - fixed status: open - closed versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1821

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Thomas Heller added the comment: Lenard Lindstrom pointed out in a post to the ctypes-users list that pointer instances must not be accepted. Uploaded new patch ctypes-array-2.patch. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1796

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Added file: http://bugs.python.org/file9162/ctypes-array-2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1796 __ ___ Python-bugs-list mailing

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9127/ctypes-arrays.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1796 __ ___ Python-bugs-list mailing

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9162/ctypes-array-2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1796 __ ___ Python-bugs-list mailing

<    1   2   3   4   5   6   7   8   >