Commits

Atsushi Odagiri committed 614c25d Draft

prep for 0.1.2

  • Participants
  • Parent commits 9bac4d7
  • Tags bucho-0.1.2

Comments (0)

Files changed (3)

 \.py[co]$
 \.so$
 ^env/
+.tox
+include HISTORY.txt
 from bucho.compat import Tkinter as tk
 
-class BuchoFrame(tk.Frame):
-    def __init__(self, text):
-        tk.Frame.__init__(self)
-        self.text = text
-        self.init_view()
-
-    def init_view(self):
-        self.text_view = tk.Text(self)
-        self.text_view.insert(tk.END, self.text)
-        self.text_view.configure(state=tk.DISABLED)
-        self.text_view.pack(fill=tk.BOTH, expand=True)
-
-        
-    def run(self):
-        self.pack(fill=tk.BOTH, expand=True)
-        self.mainloop()
+if tk:
+    class BuchoFrame(tk.Frame):
+        def __init__(self, text):
+            tk.Frame.__init__(self)
+            self.text = text
+            self.init_view()
+    
+        def init_view(self):
+            self.text_view = tk.Text(self)
+            self.text_view.insert(tk.END, self.text)
+            self.text_view.configure(state=tk.DISABLED)
+            self.text_view.pack(fill=tk.BOTH, expand=True)
+    
+            
+        def run(self):
+            self.pack(fill=tk.BOTH, expand=True)
+            self.mainloop()