So I threw this together.
example to show path of all open explorer windows:
from win32com.client.gencache import EnsureDispatch
for w in EnsureDispatch("Shell.Application").Windows():
print(w.LocationName + "=" + w.LocationURL)
- Code: Select all
A Test Plugin=file:///C:/Users/facelessuser/AppData/Roaming/Sublime%20Text%203/Packages/A%20Test%20Plugin
Notice, you just need to call import Pywin32.setup once before your plugin accesses any win32api, win32com, etc. calls. Technically it only needs to be called once when Sublime starts, but there is no guarantee your plugin will start after Pywin32 gets loaded. That is why your plugin just needs to make sure by manually including it.
- This is only for ST3
- Not everything may work. I have only tested what I needed to use.
Good luck! And I am not responsible if something breaks .