staticmethod and namespaces

D

darnzen

Having an odd problem that I solved, but wondering if its the best
solution (seems like a bit of a hack).

First off, I'm using an external DLL that requires static callbacks,
but because of this, I'm losing instance info. It will make more sense
after I diagram it:

#Module main.py

class App:
def sperg(self):
pass

app = App()
[main loop and such]
-----------------------------
# Module A.py
import main
class Foo:
@staticmethod
chum(nType, nPtr):
# Need to access function / data in app instance
app.sperg(nType, nPtr)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top