tools v1.3
This commit is contained in:
@@ -31,7 +31,9 @@ class MainDialog(Tkinter.Frame):
|
||||
Tkinter.Label(body, text='Directory you Extracted Topaz Files into').grid(row=0, sticky=Tkconstants.E)
|
||||
self.bookdir = Tkinter.Entry(body, width=50)
|
||||
self.bookdir.grid(row=0, column=1, sticky=sticky)
|
||||
self.bookdir.insert(0, os.getcwd())
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
self.bookdir.insert(0, cwd)
|
||||
button = Tkinter.Button(body, text="...", command=self.get_bookdir)
|
||||
button.grid(row=0, column=2)
|
||||
|
||||
@@ -76,6 +78,7 @@ class MainDialog(Tkinter.Frame):
|
||||
# post output from subprocess in scrolled text widget
|
||||
def showCmdOutput(self, msg):
|
||||
if msg and msg !='':
|
||||
msg = msg.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,msg)
|
||||
self.stext.yview_pickplace(Tkconstants.END)
|
||||
return
|
||||
@@ -92,14 +95,17 @@ class MainDialog(Tkinter.Frame):
|
||||
else :
|
||||
cmdline = 'lib\genhtml.py "' + bookdir + '"'
|
||||
|
||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=PIPE, stderr=PIPE, close_fds=False)
|
||||
return p2
|
||||
|
||||
|
||||
def get_bookdir(self):
|
||||
cwd = os.getcwdu()
|
||||
cwd = cwd.encode('utf-8')
|
||||
bookdir = tkFileDialog.askdirectory(
|
||||
parent=None, title='Select the Directory you Extracted Topaz Files into',
|
||||
initialdir=os.getcwd(), initialfile=None)
|
||||
initialdir=cwd, initialfile=None)
|
||||
if bookdir:
|
||||
bookdir = os.path.normpath(bookdir)
|
||||
self.bookdir.delete(0, Tkconstants.END)
|
||||
@@ -127,6 +133,7 @@ class MainDialog(Tkinter.Frame):
|
||||
log += 'Book Directory = "' + bookdir + '"\n'
|
||||
log += '\n\n'
|
||||
log += 'Please Wait ...\n'
|
||||
log = log.encode('utf-8')
|
||||
self.stext.insert(Tkconstants.END,log)
|
||||
self.p2 = self.topazrdr(bookdir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user