You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am a complete noob so be gentle and please assume I know nothing. I am working with someone who is helping me create python bindings for a C++ library. One hurdle he is facing is that some class methods in the library are void but take a pointer to a list as an argument, populate it and return it. the interface created the following:
so assume I have an object "t" that has vertices. In Python, how would I get back a list of vertices from this object? If I am using cppyy, I would do the following:
verts = cppyy.gbl.std.list[topologic.Vertex.Ptr]()
_ = t.Vertices(verts)
print(list(verts)) #will print a pythonic list of topologic vertex objects
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi I am a complete noob so be gentle and please assume I know nothing. I am working with someone who is helping me create python bindings for a C++ library. One hurdle he is facing is that some class methods in the library are void but take a pointer to a list as an argument, populate it and return it. the interface created the following:
so assume I have an object "t" that has vertices. In Python, how would I get back a list of vertices from this object? If I am using cppyy, I would do the following:
Thank you for any help you can provide.
Beta Was this translation helpful? Give feedback.
All reactions