Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Phil Thompson
On Tue, 2 Nov 2010 00:00:06 +0200, Hans-Peter Jansen h...@urpla.net wrote: 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. ...bad

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Giovanni Bajo
On mar, 2010-11-02 at 10:16 +, Phil Thompson wrote: On Tue, 2 Nov 2010 00:00:06 +0200, Hans-Peter Jansen h...@urpla.net wrote: Hi Phil, end of July last year, Alexandre Raczynski asked about accessing QSharedMemory, and you replied, that: mutable_data =

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Hans-Peter Jansen
On Tuesday 02 November 2010, 11:16:35 Phil Thompson wrote: On Tue, 2 Nov 2010 00:00:06 +0200, Hans-Peter Jansen h...@urpla.net wrote: Hi Phil, end of July last year, Alexandre Raczynski asked about accessing QSharedMemory, and you replied, that: mutable_data =

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Hans-Peter Jansen
On Tuesday 02 November 2010, 11:26:46 Giovanni Bajo wrote: On mar, 2010-11-02 at 10:16 +, Phil Thompson wrote: On Tue, 2 Nov 2010 00:00:06 +0200, Hans-Peter Jansen h...@urpla.net wrote: Hi Phil, end of July last year, Alexandre Raczynski asked about accessing

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Giovanni Bajo
On mar, 2010-11-02 at 13:57 +0200, Hans-Peter Jansen wrote: On Tuesday 02 November 2010, 11:26:46 Giovanni Bajo wrote: On mar, 2010-11-02 at 10:16 +, Phil Thompson wrote: On Tue, 2 Nov 2010 00:00:06 +0200, Hans-Peter Jansen h...@urpla.net wrote: Hi Phil, end of July

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Phil Thompson
On Tue, 02 Nov 2010 13:19:06 +0100, Giovanni Bajo ra...@develer.com wrote: On mar, 2010-11-02 at 13:57 +0200, Hans-Peter Jansen wrote: On Tuesday 02 November 2010, 11:26:46 Giovanni Bajo wrote: On mar, 2010-11-02 at 10:16 +, Phil Thompson wrote: On Tue, 2 Nov 2010 00:00:06 +0200,

Re: [PyQt] Access to QSharedMemory with buffer protocol

2010-11-02 Thread Hans-Peter Jansen
On Tuesday 02 November 2010, 13:26:44 Phil Thompson wrote: On Tue, 02 Nov 2010 13:19:06 +0100, Giovanni Bajo ra...@develer.com wrote: On mar, 2010-11-02 at 13:57 +0200, Hans-Peter Jansen wrote: On Tuesday 02 November 2010, 11:26:46 Giovanni Bajo wrote: On mar, 2010-11-02 at 10:16 +,

[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

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:

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: