Parent class in C module #16983
Unanswered
purewack
asked this question in
Core Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to write a module class for an LCD screen with stream support for
os.dupterm
. All works well but If I extend my c class in python asclass LCDExtra(LCD)
, then the object received by thestream_write
function in c gets the LCDExtra object pointer.Is there an easy way to retrieve the parent class in C, as I need to access some of the attributes I have defined, mainly the character cursor for printing text.
I have tried this to determine if the class is the parent class or not but I don't know how to proceed next:
Here is the test code:
I have tried looking online but it seems the micropython code base has changed somewhat
Beta Was this translation helpful? Give feedback.
All reactions