Sublime text plugin is not working

可紊 提交于 2019-12-13 20:03:51

问题


I'm using Sublime text 3 and I'm writing a simple plugin, the problem that i have is that whenever i put myplugin.py in the Packages/User folder I get the result perfectly.

BUT when I move myplugin.py file to a folder for example myplugin/myplugin.py the plugin is not working anymore. I tried to see if there is any information logged to the console but I found nothing related to my problem.

Can any one tell me what is exactly the problem and what I'm doing wrong?


回答1:


Actually I was missing the fact that a sublime text plugin should be living in the Packages folder and not Packages/User folder




回答2:


You need to have a file '__init__.py' created in the myplugin folder with that file. Otherwise you will be unable to load the file as a module.



来源:https://stackoverflow.com/questions/33464819/sublime-text-plugin-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!