hi all.. python noob here.. i am creating a GUI for an applcation... now i was just testing the working of askstring :
[CODE=python]
from tkSimpleDialog import askstring
string=askstrin g('site','enter site:')
print string
[/CODE]
now.. an extra empty window just pops up.. so i include NoDefaultRoot in th \e following manner:
[CODE=python]
from Tkinter import *
NoDefaultRoot()
from tkSimpleDialog import askstring
string=askstrin g('site','enter site:')
print string
[/CODE]
it then gives the following set of errors:
Traceback (most recent call last):
File "./check2.py", line 5, in ?
string=askstrin g('site','enter site:')
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 304, in askstring
d = _QueryString(ti tle, prompt, **kw)
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 282, in __init__
_QueryDialog.__ init__(self, *args, **kw)
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 172, in __init__
parent = Tkinter._defaul t_root
AttributeError: 'module' object has no attribute '_default_root'
any idea whats wrog? or any alternative way to stop the default window from appearing?
[CODE=python]
from tkSimpleDialog import askstring
string=askstrin g('site','enter site:')
print string
[/CODE]
now.. an extra empty window just pops up.. so i include NoDefaultRoot in th \e following manner:
[CODE=python]
from Tkinter import *
NoDefaultRoot()
from tkSimpleDialog import askstring
string=askstrin g('site','enter site:')
print string
[/CODE]
it then gives the following set of errors:
Traceback (most recent call last):
File "./check2.py", line 5, in ?
string=askstrin g('site','enter site:')
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 304, in askstring
d = _QueryString(ti tle, prompt, **kw)
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 282, in __init__
_QueryDialog.__ init__(self, *args, **kw)
File "/usr/lib/python2.4/lib-tk/tkSimpleDialog. py", line 172, in __init__
parent = Tkinter._defaul t_root
AttributeError: 'module' object has no attribute '_default_root'
any idea whats wrog? or any alternative way to stop the default window from appearing?
Comment