How can I get tkinter imported? It all works when I’m testing without it being loaded as a plugin.
[code]import sublime, sublime_plugin
from Tkinter import *
from tkColorChooser import askcolor
class ColorPicker(sublime_plugin.WindowCommand):
def run(self):
getBgColor(self)
def getBgColor(self):
(triple, hexstr) = askColor()
if hexstr:
try:
if self.window.active_view():
self.window.active_view().run_command(“insert_hex”, {“hex” : hexstr})
except ValueError:
pass
class InsertHex(sublime_plugin.TextCommand):
def run(self, edit, hex):
self.view.replace(edit, region, str(hex))[/code]