[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QSharedMemory Example Crashing
From:       Cody Scott <cody () perspexis ! com>
Date:       2017-09-05 16:25:08
Message-ID: CAN04N8a73u-Cz34RWOav5cppnq1_2_Nwwse9d+DQ1-yZpfrdRQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Yes that works.

The correct line is

self.sharedMemory.data()[:size] = buf.data()[:size]



On Tue, Sep 5, 2017 at 12:21 PM, Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 5 Sep 2017, at 5:18 pm, Cody Scott <cody@perspexis.com> wrote:
> >
> > Traceback (most recent call last):
> >   File "sharedmemory.py", line 133, in loadFromFile
> >     self.sharedMemory.data()[:size] = buf.data().data[:size]
> > TypeError: 'builtin_function_or_method' object is not subscriptable
>
> data()[:size] then
>
> Phil
>

[Attachment #5 (text/html)]

<div dir="ltr">Yes that works.  <div><br></div><div>The correct line is  \
</div><div><br></div><div><font face="monospace, \
monospace">self.sharedMemory.data()[:size] = \
buf.data()[:size]</font><br></div><div><br></div><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 5, 2017 at 12:21 PM, \
Phil Thompson <span dir="ltr">&lt;<a href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 5 Sep 2017, at 5:18 pm, Cody Scott &lt;<a \
href="mailto:cody@perspexis.com">cody@perspexis.com</a>&gt; wrote:<br> &gt;<br>
&gt; Traceback (most recent call last):<br>
&gt;     File &quot;sharedmemory.py&quot;, line 133, in loadFromFile<br>
&gt;        self.sharedMemory.data()[:<wbr>size] = buf.data().data[:size]<br>
&gt; TypeError: &#39;builtin_function_or_method&#39; object is not subscriptable<br>
<br>
</span>data()[:size] then<br>
<span class="HOEnZb"><font color="#888888"><br>
Phil<br>
</font></span></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic