<div dir="ltr"><div>Hi Cory,</div><div><br></div><div>The code that deals with this is vtkPythonUtil::GetObjectFromObject(), which tries to decode the address with these three format string:</div><div><br></div>    "_%llx_%s"<div>    "Addr=0x%llx"</div><div>    "%p"</div><div><br></div><div>The first of these is a "SWIG-style" pointer string, the second is legacy, and the third is what is catching your address.  I believe that whether it accepts "0x" is platform specific.</div><div><br></div><div> - David<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 18, 2016 at 10:17 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">One can create a Python object from an existing VTK object if the<br>
address of the VTK object is known, e.g.,<br>
<br>
address = "0xbeefbeef"<br>
sphereSource = vtk.vtkSphereSource(address)<br>
<br>
My question is about the address string. Can the address string keep<br>
the prefix "0x" or must it be removed? I've looked around the Python<br>
wrapping code, but haven't concluded one way or the other. Some code<br>
in ParaView unintentionally uses the full address with "0x" and seems<br>
to work, so I'm guessing either is fine.<br>
<br>
Thanks,<br>
Cory<br>
<br>
--<br>
Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.<br></blockquote></div></div></div></div>