NixonInnes
MModular
•Created by NixonInnes on 8/17/2024 in #questions
Struct wrapping Python object
Please excuse me if this is a really noobie question, I'm just picking up the language...
I'm trying to port an old GUI application I wrote in Python using Pyglet. My plan is currently, assuming there are no Mojo GUI library, reimplement all of the data processing in Mojo with an interface to Python to draw the UI.
The first pattern I imagined would be something like:
where I have a Python module which defines a window:
The glaringly obvious question is, should I do this? Second is, how should I type the struct? And lastly, if this is possible, what are the implications of referencing a
PythonObject
in my Mojo struct?6 replies