I cant import sublime_plugin.
This code worked yesterday:
import sublime_plugin
But when i came back today it doesn't work. My cmd.py file is inside Sublime Text 3PackagesCMD. It gives me a ModuleNotFoundError. I use sublime text 3 and python 3. It also does not work from the command line.
I also tried to run it in VSCode which didn't work aswell.
Reinstalling sublime text 3 did not fix the problem.
After reinstalling Sublime multiple times it now seems to work.
So the whole code i have is:
import os
import sublime_plugin
class CmdCommand(sublime_plugin.TextCommand):
def run(self, edit):
os.system("cd " + self.view.file_name() + " & start cmd")
It worked on the day i put it in the folder.
from this link: How can I open command line prompt from Sublime in windows7
Edit: It doesn't work anymore.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…