Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Last active August 17, 2016 04:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfromaniello/4597188 to your computer and use it in GitHub Desktop.
Save jfromaniello/4597188 to your computer and use it in GitHub Desktop.
import sublime, sublime_plugin
class TestCommand(sublime_plugin.ApplicationCommand):
def __init__(self):
super(TestCommand, self).__init__()
#do your stuf here
def run(self, edit):
pass
@iamstarkov
Copy link

I have this error, quite after adding folder with plugin to Packages folder:

Reloading plugin D:\Dropbox\programs\ST2\Data\Packages\STsync\stsync.py
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 103, in create_application_commands
    cmds.append(class_())
TypeError: __init__() takes no arguments (1 given)

@jfromaniello
Copy link
Author

def init(self):

@iamstarkov
Copy link

It is alive. You are a magician! Thank you for your patience and spent time.

import sublime, sublime_plugin
from subprocess import call


class TestCommand(sublime_plugin.ApplicationCommand):
    def __init__(self):
        super(TestCommand, self).__init__()
        #do your stuf here
        # call(["node", "app.js", "../User/"], Shell=true)
        call(["ping", "192.168.1.1"])

    def run(self, edit):
        pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment