2đź‘Ť
âś…
I just mean the bottom level of that module, at the same indentation as the “from mpd…” and “class MPDProxy…” lines.
So, at the bottom of the file, without indenting at all, put proxy = MPDProxy()
– and now you can reference that instance from anywhere by importing it with from lib.MPDProxy import proxy
.
👤Daniel Roseman
Source:stackexchange.com