<div dir="ltr">On Thu, Sep 25, 2008 at 6:31 AM, Neal Becker <span dir="ltr"><<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>></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> > On Wed, Sep 24, 2008 at 7:08 PM, Neal Becker <<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>> wrote:<br> ><br> >> Robert Dailey wrote:<br> >><br> >> <snip><br> >><br> >> How about:<br> >> scope().attr("something") = whatever;<br> ><br> ><br> > Where would this code go? What does scope() do?<br> <br> </div></div>You could put it here:<br> BOOST_PYTHON_MODULE ... {<br> <br> scope().attr ("something") = 42;</blockquote></div><br>I can't do it where I define the module because I'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't globally accessible, so it couldn'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>