<div dir="ltr">On Thu, Sep 25, 2008 at 6:31 AM, Neal Becker <span dir="ltr">&lt;<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">Robert Dailey wrote:<br>
<br>
&gt; On Wed, Sep 24, 2008 at 7:08 PM, Neal Becker &lt;<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Robert Dailey wrote:<br>
&gt;&gt;<br>
&gt;&gt; &lt;snip&gt;<br>
&gt;&gt;<br>
&gt;&gt; How about:<br>
&gt;&gt; scope().attr(&quot;something&quot;) = whatever;<br>
&gt;<br>
&gt;<br>
&gt; Where would this code go? What does scope() do?<br>
<br>
</div></div>You could put it here:<br>
BOOST_PYTHON_MODULE ... {<br>
<br>
 &nbsp;scope().attr (&quot;something&quot;) = 42;</blockquote></div><br>I can&#39;t do it where I define the module because I&#39;m passing a pointer
to an object to python. This needs to be available as the script is
executed, and this pointer value is only known to a certain class (It
isn&#39;t globally accessible, so it couldn&#39;t possibly be set where the
python module is defined).<br>
<br>
I know it needs to be done the way I originally posted, but I need to know why it is throwing an exception.<br><br>Thanks for the help.<br></div>