JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.47k stars 187 forks source link

How to detect if Python object is class/function/property #1053

Open ejmeitz opened 1 year ago

ejmeitz commented 1 year ago

Hello,

I have a couple PyObject's that return the following when printed to screen: PyObject <property object at 0x000001DA767E5940> PyObject <function __DataCollection_clone at 0x000001DA75482AC0> PyObject <class 'ovito.data.DataCollection'>

Is there some property I can access that will tell me if a random PyObject is a class, function or property (besides parsing that string)? I'm trying to use metaprogramming to auto generate class/function signatures while ignoring properties. Thanks!