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 3\Packages\CMD. 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.
Edit: It works now (i had the plugin set up with a context menu, which on its own works (so it opens the cmd) its just that when i put a text command file in there that it broke). Thanks for all the help