summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2008-11-04 20:03:23 (GMT)
committer Jaromil <jaromil@dyne.org>2008-11-04 20:03:23 (GMT)
commit1a8e7ebde97d9b110aae3b60cb6968632af7e7dd (patch)
tree7a1da785b8a4a7b07ebe8860dc552980a30077d5
parent354b4b4dbac6b98baf2c421f977c37568570140f (diff)
running fix and docu for python GUI
-rw-r--r--pygui/README7
-rw-r--r--pygui/gtbt.py10
-rwxr-xr-xpygui/run.sh5
3 files changed, 18 insertions, 4 deletions
diff --git a/pygui/README b/pygui/README
new file mode 100644
index 0000000..8a22bdb
--- /dev/null
+++ b/pygui/README
@@ -0,0 +1,7 @@
+
+
+This python GUI implementation is by Pablo 'caedes' Martines
+
+it requires python, GTK and python-gtk
+
+
diff --git a/pygui/gtbt.py b/pygui/gtbt.py
index e415058..2f7cde3 100644
--- a/pygui/gtbt.py
+++ b/pygui/gtbt.py
@@ -50,7 +50,7 @@ def file_new(*args):
set_write_mode()
text_buffer.set_text("")
last_time = time.time()
- f = open("/tmp/.output.tbt","wb")
+ f = open("record.tbt","wb")
def do_open_file(widget,filesel):
global file
@@ -75,12 +75,12 @@ def do_save():
global f
# write from /tmp/.output.tbt to currfile
f.close()
- a = open("/tmp/.output.tbt","rb")
+ a = open("record.tbt","rb")
b = open(currfile,"w")
b.write(a.read())
b.close()
a.close()
- f = open("/tmp/.output.txt","wab")
+ f = open("record.txt","wab")
post("file saved: "+currfile)
def do_save_file(w,filesel):
@@ -251,7 +251,9 @@ text_buffer.connect("insert-text",insert_text)
text_buffer.connect("delete-range",delete_range)
text_buffer.connect("notify",cursor_position)
-file = "/tmp/.output.tbt"
+# default output file
+file = "record.tbt"
+
if len(sys.argv)>1 and sys.argv[-1].endswith("tbt"):
file = sys.argv[-1]
diff --git a/pygui/run.sh b/pygui/run.sh
new file mode 100755
index 0000000..5ba5f72
--- /dev/null
+++ b/pygui/run.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "Starting TBT GUI (python-GTK)"
+python gtbt.py $@
+