Re: Error with Tkinter and tkMessageBox

2007-08-03 Thread Fabio Z Tessitore
Il Fri, 03 Aug 2007 12:38:09 +1000, John McMonagle ha scritto:

 Fabio Z Tessitore wrote:
 I've tried to use Twm and SURPRISE! it works!!!
 
 Can you say why? How can I fix the prob with Gnome?
 
 Thanks
 
 I don't know why it doesn't work correctly on the version of gnome which
 you are running (I run KDE).  Perhaps the question needs to be posed to
 a gnome group ?

Thank you, very much, John.
Best wishes.

Bye
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-08-02 Thread Fabio Z Tessitore
Il Thu, 02 Aug 2007 13:54:46 +1000, John McMonagle ha scritto:

 
 What window manager are you using ?

Hi John,

I'm using gnome, with gdm. Do you think the problem is this? I'm going to 
try with another one ... 

bye
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-08-02 Thread Fabio Z Tessitore
I've tried to use Twm and SURPRISE! it works!!!

Can you say why? How can I fix the prob with Gnome?

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-08-02 Thread John McMonagle
Fabio Z Tessitore wrote:
 I've tried to use Twm and SURPRISE! it works!!!
 
 Can you say why? How can I fix the prob with Gnome?
 
 Thanks

I don't know why it doesn't work correctly on the version of gnome which 
you are running (I run KDE).  Perhaps the question needs to be posed to 
a gnome group ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-08-01 Thread Fabio Z Tessitore
Il Tue, 31 Jul 2007 18:45:57 -0400, jim-on-linux ha scritto:

 Try This:
 
  def reply():
  showinfo('ciao','hello')
 

I've tried without success ... thanks

I've also discovered that when I (or some other prog using tkinter) 
display menu, the underscore is an ugly little black box. So, tkinter 
don't work fine on my machine. What a pity!

thanks, all, bye
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-08-01 Thread John McMonagle
Fabio Z Tessitore wrote:
 hi all,
 
 this Tkinter very simple code work fine:
 
 ##
 from Tkinter import *
 
 win = Tk()
 win.mainloop()
 ##
 
 but if I try to open a message box, it happens:
 
 Exception in Tkinter callback
 Traceback (most recent call last):
   File lib-tk/Tkinter.py, line 1348, in __call__
 return self.func(*args)
   File /home/fabio/Desktop/prova.py, line 5, in reply
 showinfo(title='ciao', message='hello')
   File lib-tk/tkMessageBox.py, line 84, in showinfo
 return _show(title, message, INFO, OK, **options)
   File lib-tk/tkMessageBox.py, line 75, in _show
 res = Message(**options).show()
   File lib-tk/tkCommonDialog.py, line 52, in show
 s = w.tk.call(self.command, *w._options(self.options))
 TclError: bad pad value 2m: must be positive screen distance
 
 
 ##
 from Tkinter import *
 from tkMessageBox import *
 
 def reply():
   showinfo(title='ciao', message='hello')
 
 win = Tk()
 but = Button(win, text='press me', command=reply)
 but.pack()
 win.mainloop()
 ##
 
 these are versions:
 
 python:   2.4.4 or 2.5.1
 Tkinter.TclVersion:   8.4
 Tkinter.TkVersion:8.4
 
 can anyone help me?
 thanks
 
What window manager are you using ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Error with Tkinter and tkMessageBox

2007-07-31 Thread Fabio Z Tessitore
hi all,

this Tkinter very simple code work fine:

##
from Tkinter import *

win = Tk()
win.mainloop()
##

but if I try to open a message box, it happens:

Exception in Tkinter callback
Traceback (most recent call last):
  File lib-tk/Tkinter.py, line 1348, in __call__
return self.func(*args)
  File /home/fabio/Desktop/prova.py, line 5, in reply
showinfo(title='ciao', message='hello')
  File lib-tk/tkMessageBox.py, line 84, in showinfo
return _show(title, message, INFO, OK, **options)
  File lib-tk/tkMessageBox.py, line 75, in _show
res = Message(**options).show()
  File lib-tk/tkCommonDialog.py, line 52, in show
s = w.tk.call(self.command, *w._options(self.options))
TclError: bad pad value 2m: must be positive screen distance


##
from Tkinter import *
from tkMessageBox import *

def reply():
showinfo(title='ciao', message='hello')

win = Tk()
but = Button(win, text='press me', command=reply)
but.pack()
win.mainloop()
##

these are versions:

python: 2.4.4 or 2.5.1
Tkinter.TclVersion: 8.4
Tkinter.TkVersion:  8.4

can anyone help me?
thanks

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-07-31 Thread kyosohma
On Jul 31, 12:30 pm, Fabio Z Tessitore [EMAIL PROTECTED]
wrote:
 hi all,

 this Tkinter very simple code work fine:

 ##
 from Tkinter import *

 win = Tk()
 win.mainloop()
 ##

 but if I try to open a message box, it happens:

 Exception in Tkinter callback
 Traceback (most recent call last):
   File lib-tk/Tkinter.py, line 1348, in __call__
 return self.func(*args)
   File /home/fabio/Desktop/prova.py, line 5, in reply
 showinfo(title='ciao', message='hello')
   File lib-tk/tkMessageBox.py, line 84, in showinfo
 return _show(title, message, INFO, OK, **options)
   File lib-tk/tkMessageBox.py, line 75, in _show
 res = Message(**options).show()
   File lib-tk/tkCommonDialog.py, line 52, in show
 s = w.tk.call(self.command, *w._options(self.options))
 TclError: bad pad value 2m: must be positive screen distance

 ##
 from Tkinter import *
 from tkMessageBox import *

 def reply():
 showinfo(title='ciao', message='hello')

 win = Tk()
 but = Button(win, text='press me', command=reply)
 but.pack()
 win.mainloop()
 ##

 these are versions:

 python: 2.4.4 or 2.5.1
 Tkinter.TclVersion: 8.4
 Tkinter.TkVersion:  8.4

 can anyone help me?
 thanks

I'm not sure, but I don't think you need the win variable at all. I
can get it to work as follows:

code

from Tkinter import *
from tkMessageBox import showinfo

def reply():
showinfo(title='ciao', message='hello')

Button(text='press me', command=reply).pack(fill=X)
mainloop()

/code

Mike

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-07-31 Thread Fabio Z Tessitore
Il Tue, 31 Jul 2007 19:12:48 +, kyosohma ha scritto:

 
 I'm not sure, but I don't think you need the win variable at all. I
 can get it to work as follows:
 
 code
 
 from Tkinter import *
 from tkMessageBox import showinfo
 
 def reply():
 showinfo(title='ciao', message='hello')
 
 Button(text='press me', command=reply).pack(fill=X) mainloop()
 
 /code
 
 Mike

You're right. But the problem I have is always there. Tkinter doesn't 
work properly and I don't understand why.
Thanks!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Error with Tkinter and tkMessageBox

2007-07-31 Thread jim-on-linux
On Tuesday 31 July 2007 15:24, Fabio Z Tessitore 
wrote:
 Il Tue, 31 Jul 2007 19:12:48 +, kyosohma ha 
scritto:
  I'm not sure, but I don't think you need the
  win variable at all. I can get it to work
  as follows:
 
  code
 
  from Tkinter import *
  from tkMessageBox import showinfo
 
  def reply():
  showinfo(title='ciao',
  message='hello')
 
  Button(text='press me',
  command=reply).pack(fill=X) mainloop()
 
  /code
 
  Mike

 You're right. But the problem I have is always
 there. Tkinter doesn't work properly and I
 don't understand why. Thanks!


Try This:

 def reply():
 showinfo('ciao','hello')

jim-on-linux
http://www.inqvista.com
-- 
http://mail.python.org/mailman/listinfo/python-list