Re: Tkinter or Python issue?

2005-10-19 Thread Eric Brunel
On Tue, 18 Oct 2005 22:30:33 -0400, Ron Provost <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using python 2.4.2 on Win XP Pro. I'm trying to understand a behavior > I'm seeing in some Tkinter code I have. I've reduced my question to a small > piece of code: > > > #BEGIN CODE > ###

Re: Set an environment variable

2005-10-20 Thread Eric Brunel
On 20 Oct 2005 01:58:44 -0700, the_crazy88 <[EMAIL PROTECTED]> wrote: > Just use > os.system("export PYTHONPATH = %s" %("your_pythonpath")) ... except it won't work: os.system will execute the command in a new process, so the environment variable change will only be visible in *this* process. S

Re: Set an environment variable

2005-10-24 Thread Eric Brunel
On Fri, 21 Oct 2005 20:13:32 -, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-10-21, Mike Meyer <[EMAIL PROTECTED]> wrote: >> Grant Edwards <[EMAIL PROTECTED]> writes: >>> My point: the OP wanted to know how to export an environment >>> variable to a child process. Either of the lines of

Re: How to write an API for a Python application?

2005-11-16 Thread Eric Brunel
On 16 Nov 2005 06:18:05 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote: > Gary Kshepitzki wrote: >> I would like to create an API for a piece of Python code. The API is for use >> by non Python code. >> It should support interaction in both directions, both accessing functions >> on the API and the

Re: How to write an API for a Python application?

2005-11-17 Thread Eric Brunel
On Wed, 16 Nov 2005 15:43:33 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: > "Eric Brunel" <[EMAIL PROTECTED]> writes: >> On 16 Nov 2005 06:18:05 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote: >>> One technology that I used many years ago with Python,

Re: cosmetic Tkinter question

2005-01-03 Thread Eric Brunel
hy do you use frames? If you have only check-buttons in them, you do not need them: from Tkinter import * root = Tk() for i in range(0, 101, 20): b = Checkbutton(root, text='Option %s' % i) b.pack(side=TOP, anchor=W) root.mainloop() HTH -- - Eric Brunel - PragmaDev : Real Time Sof

Re: Tkinter zoom box

2005-01-03 Thread Eric Brunel
ot;regular" Tkinter widgets, so it must be built with some other one... Which one is it? A button, a menubutton, or what else? If you had some (simple) code showing the problem, that would also help a lot to understand what's going on... -- - Eric Brunel - PragmaDev : Real Time Sof

Re: Tkinter zoom box = maximize/unmaximize box/button

2005-01-03 Thread Eric Brunel
. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Puzzler

2005-01-07 Thread Eric Brunel
o the last command in the loop. To do what you want, change your code to: for entry in (...): UI.ShortBtn.menu.add_command( label=entry[0], command=lambda func=entry[1]: func(None) ) This way, the value for the func parameter is evaluated when the function is defined and not when

Re: PyChecker messages

2005-01-11 Thread Eric Brunel
Silencer(signal, dummy): ... the warning will not be triggered. BTW, if your signal handler is just here to catch Ctrl-C, you'd better do a try/except on KeyboardInterrupt... HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-23 Thread Eric Brunel
Hi all, I just found a problem in the xreadlines method/module when used with codecs.open: the codec specified in the open does not seem to be taken into account by xreadlines which also returns byte-strings instead of unicode strings. For example, if a file foo.txt contains some text encoded

Re: Frame widget (title and geometry)

2005-06-24 Thread Eric Brunel
On Fri, 24 Jun 2005 10:21:01 -0400, Shankar Iyer ([EMAIL PROTECTED]) <[EMAIL PROTECTED]> wrote: > Hi, > > I am still new to Python and Tkinter, so I apologize in advance if I do not > word my question optimally. I am trying to use a frame widget as the parent > for other widgets. There is a cla

Re: tkinter radiobutton

2005-06-26 Thread Eric Brunel
On Sat, 25 Jun 2005 19:34:50 GMT, William Gill <[EMAIL PROTECTED]> wrote: > I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep > references to them in a 2 dimensional list ( rBtns[r][c] ). It works > fine, and I can even make it so only one button per column can be > selected, by

Re: Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-28 Thread Eric Brunel
On Thu, 23 Jun 2005 14:23:34 +0200, Eric Brunel <[EMAIL PROTECTED]> wrote: > Hi all, > > I just found a problem in the xreadlines method/module when used with > codecs.open: the codec specified in the open does not seem to be taken into > account by xreadlines which also

Re: custom Tkinter ListBox selectMode

2005-07-03 Thread Eric Brunel
On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost <[EMAIL PROTECTED]> wrote: > Hello, > > I've written a simple GUI which contains a listbox to hold some information. > I've found that the click-selection schemes provided by Tkinter are > insufficient for my needs. Essentiall I need to impletement a

Re: Tkinter Checkbutton initialization problem

2005-07-04 Thread Eric Brunel
On 03 Jul 2005 02:32:21 -0700, Paul Rubin wrote: > Python 2.4, Windows XP. If I say: > > f = Frame() > f.grid() > v = IntVar() > c = Checkbutton(f, text='hi there', variable=v) > c.grid() > f.mainloop() > > then the checkbutton should initially d

Re: Tkinter grid layout

2005-07-06 Thread Eric Brunel
On Wed, 06 Jul 2005 11:44:55 +0100, Richard Lewis <[EMAIL PROTECTED]> wrote: > Hi there, > > I've got a tree control in Tkinter (using the ESRF Tree module) but I > can't get it to layout how I want it. > > I'd like to have it so that it streches north/south (anchored to the top > and bottom), is

Re: Tkinter grid layout

2005-07-07 Thread Eric Brunel
On Wed, 06 Jul 2005 16:32:42 GMT, William Gill <[EMAIL PROTECTED]> wrote: > Excuse me for intruding, but I followed examples and ended up with a > similar architecture: > > from Tkinter import * > class MyMain(Frame): > def __init__(self, master): > self.root = mast

Re: win32ui CreatePrintDialog

2005-07-18 Thread Eric Brunel
On Fri, 15 Jul 2005 18:08:35 -0400, Chris Lambacher <[EMAIL PROTECTED]> wrote: > Hi, > > This question has come up a few times on the list with no one giving a public > answer. How do you use CreatePrintDialog from win32ui? > > About a year ago someone posted that: > dlg = win32ui.CreatePrintDial

Re: main window in tkinter app

2005-07-18 Thread Eric Brunel
On Mon, 18 Jul 2005 16:57:51 GMT, William Gill <[EMAIL PROTECTED]> wrote: > A short while ago someone posted that(unlike the examples) you should > use Tk as the base for your main window in tkinter apps, not Frame. Thus : > >class MyMain(Frame): >def __init__(self, master): >

Re: Clearing a Text Widget

2005-07-25 Thread Eric Brunel
On Fri, 22 Jul 2005 23:42:52 -0400, Kane Bonnette <[EMAIL PROTECTED]> wrote: > Kane Bonnette wrote: >> Does anyone know how the clear the text from a Tkinter Text Widget? The >> delete(0, END) trick that works for Entry widgets doesn't work for Text >> >> I get "0 is an invalid index" when i try t

Re: Problem (or even bug?) with Tkinter

2005-08-19 Thread Eric Brunel
On Fri, 19 Aug 2005 09:53:20 +0100, Matt Hammond <[EMAIL PROTECTED]> wrote: > Here's a strange one in Tkinter that has me stumped: > (I'm running python 2.4 on Suse Linux 9.3 64bit) > > I'm trying to make a set of Entry widgets with Label widgets to the left > of each one, using the grid layout. I

Re: a question about tkinter StringVars()

2005-08-24 Thread Eric Brunel
On Wed, 24 Aug 2005 15:07:27 GMT, William Gill <[EMAIL PROTECTED]> wrote: > Working with tkinter, I have a createWidgets() method in a class. > Within createWidgets() I create several StringVars() and > assign them to the textvariable option of several widgets. > Effectively my code structure is:

Re: tkraise oddity

2005-08-24 Thread Eric Brunel
On 24 Aug 2005 06:57:07 -0700, twd <[EMAIL PROTECTED]> wrote: > I'm seeing some new and unexpected behaviour with tkinter + python2.4, > in a gnome+linux environment. The code below used to work (and > continues to work under windows). The intended behaviour is that a > window is created the the f

Re: file access dialog

2005-08-26 Thread Eric Brunel
On Fri, 26 Aug 2005 07:52:06 GMT, Wouter van Ooijen (www.voti.nl) <[EMAIL PROTECTED]> wrote: > I have a tool in Python to which I want to add a small GUI. The tools > currently runs everywhere PySerial is supported. I need a file-access > dialog. What is the preffered way to to this? Is there a >

Re: TKinter, Entry objects and dynamic naming

2005-09-13 Thread Eric Brunel
On 13 Sep 2005 08:51:47 +0100, Ian Vincent <[EMAIL PROTECTED]> wrote: > I am hoping someone may be able to help. > > I am using Python and TKinter to create a GUI program that will > eventually create an XML file for a project I am working on. Now, the XML > file contents changes depending on the

Re: Tkinter add_cascade option_add

2005-09-13 Thread Eric Brunel
On Tue, 13 Sep 2005 22:31:31 -0600, Bob Greschke <[EMAIL PROTECTED]> wrote: > Root.option_add("*?*font", "Helvetica 12 bold") > > Want to get rid of the "font =": > Widget.add_cascade(label = "File", menu = Fi, font = "Helvetica 12 bold") > > Does anyone know what ? should be to control th

Re: Tkinter add_cascade option_add

2005-09-15 Thread Eric Brunel
On Wed, 14 Sep 2005 09:58:25 -0600, Bob Greschke <[EMAIL PROTECTED]> wrote: > "Eric Brunel" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On Tue, 13 Sep 2005 22:31:31 -0600, Bob Greschke <[EMAIL PROTECTED]> wrote: >> >>

Re: tkinter menu bar problem

2005-02-09 Thread Eric Brunel
ms with a check-mark, use the add_checkbutton or add_radiobutton methods on the parent menu. Their use is similar to the Checkbutton and Radiobutton classes. See [1] for all available options. [1] http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter menu bar problem

2005-02-09 Thread Eric Brunel
ms with a check-mark, use the add_checkbutton or add_radiobutton methods on the parent menu. Their use is similar to the Checkbutton and Radiobutton classes. See [1] for all available options. [1] http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter option_add for menu radiobutton

2005-02-14 Thread Eric Brunel
black...the x.add_radiobutton() ones. Root.option_add("*Menu.Radiobutton*selectColor", "black")...nope Root.option_add("*Menu*selectColor", "black")...no change Strange... The last one works for me (as it should - see http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm

Re: Pmw.Balloon under Windows

2005-02-17 Thread Eric Brunel
since there is no "real" window manager, but from the tk/Tkinter point of view, the result is the same: you can't "fake" a window manager event using event_generate. BTW, what are the versions of Python, tk and Pmw you're using? HTH a little... - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Hello File.py

2005-02-18 Thread Eric Brunel
t. Feel free to note any horrors you see. Just one little thing: if you declare: def MenuOpen(parent): ... you'd better call it via: MenuOpen(root) and not: MenuOpen(parent=root) The 'parent=' stuff is unnecessary and may be confusing, since this syntax is often used only when you declare a function with keyword parameters like: def f(arg, **kwdParams): ... HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Mixing Txinter and Pygame

2005-02-22 Thread Eric Brunel
p://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm It unfortunately requires to know how to convert the tcl/tk syntax to Python/Tkinter syntax, but it is actually quite easy (mainly read "option=value" when the tcl/tk documentation says "-option value") HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Eric Brunel
l" or whatever buttons you want to use should then call dlg.destroy(). This will terminate the wait_window call and continue the execution of the code after it. HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Mixing Txinter and Pygame

2005-02-23 Thread Eric Brunel
On Wed, 23 Feb 2005 10:23:09 +1300, Tim Knauf <[EMAIL PROTECTED]> wrote: [snip] (When I'm starting on a language feature, though, I usually find I learn a lot more from worked examples than from straight command information. You may be interested in Tkinter best kept secret: the example scripts in

Re: Fonts

2005-02-28 Thread Eric Brunel
On Fri, 25 Feb 2005 11:00:41 -0600, phil <[EMAIL PROTECTED]> wrote: I'm cpmpletely lost on fonts. I'm using Tkinter I do medarial = '-*-Arial-Bold-*-*--24-*-*-*-ISO8859-1" or Courier or Fixed in various sizes. Works great on my RH 7.2 But a small embedded system Im working on, nothing seems to work

Re: Polling selections from a listbox (Tkinter)

2005-02-28 Thread Eric Brunel
On 26 Feb 2005 03:48:16 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: [snip] Obviously when this starts up this is going to show selection #0 inside the label box. How do I make sure that whatever is arbitrarily selected ends up in the label box as this gui runs? I tried doing a bind: self.listbo

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 01:06:48 -0800, Marion <[EMAIL PROTECTED]> wrote: Hello. I am using Tkinter and Pmw. I would like to build 2 canvases/frames that are scrollable together horizontally, and independently vertically (so, the vertical scrollbars should not be moved by the horizontal one). So I built a Pm

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 02:38:59 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: Pardon a question I should already know the answer to, but what are the *args in the: def xscrollboth(*args): c1.xview(*args) c2.xview(*args) Thanks, Harlin If your question is about the syntax, it's just the way of passin

Re: Setting default option values for Tkinter widgets

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 03:02:48 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit of tweaking I have been able to

Re: Tkinter Bitmap Newbie question

2005-03-15 Thread Eric Brunel
On Tue, 15 Mar 2005 00:00:57 GMT, Neil Hodgson <[EMAIL PROTECTED]> wrote: Wim Goffin: But just to make sure I'm on the right track, - Is XBM the best way to for bitmaps? The ones I saw so far are all black and white. Do they also exist in color? XPM is the version of XBM with colour. - Is XBM al

Re: (Tkinter) Adding delay to PopUpMsg

2005-03-18 Thread Eric Brunel
On 17 Mar 2005 23:40:20 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: I am working on making something called a PopMsg widget which is actually identical to a Balloon widget from Pmw. Here is the code: ---code--- from Tkinter import * import time class PopMsg: def showmsg(self, event):

Re: Problem with tkinter mainloop

2004-11-30 Thread Eric Brunel
ating the problem you have instead of just extracting a few lines of your whole code. This will help people who are willing to help to understand exactly what is going on. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 and Tkinter

2004-12-02 Thread Eric Brunel
ded to Python 2.4, I assume you had a working installation of a previous Python version. So the tcl/tk libraries and header files must be there somewhere. Did you look at your Modules/Setup for the older Python? If Tkinter was working with this version, the setup for the _tkinter module should

Re: Python 2.4 and Tkinter

2004-12-03 Thread Eric Brunel
phase, but then you have to put it in $LD_LIBRARY_PATH to be able to import the module. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie alert !

2004-12-03 Thread Eric Brunel
and as named parameters in the following ones? IMHO, since the parameters are positional in the function definition, you'd better pass them as such in the calls, i.e: rings(41, 0, -22, 'black') (Et sinon, il existe un newsgroup Python francophone (fr.comp.lang.python) sur le

Re: simple GUI question

2004-12-08 Thread Eric Brunel
e for the dialogs too...) So if you really want to do that, the simplest way is definetely to avoid using the tkMessageBox module and to design your own dialogs. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: spawn or fork

2004-12-08 Thread Eric Brunel
on Unices. What are you trying to do exactly? If you provide more explanations, we may provide a better help than the simplistic one above. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: spawn or fork

2004-12-08 Thread Eric Brunel
this instead of processes. See http://docs.python.org/lib/module-threading.html HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs: wxPython vs. Tkinter (and others)

2004-12-13 Thread Eric Brunel
works quite smoothly. Can you describe what happens to you exactly? -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Multithreading tkinter question

2004-12-17 Thread Eric Brunel
just goes out of the mainloop; it doesn't destroy the widgets. To do that, you have to add an explicit root.destroy() after root.mainloop() -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: scrollbar dependencies

2005-03-24 Thread Eric Brunel
On 24 Mar 2005 03:24:34 -0800, Marion <[EMAIL PROTECTED]> wrote: Next mystery : a picture drawn in the canvas c1 is scrollable. a picture-containing canvas "grided" in the canvas c1 is not. so why ??? Marion --- [snip] #---

Re: How to ensure Maximize button shows in Linux/Unix (Tkinter)

2005-03-29 Thread Eric Brunel
On 26 Mar 2005 08:19:07 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: Diez, Thanks for the quick reply. I am running this under KDE. I actually haven't tried doing so under any other wm for the moment. Any ideas how to get it to show in KDE? This is a tk bug; see: http://sourceforge.net/tracker/i

Re: tkinter destroy()

2005-03-29 Thread Eric Brunel
On Tue, 29 Mar 2005 10:37:10 GMT, max(01)* <[EMAIL PROTECTED]> wrote: hi people. when i create a widget, such as a toplevel window, and then i destroy it, how can i test that it has been destroyed? the problem is that even after it has been destroyed, the instance still exists and has a tkinter nam

Re: problem with tkinter

2005-03-30 Thread Eric Brunel
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel <[EMAIL PROTECTED]> wrote: Instead of indexing self.lab by strings, you can index them by the attributes themselves : self.lab[self.i], and change line 23 into for var in (self.s, self,i) I really think this is asking for trouble: I suppose t

Re: Things you shouldn't do

2005-03-30 Thread Eric Brunel
On Wed, 30 Mar 2005 07:02:57 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: Steve wrote: [an anecdote on distinguishing l1 and 11] What are some of other people's favourite tips for avoiding bugs in the first place, as opposed to finding them once you know they are there? There's a good book on this

Re: Simple Python + Tk text editor

2005-04-14 Thread Eric Brunel
On Thu, 14 Apr 2005 06:41:26 +0100, Jonathan Fine <[EMAIL PROTECTED]> wrote: [snip] And for my project (integration of Python and TeX) there is most unlikely to be a better one. Do you know the (apparently dead) project named e:doc? You can find it here: http://members.nextra.at/hfbuch/edoc/ It's a

Re: Tkinter Event Types

2005-04-19 Thread Eric Brunel
On 18 Apr 2005 13:48:50 -0700, codecraig <[EMAIL PROTECTED]> wrote: Hi, When I do something like. s = Scale(master) s.bind("", callback) def callback(self, event): print event.type I see "7" printed out. Where are these constants defined for various event types? Basically i want to do somet

Re: New to Tkinter...

2005-04-19 Thread Eric Brunel
On Tue, 19 Apr 2005 09:35:03 -0400, Peter G Carswell <[EMAIL PROTECTED]> wrote: Good Morning. I am new to Tkinter. I have been testing the installation of Tkinter through the python web site. The first two test steps give no errors, 'import _tkinter' and 'import Tkinter'. However, the third step, '

Re: Getting the sender widget's name in function (Tkinter)

2005-04-27 Thread Eric Brunel
On 26 Apr 2005 13:37:29 -0700, infidel <[EMAIL PROTECTED]> wrote: from Tkinter import Tk, Button def say_hello(event): print 'hello!' print event.widget['text'] root = Tk() button1 = Button(root, text='Button 1') button1.bind('', say_hello) button1.pack() button2 = Button(root, text='Button

Re: tkinter text width

2005-04-27 Thread Eric Brunel
On Tue, 26 Apr 2005 17:01:46 -0700, James Stroud <[EMAIL PROTECTED]> wrote: Hello All, I would like for a tkinter text widget to be aware of how big the frame that contains it is, then I would like for it to reset its width to the appropriate number of characters when this frame changes size. Errr.

Re: tkinter text width

2005-04-28 Thread Eric Brunel
On Wed, 27 Apr 2005 12:52:21 -0700, James Stroud <[EMAIL PROTECTED]> wrote: [snip] How might I query the size of a fixed-width font in pixles? It appears that the width of the font in points does not correlate with its width in pixels based on some simple expriments I have done. This is the case on

Re: tkinter text width

2005-04-29 Thread Eric Brunel
On Thu, 28 Apr 2005 16:14:02 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: On Thu, 28 Apr 2005 10:36:18 +0200, "Eric Brunel" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: This is the case on all platforms, but far more sensible on Windows: Windows attem

Re: Set initial size in TKinter

2011-12-20 Thread Eric Brunel
In article , Gabor Urban wrote: > Hi, > > I am quite newbie with Tkinter and I could not find the way to set the > size of the application. (I could find the method to make it > resizeable, though :-)) ) Any ideas, suggestions or links to > references are wellcome. Usually, the best way is to u

Re: Changing fill in tkinter

2006-01-13 Thread Eric Brunel
On 13 Jan 2006 01:43:42 -0800, venk <[EMAIL PROTECTED]> wrote: > Hi, > I would like to know how to change the fill of things we put in a > tkinter's canvas. for example, if i create a rectangle and i would want > to change the fill of the rectangle once it is clicked... can we do > that? Not

Re: Problems with Tkinter and threads

2006-07-17 Thread Eric Brunel
On Mon, 17 Jul 2006 12:58:08 +0200, Claus Tondering <[EMAIL PROTECTED]> wrote: > My Tkinter application has to receive events from a TCP connection. I > have chosen to do this in the following manner: > > The TCP communication takes place in a separate thread. When I receive > data, I generate a

Re: Problems with Tkinter and threads

2006-07-17 Thread Eric Brunel
On Mon, 17 Jul 2006 15:20:46 +0200, Claus Tondering <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: >> This is where the problem is: if you do just a event_generate without >> specifying the 'when' option, the binding is fired immediately in the >> curren

Re: tkinter wm_delete_window

2006-07-18 Thread Eric Brunel
On Tue, 18 Jul 2006 11:16:04 +0200, yvesd <[EMAIL PROTECTED]> wrote: > hello i want to intercept tkinter python system events like > wm_delete_window > and if possible for any window, but the newest code I've produced give > me > an error : > Traceback (most recent call last): > File "C:\Document

Re: Tkinter pack Problem

2006-07-26 Thread Eric Brunel
On Wed, 26 Jul 2006 12:46:39 +0200, H J van Rooyen <[EMAIL PROTECTED]> wrote: > Hi, > > I am struggling to get the pack method to do what I intend. > I am trying to display user input in a seperate window, along with > a little description of the field, something like this: > > Curr

Re: Strange Tkinter Grid behaviour Problem

2006-08-01 Thread Eric Brunel
On Tue, 01 Aug 2006 14:14:51 +0200, H J van Rooyen <[EMAIL PROTECTED]> wrote: > Hi, > > Still struggling with my GUI exercise - > > I have the following lines of code in a routine that is bound at > to > an instance of Entry : > > self.disp.Amount_des = Label(self.disp, text = self.di

Re: why the method get() of python Queue is hang on there?

2006-08-14 Thread Eric Brunel
On Mon, 14 Aug 2006 17:10:13 +0200, zxo102 <[EMAIL PROTECTED]> wrote: > Hi, >I am using Queue from python2.4. Here is what happen to me: > > import Queue > b = Queue.Queue(0) > b.put() > b.get() # this is ok, it pops out > b.get() # this one does not return anything and is hang on

Re: tkinter prob

2006-08-21 Thread Eric Brunel
On Mon, 21 Aug 2006 08:50:29 +0200, JyotiC <[EMAIL PROTECTED]> wrote: > i have tried it out but it's not working. > this is the code > > from Tkinter import * > > class abc: > def __init__(self,parent): > #make container myparent > self.myparent=parent > self.myparent.g

Re: Python/Tkinter crash.

2006-10-04 Thread Eric Brunel
On Wed, 04 Oct 2006 10:33:55 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > Hi, > > I get the following: > > [EMAIL PROTECTED]:~/Controller/lib> python display.py > UpdateStringProc should not be invoked for type font > Aborted > > and I am back at the bash prompt - this is most frustrat

Re: Python/Tkinter crash.

2006-10-05 Thread Eric Brunel
On Wed, 04 Oct 2006 20:02:56 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > "Eric Brunel" <[EMAIL PROTECTED]> wrote: >> I know the problem happens sometimes on one of my Tkinter applications, >> but I never succeeded in reproducing it systematical

Re: Long Tkinter Menu

2006-10-05 Thread Eric Brunel
On Thu, 05 Oct 2006 02:33:54 +0200, Dustan <[EMAIL PROTECTED]> wrote: > I don't know if this is because of Tkinter (ie Tk) itself or the > Windows default way of handling things, but when I create a very long > menu (my test is shown below), the way it displays is rather sucky; the > menu stretche

Re: Tkinter: Making a window disappear

2006-10-10 Thread Eric Brunel
On Mon, 09 Oct 2006 11:08:39 +0200, Claus Tondering <[EMAIL PROTECTED]> wrote: > I just solved the problem myself: > > I wrote: >> self.destroy() > > Writing "self.master.destroy()" instead does the trick. As an alternative (which is better IMHO), you may consider specializing Top

Re: Tkinter: populating Mac Help menu?

2006-10-11 Thread Eric Brunel
On Tue, 10 Oct 2006 14:29:46 +0200, Edward K. Ream <[EMAIL PROTECTED]> wrote: [snip] > So given x (a string), how does one create a widget whose name is > '%s.help' > % x ? This is a can of corn in Tk, but nothing comes to mind looking at > the > Tkinter source code. Use the 'name' keyword

Re: Tkinter question

2006-10-24 Thread Eric Brunel
On Tue, 24 Oct 2006 07:48:51 +0200, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > Sorin Schwimmer wrote: > Hi All, > > Is it possible to have a widget id while it is created? > Something like this: > > Button(root, text='...', command= lambda v=: fn(v)).grid() > > and then the function: > > d

Re: python GUIs comparison (want)

2006-11-06 Thread Eric Brunel
On Wed, 25 Oct 2006 11:04:57 +0200, Christophe <[EMAIL PROTECTED]> wrote: >>> And no modern layout manager available. Only those old school >>> left/right/up/down pack and anchors are available. >> huh? when did you last look at Tk? 1994? > Yesterday. In fact, I could find no mention at all

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread Eric Brunel
On Wed, 08 Nov 2006 20:01:08 +0100, <[EMAIL PROTECTED]> wrote: > Hello, > I am working on a school project that requires me to get the path of a > filename for future treatment. > I've tried getting a file with tkFileDialog.askopenfile. > > > > import t

Re: Problem getting a file pathname with tkFileDialog

2006-11-09 Thread Eric Brunel
On Wed, 08 Nov 2006 21:59:38 +0100, Tim Daneliuk <[EMAIL PROTECTED]> wrote: > Sefyroth wrote: >> Thanks, >> but I get this error when I try this. >> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in >> position 12: ordinal not in range(128) >> I had encountered it with the

Re: How to choose the right GUI toolkit ?

2006-11-10 Thread Eric Brunel
On Thu, 09 Nov 2006 23:51:31 +0100, Dan Lenski <[EMAIL PROTECTED]> wrote: > One other thing I'm wondering: how exactly does Tkinter work? Is the > whole Tk toolkit bound up as library of low-level C code, or does > Tkinter sit on top of a Tcl interpreter? The latter: there is a tiny C layer allo

Re: How to choose the right GUI toolkit ?

2006-11-10 Thread Eric Brunel
On Thu, 09 Nov 2006 22:01:51 +0100, Dan Lenski <[EMAIL PROTECTED]> wrote: > Tk 8.4 appears to use native Win32 widgets under Cygwin and native > WinXP. It seems to depend on the widget type, and on what you call native... For example, tk menus are definitely the native ones; tk scrollbars are th

Re: CORBA: Fnorb Problems

2006-11-13 Thread Eric Brunel
On Mon, 13 Nov 2006 16:16:37 +0100, rodmc <[EMAIL PROTECTED]> wrote: > Hi, > > I have installed Fnorb and everything seems to have gone ok. However I > keep getting the error message below. This is despite the fact that the > MS CL c++ preprocessor seems to be in PATH. I can type "cl" and > alth

Re: CORBA: Fnorb Problems

2006-11-14 Thread Eric Brunel
On Tue, 14 Nov 2006 13:13:42 +0100, rodmc <[EMAIL PROTECTED]> wrote: >> > >> > Traceback (most recent call last): >> > File "C:\Python24\Lib\site-packages\Fnorb\script\cpp.py", line 53, >> in >> > -toplevel- >> > raise "No C/C++ pre-processor found in your PATH!" >> > No C/C++ pre-proces

Re: Tkinter: Strange behavior using place() and changing cursors

2006-11-15 Thread Eric Brunel
On Tue, 14 Nov 2006 17:45:52 +0100, Mudcat <[EMAIL PROTECTED]> wrote: > The problem is I need the ability to change it dynamically. I don't > want the cursor to be the double_arrow the whole time the mouse hovers > inside that frame. It's supposed to be a resize arrow when the mouse is > on the fra

Re: How to use tk.call ?

2006-05-30 Thread Eric Brunel
On 29 May 2006 21:13:07 -0700, <[EMAIL PROTECTED]> wrote: >>> self.table.bind("",self.table.tk.call(self.table._w,'yview','scroll',-5,'units') > >> I haven't used Table, but are you sure that what you are calling >> "self.table" here actually has mouse focus? > >> James > > Yup, I click on the tab

Re: How to use tk.call ?

2006-05-30 Thread Eric Brunel
On 30 May 2006 05:51:04 -0700, <[EMAIL PROTECTED]> wrote: > Eric, > > Thanks, your tip did the trick... Is there someplace where tk.call is > discussed? I don't think so. I personnally never find any documentation on it. But there is not much to say: you can just pass regular tcl commands throu

Function mistaken for a method

2006-06-01 Thread Eric Brunel
Hi all, I just stepped on a thing that I can't explain. Here is some code showing the problem: - class C: f = None def __init__(self): if self.f is not None: self.x = self.f(0) else: self.x = 0 class C1(C): f = int class C2(C): f

Re: Function mistaken for a method

2006-06-01 Thread Eric Brunel
On Thu, 01 Jun 2006 13:34:53 +0200, Peter Otten <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: > >> My actual question is: why does it work in one case and not in the >> other? >> As I see it, int is just a function with one parameter, and the lambda >>

Re: Function mistaken for a method

2006-06-01 Thread Eric Brunel
On Thu, 01 Jun 2006 15:07:26 +0200, bruno at modulix <[EMAIL PROTECTED]> wrote: > Do yourself a favour : use new-style classes. > class C(object) I would if I could: I'm stuck with Python 2.1 for the moment (I should have mentionned it; sorry for that). [snip] >> Basically, I want an optional

Re: GUI Program Error

2006-06-08 Thread Eric Brunel
On Wed, 07 Jun 2006 17:38:39 GMT, John Salerno <[EMAIL PROTECTED]> wrote: [snip] > But I will agree with you that it is confusing when it says, following > the top = Tk() line, "Notice that a new blank window has appeared", > because as you noticed, nothing appears yet. My only guess is that

Re: Making a Label that looks the same as a button.

2006-06-13 Thread Eric Brunel
On 13 Jun 2006 06:14:03 -0700, Dustan <[EMAIL PROTECTED]> wrote: > I have a Button object that gets replaced by a Label when clicked. > > Button(buttonsframe,text=' ',command=c,font=buttonsFont) > Note that the text is a single space. buttonsFont uses 'Courier New' as > a family. > > When clicked,

Re: Tkinter - Button Overrelief

2006-06-27 Thread Eric Brunel
On Tue, 27 Jun 2006 14:06:05 +0200, Fuzzyman <[EMAIL PROTECTED]> wrote: > Hello all, > > I have some Tkinter buttons that display images. I would like to change > these to 'active' images when the mouse is over the button. > > I see that the button widget can take an 'overrelief' argument in the >

Re: simple script - Tkinter question.

2006-07-03 Thread Eric Brunel
On Tue, 04 Jul 2006 05:02:39 +0200, jkuo22 <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Here is my simple Tkinter script: > > ## start of entry.py > from Tkinter import * > root=Tk() > e1=Entry(root, width=16) > e1.pack() > e2=Entry(root, width=16) > e2.pack() > mainloop() > ## end > > First, it

Re: Help Needed !!! Browsing and Selecting More Than One File

2006-07-06 Thread Eric Brunel
(Please quote at least a significant part of the message you're replying to, or people will have trouble understanding what you're talking about...) On Thu, 06 Jul 2006 15:42:28 +0200, Kilicaslan Fatih <[EMAIL PROTECTED]> wrote: > Dear Diez B. Roggisch, > > After clicking a button on the GUI t

Re: Python and CORBA

2006-09-21 Thread Eric Brunel
On Thu, 21 Sep 2006 10:48:55 +0200, rodmc <[EMAIL PROTECTED]> wrote: > Can anyone recommend an easy to install COBRA implementation which > works with Python? I am using Windows XP. I used to use fnorb (http://sourceforge.net/projects/fnorb), but the project seems to be dead. It still seems t

Re: Python and CORBA

2006-09-22 Thread Eric Brunel
On Thu, 21 Sep 2006 15:11:07 +0200, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > AFAIK Fnorb also had license issues - I'm not entirely sure of that, but > better check it. The earlier versions seem to have been somewhat proprietary, but the latest one should be as free as Python is. Extract

Re: How to change menu text with Tkinter?

2006-09-27 Thread Eric Brunel
On Wed, 27 Sep 2006 15:29:32 +0200, Phil Schmidt <[EMAIL PROTECTED]> wrote: > I am making a little Tkinter GUI app that needs to be in several > languages (english, french, etc.), adjustable at runtime via a menu > pick to select the language. The only way I can see to change text in > the menus

  1   2   3   >