diff --git a/PrettyJson.py b/PrettyJson.py index 7c868ec..b69e833 100644 --- a/PrettyJson.py +++ b/PrettyJson.py @@ -41,3 +41,8 @@ class PrettyjsonCommand(sublime_plugin.TextCommand): import sys exc = sys.exc_info()[1] sublime.status_message(str(exc)) + + +def plugin_loaded(): + global s + s = sublime.load_settings("Pretty JSON.sublime-settings") \ No newline at end of file diff --git a/tests.py b/tests/tests.py similarity index 90% rename from tests.py rename to tests/tests.py index e264043..658e590 100644 --- a/tests.py +++ b/tests/tests.py @@ -1,5 +1,12 @@ -import simplejson as json -from simplejson import OrderedDict +try: + # python 3 / Sublime Text 3 + from . import simplejson as json + from .simplejson import OrderedDict +except (ValueError): + # python 2 / Sublime Text 2 + import simplejson as json + from simplejson import OrderedDict + import decimal import unittest