View Single Post
Old Jul 8th, 2005, 6:45 PM   #2
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
First obvious crit - don't use Tkinter. It's inherently flawed and very slow (apparently its bound to Python via tcl, so two layers of interpreted language). Use a real GUI toolkit like wxPython or PyQt. Tkinter's many flaws can be found by Googling for it. Tkinter apps look horrifically ugly under Linux too.

Secondly - Don't hardcode paths like "C:\Lyrics" - there is no 'C:\' for me here, so I had to manually change everything to have a go.

Thirdly - More feedback. I entered my artist and song-name ("Smashing Pumpkins", "Cherry"), and then pressed Search. Nothing happened. I pressed Open Chosen File.. still nothing, except looking at Konsole showed me that you've got a bug for each. Here's the trackback:
Pressing "Search":
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "tkintergui.py", line 23, in Search
    os.startfile("%s\%s.html"% (path, "%s by %s"% (tracks, artists)))
AttributeError: 'module' object has no attribute 'startfile'
Pressing "Open Chosen File":
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "tkintergui.py", line 77, in OpenFile
    x = int(x)
ValueError: invalid literal for int():
Python version 2.4.1
Cerulean is offline   Reply With Quote