Re: tkinter icons as bytestrings, not files?

2009-02-24 Thread Eric Brunel
On Tue, 24 Feb 2009 05:56:12 +0100, Peter Billam wrote: Greetings, As a newbie, starting with Python3, I'm working my way through Mark Summerfield's tkinter examples. In the toolbar, there's lines like: for image, command in ( ('images/filenew.gif', self.fileNew), ('ima

Re: tkinter: loading file before entering mainloop

2009-03-16 Thread Eric Brunel
Peter Billam wrote: >> Peter Billam wrote: >> window = MainWindow(application) >> if (len(sys.argv) > 1) and os.path.exists(sys.argv[1]): >> window.loadFile(sys.argv[1]) >> application.mainloop() >> File "./midimix", line 465, in loadFile >> space0.grid(row=grid_row, >> pady=

Re: Emulate a printf() C-statement in Python???

2009-03-19 Thread Eric Brunel
Mr. Z wrote: > I'm trying emulate a printf() c statement that does, for example > > char* name="Chris"; > int age=30; > printf("My name is %s", name); > printf("My name is %s and I am %d years old.", %s, %d); > > In other words, printf() has a variable arguement list the we > all know. > > I'm tryi

Re: Threading and tkinter

2009-03-27 Thread Eric Brunel
(Sorry: replying to the wrong message here, but my newsreader somehow managed to miss the former post...) > On Mar 7, 9:40 am, Jani Hakala wrote: >> > After reading the docs and seeing a few examples i think this should >> > work ? >> > Am I forgetting something here or am I doing something stupi

Re: tkinter questions: behavior of StringVar, etc

2009-03-30 Thread Eric Brunel
Alan G Isaac wrote: [snip] > PS If you were also offering an answer to the second question, > I missed it altogether, but although it is perhaps slightly > less obvious than with a StringVar, I would ask the same > basic question of an IntVar: why does it not behave more > like an int? E.g., why i

Re: tkinter questions: behavior of StringVar, etc

2009-03-30 Thread Eric Brunel
Alan G Isaac wrote: > I'm a complete newbie to GUI. > I have a couple questions about tkinter. > > 1. Where is the list of changes > in Python 3's tkinter? I'll let someone else answer this as I don't use Python 3 myself. I guess there are not many. > 2. What exactly is the role of the root o

Re: tkinter questions: behavior of StringVar, etc

2009-03-30 Thread Eric Brunel
Alan G Isaac wrote: [snip] > On 3/30/2009 3:37 AM Eric Brunel apparently wrote: >> The Tk instance is registered in a hidden variable in the Tkinter module. When >> you don't specify a master, it'll use the latest created Tk instance one by >> default. BTW, the lates

Re: Help for Toplevel

2009-04-02 Thread Eric Brunel
Muddy Coder wrote: > Hi Folks, > > I have a problem of handling Toplevel window. Basically, I wrote a > listbox viewer with scrollbars, and saved in file listbo.py. Then in > my main GUI window, with menu, I need to launch the listbox viewer, in > a new window. Obviously, a Toplevel window is neede

Re: How can I change size of GUI?

2009-04-07 Thread Eric Brunel
Muddy Coder wrote: > Hi Folks, > > I copied code from book: > > class ScrolledText(Frame): > def __init__(self, parent=None, text='', file=None): > Frame.__init__(self, parent) > self.pack(expand=YES, fill=BOTH) > self.makeWidgets() > self.settext(text, file) >

Re: PIL\Tkinter and Transparencies, Rubber Lines, and Dragging Image Objects

2009-04-07 Thread Eric Brunel
W. eWatson wrote: > Basically, I'd like to know how one (broadly, e.g., references in Win-land) > does IP (image processing) and drawing techniques such as rubber lines, and > dragging image objects across the canvas. I know there are some pretty > powerful toolkits out there, but I'd like to limit

Re: Where to find options for add_command?

2009-04-16 Thread Eric Brunel
Muddy Coder wrote: > Hi Folks, > > When I make Menu, and add in menu items, by using add_command, such > as: > > menuObj.add_command(label='Open File', command=self.open_file) > > It works. But, I want to make the GUI looking better. So, I want to > change color, font, size, background, for the lab

Re: Python is slow

2008-05-23 Thread Eric Brunel
On Fri, 23 May 2008 12:48:56 +0200, > wrote: "inhahe" <[EMAIL PROTECTED]> writes: planets are spherical (all implementations of Python are not natively compiled (and you said for whatever definition)), and b) It's a far cry to imagine a planet coming into being that's not spherical (a langua

Re: inheritance question...

2008-06-23 Thread Eric Brunel
Preamble: when posting a brand new question, you'd better not replying to an existing completely unrelated message. In most viewers, this will cause your message to appear in the thread for the original question and far less people will see it. So better create a brand new thread. On Fri, 2

Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"

2008-06-30 Thread Eric Brunel
On Sun, 29 Jun 2008 13:34:37 +0200, defn noob <[EMAIL PROTECTED]> wrote: from Tkinter import * import os master = Tk() w = Canvas(master, width=800, height=600) print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg') im = PhotoImage(file = 'C:/users/saftarn/desktop/images/blob4.jpg')

Re: Tkinter Entry widgets 'font' property (API ?) changed in Python 2.5.2 ?

2008-08-06 Thread Eric Brunel
On Wed, 06 Aug 2008 06:01:59 +0200, Atul <[EMAIL PROTECTED]> wrote: Hi, The snippet : entryFontDescr = Entry()["font"] print self.entryFontDescr On Windows XP it displays {MS Sans Serif} 8 On Suse Linux 10.2 it used to display TkTextFont 10 I upgraded to OpenSuse 11 and now it shows TkTe

Re: Second python program: classes, sorting

2008-08-11 Thread Eric Brunel
Others have replied to your original question. As an aside, just a few stylistic notes: class Score: def __init__(self, name_, score_): self.name = name_ self.score = score_ These trailing underscores look like a habit from another language. They are unneeded in Pyth

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Eric Brunel
On Wed, 13 Aug 2008 19:10:47 +0200, Mudcat <[EMAIL PROTECTED]> wrote: [snip] I was reading about Tile, and it sounds like I should be able to wrap a style around my current code to give it a different look. However it doesn't sound like it's quite ready for prime time yet. I downloaded the latest

Re: Tkinter tab focus traversal causes listbox selection to clear, ie, lose the selected item

2008-08-14 Thread Eric Brunel
On Thu, 14 Aug 2008 04:49:51 +0200, Gerardo ARnaez <[EMAIL PROTECTED]> wrote: Hi. I am writing a program to help determine coumadin regimens to look at the code: http://sourceforge.net/projects/coumadinregimen/ The issue is that I have a variable that I want the use to select if they don't li

Re: 答复: how to remove \n in the list

2008-04-14 Thread Eric Brunel
(please avoid top-posting... corrected) On Mon, 14 Apr 2008 09:08:06 +0200, Penny Y. <[EMAIL PROTECTED]> wrote: > -邮件原件- > 发件人: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] 代表 Gabriel > Genellina > 发送时间: 2008年4月14日 12:59 > 收件人: python-list@python.org > 主题: Re: how to remove \n in the list

Re: Learning Tkinter

2008-04-17 Thread Eric Brunel
On Wed, 16 Apr 2008 14:46:13 +0200, Doran, Harold <[EMAIL PROTECTED]> wrote: [snip] > Second, I am trying to work through a couple of the examples and make > some small tweaks as I go to see how new things can work. In the first > case, I have copied the code in the book to see how the menu works a

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-29 Thread Eric Brunel
On Tue, 29 Apr 2008 15:22:12 +0200, blaine <[EMAIL PROTECTED]> wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is well, except one thing. When

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Tue, 29 Apr 2008 17:09:18 +0200, blaine <[EMAIL PROTECTED]> wrote: [snip] I'll try the update() again. I would want to use that on the canvas itself right? Not the root window? Well, in fact, there is no difference at all... In tcl/tk, update is a function, and isn't applied to a particul

Re: Simple TK Question - refreshing the canvas when not in focus

2008-04-30 Thread Eric Brunel
On Wed, 30 Apr 2008 10:58:06 +0200, Robert.Spilleboudt <[EMAIL PROTECTED]> wrote: blaine wrote: Hey everyone! I'm not very good with Tk, and I am using a very simple canvas to draw some pictures (this relates to that nokia screen emulator I had a post about a few days ago). Anyway, all is

Re: Simple TK Question - refreshing the canvas when not in focus

2008-05-02 Thread Eric Brunel
On Wed, 30 Apr 2008 20:19:32 +0200, blaine <[EMAIL PROTECTED]> wrote: On Apr 30, 10:41 am, Peter Otten <[EMAIL PROTECTED]> wrote: blaine wrote: > Still doesn't work. I'm looking into using wx instead... > This is the full code - does it work for anyone else? Just do a echo > 'line 0 0 10 10'

Re: Handling Property and internal ('__') attribute inheritance and creation

2008-08-19 Thread Eric Brunel
On Fri, 15 Aug 2008 20:02:36 +0200, Rafe <[EMAIL PROTECTED]> wrote: [snip] 1) 'Declaring' attributes - I always felt it was good code practice to declare attributes in a section of the class namespace. I set anything that is constant but anything variable is set again in __init__(): Class A(obj

Re: Tkinter Unix and Windows incompatibility

2008-08-27 Thread Eric Brunel
On Wed, 27 Aug 2008 06:50:30 +0200, akineko <[EMAIL PROTECTED]> wrote: Hello everyone, I'm trying to create custom Tkinter/Pmw widgets for my project. After testing my widgets under Unix (Solaris), I have tried them under Windows and I got a surprise. The widgets came out differently. The follo

Re: Python is slow?

2008-09-24 Thread Eric Brunel
On Tue, 23 Sep 2008 15:23:12 +0200, sturlamolden <[EMAIL PROTECTED]> wrote: [...] Would it be possible to post this text to some "persistent" web page with (links to) the code you wrote in both languages? This would be a very interesting resource for people experiencing some resistence when

Re: tkinter textwidget problem

2008-10-03 Thread Eric Brunel
On Thu, 02 Oct 2008 21:57:01 +0200, kib2 <[EMAIL PROTECTED]> wrote: Hi, In a tkinter TextWidget I would like to retrieve the last typed word. I've tried this with the 'wordstart' Expression [From the effbot site, "wordstart" and "wordend" moves the index to the beginning (end) of the curren

Re: Which GUI toolkit is THE best?

2006-03-10 Thread Eric Brunel
On Fri, 10 Mar 2006 13:36:18 +0100, invitro81 <[EMAIL PROTECTED]> wrote: > Hello > > I've recently learnt python and I do love it! I congratulate all those > geeks who produce this nice language; well, because I could be called a > nearby newbee I've decided to improve my abilities by writing

Re: Is it better to use class variables or pass parameters?

2006-03-16 Thread Eric Brunel
On 15 Mar 2006 15:04:19 -0800, Derek Basch <[EMAIL PROTECTED]> wrote: > One more question everybody. Say you have a class that performs a > series of evaluations on several strings of peptides. Errr..., no? A class does not perform some operations. A class is a template for objects. What are yo

Re: tkinter question

2006-03-27 Thread Eric Brunel
On 27 Mar 2006 15:15:05 -0800, <[EMAIL PROTECTED]> wrote: > Hi > > I have a tkinter question. In the following script the window will not > display until the script has finished executing. It appears at the same > time as the output "script finished". How can I make it appear > immediately, with t

Re: tkinter question

2006-03-30 Thread Eric Brunel
(Please quote a part of the message you're replying to; I had problems figuring out you were replying to my post...) On 29 Mar 2006 14:08:02 -0800, <[EMAIL PROTECTED]> wrote: > Ultimately what I am trying to is create a public computer session > manager. > > 1) User logs in and main application

Re: GUI in python

2006-03-30 Thread Eric Brunel
On 29 Mar 2006 14:20:03 -0800, <[EMAIL PROTECTED]> wrote: > Hi, > > I am a python newbie and have used it for about a month. I want to make > a simple GUI app in Python ( I take input form user and do processing > and show results). > > Which gui package is good for me. I need to do it quick and I

Re: tkinter question

2006-03-30 Thread Eric Brunel
On 30 Mar 2006 15:11:19 -0800, <[EMAIL PROTECTED]> wrote: >> If you just create >> a Toplevel and populate it with widgets, it will just display once the >> control is returned to the Tkinter mainloop and no user input will be >> needed. > > Thanks for explaining that. I borrowed the "after" method

Re: Decorate un Frame with window managers title bar, etc en Tkinter 8.5

2010-12-02 Thread Eric Brunel
In article , craf wrote: > Hi. > > I use python 3.1 and Tkinter 8.5 in Ubuntu 9.10 > > I would like to turn a frame into a toolbox, > ,and for that I read that you can use the command wm manage (window) > > The information can be found at: > http://www.tcl.tk/man/tcl8.5/TkCmd/wm.htm#M39 >

Re: Using a window style in a Toplevel window

2010-12-09 Thread Eric Brunel
In article , craf wrote: > Hi. > > I use Python 3.1 and Tkinter.ttk 8.5 on Ubuntu 9.10. > > CODE: > > module:FMain.py > > from tkinter import ttk > from FSecondWindow import * > > class App: > def __init__(self,master): > > bu

Re: Using a window style in a Toplevel window

2010-12-09 Thread Eric Brunel
In article , pyt...@bdurham.com wrote: > Eric, > > Besides style support, what are the advantages of ttk.Frame vs. > Tkinter.Frame? I'd say none. They are both just containers for other widgets, support the same layout managers, and so on. For me, using a ttk.Frame is really just for getting

Re: Another related OO Python ?

2011-02-16 Thread Eric Brunel
In article , Doug Epling wrote: > hey, does anyone find the UML useful during Python development of larger > projects? Well, UML being very Java/C++ oriented, I found out that Python idioms were really difficult to represent in the diagrams. So I'm using it to a very small extent and for doc

Re: How does IDLE do it?

2011-02-16 Thread Eric Brunel
In article , "Richard D. Moores" wrote: > I recently wrote some code that prints information about the 'jukugo' > used in Japanese newspaper articles. A jukugo is a Japanese word > written with at least 2 kanji. An example of a 2-kanji jukugo is 危機 > (kiki -- crisis). I found that I could no

Re: Another related OO Python ?

2011-02-16 Thread Eric Brunel
In article <6849fd3f-5116-4b35-b274-dc76ae39f...@a11g2000pro.googlegroups.com>, RJB wrote: > On Feb 16, 12:48 am, Eric Brunel > wrote: > > In article , > >  Doug Epling wrote: > > > > > hey, does anyone find the UML useful during Python development of l

Re: File Manager in Tkinter

2010-08-10 Thread Eric Brunel
In article , John wrote: > As a learning exercise in Tkinter I htought about making a very simple > and basic file manager for my own use. I tried searching google for > any sample project and could not find anything. Not exactly sure how > to start I tought I could ask here? > > I thought abou

Re: File Manager in Tkinter

2010-08-11 Thread Eric Brunel
In article <770366ta10gk98vgd5n2tapl7ag6ska...@4ax.com>, John wrote: > My python is version 2.6.5. Would you recomend I upgrade and if yes > to which version? > > > from tkinter import ttk > > Traceback (most recent call last): > File "", line 1, in > from tkinter import ttk > ImportErro

Re: Python Tkinter Simple Qn

2010-08-12 Thread Eric Brunel
In article , ChrisChia wrote: > Hi i have the following problem with Python Tkinter. > I switch to switch the image background (which i used Tkinter.Label > with image arg to display on the GUI). > > How can I do that? the callback function which i have created doesn't > seem to work... It is

Re: __class__ of what

2010-08-12 Thread Eric Brunel
In article <72151646-65cb-47bb-bd55-e7eb67577...@z10g2000yqb.googlegroups.com>, "Eric J. Van der Velden" wrote: > Hello, > > I have, > > class C: > n=0 > def __init__(s): > __class__.n+=1 > > > I do > >>> C() > > This is fine. No it's not, at least in Pytho

Re: how to switch image in tkinter? making it mutable? how?

2010-08-16 Thread Eric Brunel
In article <414ff6dd-73ef-48df-bd2b-080a2c710...@h17g2000pri.googlegroups.com>, ChrisChia wrote: > I have this: > image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg") > image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg") > > imagelist.append(image1) > imagelist.append(image2) > > self.label = tk.La

Re: Textvariable display in label (GUI design)

2010-08-16 Thread Eric Brunel
In article <993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>, Jah_Alarm wrote: > hi, > > pls help me out with the following issue: I wrote a function that uses > a for loop that changes a value of a certain variable each iteration. > What I want is by clicking a button in GUI

Re: update of elements in GUI

2010-08-17 Thread Eric Brunel
In article <24dc97b3-a8b5-4638-9cf5-a397f1eae...@q16g2000prf.googlegroups.com>, Jah_Alarm wrote: > hi, I've already asked this question but so far the progress has been > small. > > I'm running Tkinter. I have some elements on the screen (Labels, most > importantly) which content has to be upd

Re: Textvariable display in label (GUI design)

2010-08-17 Thread Eric Brunel
In article , Jah_Alarm wrote: > On Aug 17, 3:32 am, Eric Brunel > wrote: > > In article > > <993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>, > > > >  Jah_Alarm wrote: > > > hi, > > > > > pls help me out with t

Re: message box in Tkinter

2010-08-17 Thread Eric Brunel
In article <61cbd1cb-bd6d-49aa-818f-d28c46098...@x18g2000pro.googlegroups.com>, Jah_Alarm wrote: > I need to display a message box at the click of a button. I od the > following: > > from Tkinter import * > > def msg1(): > messagebox.showinfo(message='Have a good day') > > > Button(main

Re: update of elements in GUI

2010-08-17 Thread Eric Brunel
(Top-post corrected; please don't do that, it makes messages very hard to read via usenetŠ) In article <26c363c8-11d7-49b9-a1c1-251ab5ff9...@p22g2000pre.googlegroups.com>, Jah_Alarm wrote: > On Aug 17, 7:19 pm, Eric Brunel > wrote: > > You have to call update_idletas

Re: GNUstep and Python

2009-06-23 Thread Eric Brunel
Diez B. Roggisch wrote: > Paul Watson schrieb: >> Has anyone used GNUstep? >> >> In addition to Objective-C, there are Java and Ruby bindings. >> >> Has anyone created a Python binding to GNUstep? > > There is the pyobjc-binding for OSX, maybe that's suitable for GNUStep. Apparently, it's not: The

Re: PyRTF object model

2010-09-30 Thread Eric Brunel
In article , Rustom Mody wrote: > I am trying to use PyRTF. > > I gather that an RTF doc consists of a list of sections, a section > consists of a list of paras, > paras seem to be just text (not sure on that one) They also include a style, not only text. > Some questions: > > When does one

Re: Unix-head needs to Windows-ize his Python script

2010-10-21 Thread Eric Brunel
In article , Shawn Milochik wrote: > Also, wxPython automatically looks native Mac, Windows, and Linux. And so do the recent versions of Tkinter/tcl-tk... In Python, you just have to use the widgets in the new ttk module. These widgets also have fewer options than their equivalent in Tkinter,

<    1   2   3