[PyQt] Access to QSharedMemory with buffer protocol

2010-11-01 Thread Hans-Peter Jansen
Hi Phil, end of July last year, Alexandre Raczynski asked about accessing QSharedMemory, and you replied, that: mutable_data = buffer(sharedMemory.data()) ...should give _write_ access to the memory. Hmm, not here: $ python Python 2.6 (r26:66714, Mar 30 2010, 00:30:21) [GCC 4.3.2 [gcc-4_3-br

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-01 Thread Yao Ko
Hi, I encountered the same problem back when Alexandre asked the same question. This is the workaround that I've been using: CLIB = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c')) shared_memory.lock() try: CLIB.memcpy(int(shared_memory.data()), data_bytes, data_len) finally: shared_m

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-01 Thread Hans-Peter Jansen
Hi Yao, On Monday 01 November 2010, 23:38:29 Yao Ko wrote: > Hi, > > I encountered the same problem back when Alexandre asked the same > question. This is the workaround that I've been using: > > CLIB = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c')) > > shared_memory.lock() > try: > CLI

[PyQt] downcast a base class to its template subclass

2010-11-01 Thread Qin Shen
Hi, In my non-template base class' .sip file, I used %ConvertToSubClassCode directive to downcast the base class type to its sub-class. If the sub-class is not a template, it all works fine. Now I need to derive a template sub-class from the base class, the sipFindType() won't work because the

[PyQt] Getting information about crash/lockup

2010-11-01 Thread Mikael Modin
Hi, I'm developing a networked multithreaded application using PyQt4 v 4.7.4. I'm wondering if there are any tools available to see what messages/signals are passed internally by Qt or if you can suggest any other good debugging tips/tools. My problem is this: The problem is related to three part