I got the class below and i need to call self.webview variable from a function inside another class. how do i achieve that.
class Window(w):
def __init__(self):
self.webview = WebKit2.WebView()
class anotherclass:
def send_js(js):
w = self.webview <-- cant get this to match
w.run_javascript(str(js))
i was doing it with the wrong approach the above seems to work for me, i can also put js variable inside a function.