pymol-open-source
pymol-open-source copied to clipboard
Question about the `__name__` variable in plugins
Why I need to use "pmg_tk.startup.XDrugPy" when testing for __name__ when loading plugins? I test for __name__ because I can't use pymol.Qt from command line scripts.
if __name__ in ["pymol", "pmg_tk.startup.XDrugPy"]:
import pymol
QWidget = pymol.Qt.QtWidgets.QWidget
...
https://gist.github.com/pslacerda/1e6a14cbe3fc7aeb2425e0a5d74ddc78#file-xdrugpy-py-L853
Note: I'm using PyMOL 2.6 LTS.