Re: [Tutor] Tkinter import error

2007-04-24 Thread Michael Lange
On Tue, 24 Apr 2007 00:09:21 +0100 "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > "John DeStefano" <[EMAIL PROTECTED]> wrote > > > I've run into an error that I've seen reported in several places, > > but > > none of the fixes seem to be working for me: when I try to "import > > Tkinter" I get a c

Re: [Tutor] list problem

2007-02-21 Thread Michael Lange
On Wed, 21 Feb 2007 21:21:26 +1300 "John Fouhy" <[EMAIL PROTECTED]> wrote: > > Kirk Bailey wrote: > > > ok, here comes some code: > > > > > > f1=open(pagename,'r') > > > page=f1.readlines() > > > f1.close() > > > > > > at the end of which, the data is in page, which is a list. But > > > something

Re: [Tutor] same output on diferent sys.stdout.encodings

2007-02-08 Thread Michael Lange
On Wed, 07 Feb 2007 17:30:26 + Paulino <[EMAIL PROTECTED]> wrote: > Hi everyone! > > I have some strings that include special characters, to be displayed in > widget labels ( PyQt4 ). > The output changes in diferent OS's due to diferent sys.stdout encoding > > Not only the labels in the GU

Re: [Tutor] Regarding licensing GPL terms

2007-01-31 Thread Michael Lange
On Wed, 31 Jan 2007 13:34:24 +0530 Anup Rao <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing an application that uses a python libary (a *.so file) > generated using SWIG. > This library makes direct system calls to the Linux kernel. > This raises three questions. > > a> Does this mean that

Re: [Tutor] problem with canvas.postscript()

2007-01-23 Thread Michael Lange
On Mon, 22 Jan 2007 20:14:31 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > I am trying to save a tkinter canvas using canvas.postscript() method... > > The thing works fine when the canvas size is small; but it gets cut (from > the top and left side) when the size increases

Re: [Tutor] Can we add labels to tkinter canvas..?

2007-01-22 Thread Michael Lange
On Mon, 22 Jan 2007 17:47:14 - "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hello Folks, > > > > Is it possible to add a Label to tkinter canvas or i'll need to use > > create_text method ? > > What exactly

Re: [Tutor] Change the font size of the lines and rectangle on aTkinter Canvas

2007-01-16 Thread Michael Lange
On Tue, 16 Jan 2007 09:56:27 + (GMT) ALAN GAULD <[EMAIL PROTECTED]> wrote: > > --- Asrarahmed Kadri <[EMAIL PROTECTED]> wrote: > > > Is there a method that redraws the toplevel windows that is > > holding the widgets > > Yes, you can issue an update() command to any widget. > Usually yo

Re: [Tutor] Change the font size of the lines and rectangle on aTkinter Canvas

2007-01-16 Thread Michael Lange
On Tue, 16 Jan 2007 00:33:20 - "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote > > > I want to provide with a functionality of changing the font size, in > > this > > case the width of the lines. > Its not really the font size. fonts only apply to te

Re: [Tutor] 'root' dir of a package from within the package ?

2007-01-09 Thread Michael Lange
On Mon, 8 Jan 2007 19:24:37 + Dave S <[EMAIL PROTECTED]> wrote: > Hi all, > > I have written a python package, which works fine, the 'root' directory > is 'my_app' with sub directories within in, complete with there __init__.py > files. > > I need to work out the path to the root directory

Re: [Tutor] order of arguments in function

2006-12-06 Thread Michael Lange
On Wed, 06 Dec 2006 04:29:54 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: (...) > > > >def my_function(min, max=None): > > if max is None: > > max = min > > min = 0 > > # stuff > > Great! > > >I am not sure if this is more intuitive though. > > >>> > def my_function(min

Re: [Tutor] order of arguments in function

2006-12-06 Thread Michael Lange
On Tue, 05 Dec 2006 22:18:02 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > Say I have a function, > > def my_function(max, min=0): > return max - min > > The order of arguments is counterintuitive, but it seems it can't be > changed if I want to have a default min. Is there way to write >

Re: [Tutor] Getting the screen size....using Tkinter

2006-12-04 Thread Michael Lange
On Mon, 4 Dec 2006 16:43:42 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > Is it possible to get the screen size using a standard API of Tkinter? > > And also any function to position the window in the center of the screen..?? > > Thanks in anticipation. > You might want

Re: [Tutor] help with Tkinter, please

2006-11-26 Thread Michael Lange
On Sat, 25 Nov 2006 17:23:39 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > I've done a lot of fiddling around with setting "side=left", and > trying to put all the buttons inside a second Frame inside the first > one, but I can't get the layout I want, which is the Label on top of > the Entry,

Re: [Tutor] How to make the label left justified in a frame

2006-11-24 Thread Michael Lange
-- Forwarded to tutor list -- On Thu, 23 Nov 2006 16:25:41 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Sorry to bother you, > But can u please explain what does grid_columnconfigure() do.. > > The best place for questions like this are usually the Tk man pages :) Once you get used to

Re: [Tutor] help with Tkinter, please

2006-11-24 Thread Michael Lange
On Thu, 23 Nov 2006 13:08:40 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > >def compute_fact(): > > value = int(entry_get()) Ooops, sorry for the typo, of course it is entry.get() not entry_get() Michael ___ Tutor maillist - Tutor@python.org ht

Re: [Tutor] How to make the label left justified in a frame

2006-11-23 Thread Michael Lange
On Thu, 23 Nov 2006 14:14:59 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I am using grid manager inside a frame to arrange 4 label widgets, one > beneath the other. > > What I want is that all teh labels should be placed in the left of the > frame... > > There is no effe

Re: [Tutor] help with Tkinter, please

2006-11-23 Thread Michael Lange
On Thu, 23 Nov 2006 02:07:17 -0800 Dick Moores <[EMAIL PROTECTED]> wrote: > I think I see how to make a simple GUI with Tkinter, but I still > don't see how to use one with even a simple, previously non-GUI > Python script. I'm wondering if someone could create an example for > me, using the 2

Re: [Tutor] Sloppy Code ?

2006-11-13 Thread Michael Lange
On Mon, 13 Nov 2006 17:13:25 +0200 "Matt Erasmus" <[EMAIL PROTECTED]> wrote: > Hi guys > > Very new to python programming but am really enjoying it. > > Anyway, I was just wondering if this code could be improved on in anway. > > ... > stdin, stdout, stderr = os.popen3('/bin/hostname -f') > sys

Re: [Tutor] Help me with graphs...using tkinter

2006-11-01 Thread Michael Lange
Hi Asrarahmed, On Wed, 1 Nov 2006 16:16:31 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > I want to draw bar-charts using Tkinter. I am not able to find material on > this topic. > have a look at the Canvas widget and especially at its create_rectangle() method. Document

Re: [Tutor] Simple calculator

2006-11-01 Thread Michael Lange
Hi Joe, On Tue, 31 Oct 2006 18:37:27 -0800 "Joe Cox" <[EMAIL PROTECTED]> wrote: > I found this simple calculator on the web: > > from Tkinter import * > from math import * > ###http://sunsite.uakom.sk/sunworldonline/swol-02-1998/swol-02-python.htmlBy > Cameron Laird and Kathryn Soraiz...Getting

Re: [Tutor] PyAlsaAudio with Multiple Sound Cards?

2006-10-21 Thread Michael Lange
On Fri, 20 Oct 2006 18:13:04 -0400 "Rick Sterling" <[EMAIL PROTECTED]> wrote: > > Hi. > > I am pretty new to Python, but am trying to get up to speed so I move over > to Python from Perl. One progam I wrote in Perl I am trying to re-write in > Python. It controls the mixer settings on my soun

Re: [Tutor] How to get the width of teh button widget..??

2006-10-20 Thread Michael Lange
On Fri, 20 Oct 2006 11:55:10 +0100 "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Folks, > > Sorry for asking you such a trivial question.!!! But i want to size up all > the buttons with the same size as the largest one in the interface.. And > thats why I am asking this question.. > Hi Asrara

Re: [Tutor] an alternative to shutil.move()?

2006-10-16 Thread Michael Lange
On Mon, 16 Oct 2006 01:16:19 +0200 Alfonso <[EMAIL PROTECTED]> wrote: > Is there an alternative in python to use shutil.move()? > > It copies the files and then removes the source file insted of just > moving directly the file (don't know much about file systems, but I > suppose that when you m

Re: [Tutor] Help me with this Tkinter code

2006-10-11 Thread Michael Lange
On Tue, 10 Oct 2006 23:32:57 +0100 "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > The error message is as under: > > > *Microsoft Visual C++ Runtime Library* > > * Runtime Error! > Program: C:\python\Lib\site-packages\pythonwin\Pythonwin.exe* > > * This application has requested the Runtime

Re: [Tutor] Seeking good resources for Tkinter

2006-10-09 Thread Michael Lange
On Mon, 9 Oct 2006 22:04:17 +0100 "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > I want to learn the GUI programming in Python. Can you suggest some nice web > resources as well as books to start. > > Thanks in anticipation. > Hi Asrar, for Tkinter a good place to start is the

Re: [Tutor] tkinter

2006-10-09 Thread Michael Lange
On Mon, 9 Oct 2006 14:00:26 +0100 "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > We try to build new software using python and tkinter. We would like > > to > > enter some fields using grid style. > > Based on the fact that you say: > > > these. I hope I could explain I did not mean this grid whic

Re: [Tutor] Tkinter GUI Grid Layout Manager

2006-09-21 Thread Michael Lange
On Wed, 20 Sep 2006 21:21:25 -0700 (PDT) Johnston Jiaa <[EMAIL PROTECTED]> wrote: > I am trying to get 3 buttons, equally separated along the top of the window. > How do I get them to all be the same size and how do I make them so that they > are equidistant to each other? > > Along with those

Re: [Tutor] about tkinter

2006-09-05 Thread Michael Lange
On Tue, 5 Sep 2006 01:46:02 -0700 "linda.s" <[EMAIL PROTECTED]> wrote: > > > If I close the 'main' window, 'sub' window will be closed too. How can > I close just one window? > Linda Hi Linda, you can use a "hidden" root window, like this: root = Tk() root.withdraw()# hide the root wind

Re: [Tutor] Tkinter Icon Suse 10

2006-08-25 Thread Michael Lange
On Fri, 25 Aug 2006 15:14:49 -0400 "Alberto Troiano" <[EMAIL PROTECTED]> wrote: > Hi everyone > > It's been a long time since I left Python for .NET 2003, but then again I > need it to make an app under Linux Suse 10 and I have a question > I'm trying to put an icon to my window... > Here is the

Re: [Tutor] Limiting Characters

2006-08-22 Thread Michael Lange
On Mon, 21 Aug 2006 13:19:54 -0400 "Marcus Dean Adams" <[EMAIL PROTECTED]> wrote: > I_m fairly new to python, I_ve been dabbling in it for school and I have a > question. I_ve written a few programs using graphical windows with input > boxes such as a stopwatch, temperature converter, etc. I_ve

Re: [Tutor] i18n Encoding/Decoding issues

2006-08-10 Thread Michael Lange
Hi Jorge, On Thu, 10 Aug 2006 13:32:10 +0100 "Jorge De Castro" <[EMAIL PROTECTED]> wrote: (...) > > Using unicode(body, 'latin-1').encode('utf-8') doesn't work either. Besides, > am I the only one to feel that if I want to encode something in UTF-8 it > doesn't feel intuitive to have to conve

Re: [Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Michael Lange
> -- Forwarded message -- > Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) > From: Michael Cochez <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Multiple buttons, One callback > > Hi Danny, > I've just been reading your reply on this subject at > http://mail.python.org/pipermai

Re: [Tutor] Listbox selection

2006-08-04 Thread Michael Lange
Hi Joe, On Thu, 3 Aug 2006 11:12:28 -0700 "Joe Cox" <[EMAIL PROTECTED]> wrote: > I am still having a problem getting my listbox's binded to the radiobuttons. > I am getting closer. > > ###Assign each Radiobutton with its own listbox values, show one selected > button and one listbox### > > >

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-22 Thread Michael Lange
On Fri, 21 Jul 2006 15:01:30 -0400 Orri Ganel <[EMAIL PROTECTED]> wrote: > As a follow up to my last email, I think the issue is more that the > display doesn't update before the command associated with the "search" > button has finished processing, so any attempts to get data about the > displ

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread Michael Lange
On Fri, 21 Jul 2006 03:02:30 -0400 Orri Ganel <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm working on the GUI for my extended iTunes search, which allows > searches far beyond the native iTunes capability. Once the search has > been completed, a window contining a Tix.CheckList with the res

Re: [Tutor] Help me make it look pretty!

2006-07-21 Thread Michael Lange
On Thu, 20 Jul 2006 20:16:58 +0100 "John CORRY" <[EMAIL PROTECTED]> wrote: > Good evening all. > > I am writing a program using python 2.4, glade 2 and pygtk. It takes > input from the user using textentry boxes. The input should be a > number. When the user keys the data in, it automatically

Re: [Tutor] [tutor] how to get the fileextention?

2006-07-20 Thread Michael Lange
On Thu, 20 Jul 2006 11:19:46 +0300 [EMAIL PROTECTED] wrote: > Hi, > > is this the right (shortest) way to get the file extention > (under MS WIN)? > > > def getext(fname): > ext = fname.split('.').pop() > return ext > Hi Emily, for filename operations, you should have a look at the o

Re: [Tutor] List Box binding

2006-07-19 Thread Michael Lange
On Wed, 19 Jul 2006 06:45:36 -0400 Kent Johnson <[EMAIL PROTECTED]> wrote: > Joe Cox wrote: > > I am using Tk and have a series of Radio buttons that I want to bind > > to it's own listbox for further selection. > > I just don't get the point how to click the button and select the > > proper lis

Re: [Tutor] abs beginner first project

2006-07-12 Thread Michael Lange
On Wed, 12 Jul 2006 06:48:44 -0500 Luke Paireepinart <[EMAIL PROTECTED]> wrote: > For example, in Tkinter, you can bind buttons to function calls, but you > can't have buttons pass arguments to the functions. So you have to > somehow make a separate function for each button, or do some weird >

Re: [Tutor] combo box

2006-06-07 Thread Michael Lange
On Tue, 06 Jun 2006 13:39:21 +0700 kakada <[EMAIL PROTECTED]> wrote: > Dear Friends, > > I am now working on GUI python (Tkinter). > I want to use combobox as my widget, but I cannot find it in any document. > > Does anybody have experience with that? > There is no ComboBox widget in plain Tki

Re: [Tutor] laying out a menu widget inside a frame

2006-05-16 Thread Michael Lange
On Mon, 15 May 2006 18:47:16 -0400 (EDT) "Zubin Wadia" <[EMAIL PROTECTED]> wrote: Hi Zubin, > root.config(relief=RIDGE, bg="lightblue", bd=3) doesn't seem to work it works for me (linux), maybe a platform issue? > I'm not sure if the menu() widget can be packed in a frame container?? > I don'

Re: [Tutor] laying out frames

2006-05-15 Thread Michael Lange
On Mon, 15 May 2006 15:42:48 -0400 (EDT) "Zubin Wadia" <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > Another basic question in regard to frame layouts with Tkinter. > > I want to create a basic quadrant of frames but am not able to follow the > logic to do so, whats the right way or an easier

Re: [Tutor] laying out a menu widget inside a frame

2006-05-12 Thread Michael Lange
On Thu, 11 May 2006 15:03:53 -0400 (EDT) "Zubin Wadia" <[EMAIL PROTECTED]> wrote: > Hello All, > > from Tkinter import * > > class App: > #create a frame > def __init__(self, master): > frame = Frame(master, bg="LIGHTBLUE", relief=RIDGE, bd=3) > frame.pack(side=TOP, ipadx

Re: [Tutor] help with erros using subprocess module

2006-05-12 Thread Michael Lange
On Thu, 11 May 2006 10:59:19 -0700 (PDT) Jerome Jabson <[EMAIL PROTECTED]> wrote: > > Am I missing some module you are referencing with > "types"? > Hi Jerome, that's right, try import types first. Michael ___ Tutor maillist - Tutor@python.o

Re: [Tutor] ossaudiodev, pygtk, and flushing buffers

2006-05-11 Thread Michael Lange
On Wed, 10 May 2006 09:59:14 -0700 Matthew White <[EMAIL PROTECTED]> wrote: > Hello All, > > I'm writing a little audio player that plays voicemail files. (I realize > I'm reinventing the wheel, but it's still fun.) > > The problem I'm experiencing is that I'm hearing the last fraction of > the

Re: [Tutor] Simple way for i18n ?

2006-03-24 Thread Michael Lange
On Thu, 23 Mar 2006 23:58:58 +0100 "francois schnell" <[EMAIL PROTECTED]> wrote: > > Now I'd like to be able to change language without loging out, change > language, log in. > > Martelli says in his book that to set the default language for the app I > just need to do: > > >>> os.environ.setde

Re: [Tutor] Simple way for i18n ?

2006-03-23 Thread Michael Lange
On Wed, 22 Mar 2006 17:41:14 +0100 "francois schnell" <[EMAIL PROTECTED]> wrote: > Hello all, > > I wish to translate a Python script from English to French. I've read the > offical documentation (python.org doc) but I must admit that I'm lost now > ... > I've found some simple explanations here

Re: [Tutor] Test If File System is mounted in Linux

2006-03-17 Thread Michael Lange
On Fri, 17 Mar 2006 00:36:35 -0700 fortezza-pyt <[EMAIL PROTECTED]> wrote: > If there a semi-standard way to test if a file system has been mounted > or not using Python? In the Linux command line, I can type "mount" and > see all mounted file system, and then see if the one I am looking for is

Re: [Tutor] Python and unicode

2006-03-10 Thread Michael Lange
On Fri, 10 Mar 2006 08:55:35 +0100 Ferry Dave Jäckel <[EMAIL PROTECTED]> wrote: > Hello list, > > I try hard to understand python and unicode support, but don't get it > really. > > What I thought about this until yesterday :) > If I write my script in unicode encoding and put the magic # -*- c

Re: [Tutor] Tkinter, Frame and Canvas question.

2006-02-24 Thread Michael Lange
On Thu, 23 Feb 2006 11:26:44 -0600 Hugo González Monteverde <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm running into trouble displaying some Tkinter Canvases, they keep a > border between themselves and there's no way I can have them display > without a grey gap between them. > > I've narrowe

Re: [Tutor] G'day

2006-02-15 Thread Michael Lange
On Wed, 15 Feb 2006 22:05:39 +1100 "John Connors" <[EMAIL PROTECTED]> wrote: > G'day, I'm new to Python and new to the list and just thought I'd say a quick > hello before asking my 1st dumb question. My name is John and I live in > Australia, I've been using computers since about 1983. I haven

Re: [Tutor] Changing instance attributes in different threads

2006-02-09 Thread Michael Lange
On Wed, 08 Feb 2006 18:14:14 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > > Sorry, I missed to insert the time.sleep(0.1) I used in my original while > > loop into the example above. > > The reason for using time.sleep() is that I need to avoid lots of loops > > over an empty buffer. > > The

Re: [Tutor] Changing instance attributes in different threads

2006-02-08 Thread Michael Lange
On Wed, 08 Feb 2006 13:47:39 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > > while self.recording: > > data = [] > > while not self.rec_queue.empty(): > > try: > >data.append(self.rec_queue.get(block=0)) > > except Queue.Empty: > >

Re: [Tutor] Changing instance attributes in different threads

2006-02-08 Thread Michael Lange
On Wed, 08 Feb 2006 08:37:18 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > Another architecture you might consider is to have thread 1 put the > actual acquired buffers into two Queues that are read by the two > consumer threads. This would save you a lot of copying and give you a > cleaner i

Re: [Tutor] Changing instance attributes in different threads

2006-02-08 Thread Michael Lange
On Tue, 7 Feb 2006 23:31:06 +0100 Michael Lange <[EMAIL PROTECTED]> wrote: > > So I think I need two Condition objects here; it is most important here that > thread 1 does not > block to minimize the risk of recording buffer overruns, but from reading the > docs I am

Re: [Tutor] Changing instance attributes in different threads

2006-02-07 Thread Michael Lange
On Tue, 07 Feb 2006 06:02:45 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > > One way to make this code thread-safe is to use a threading.Condition() > instead of a boolean variable: > > thread 1 does: > > self.lock.acquire() > if condition: > self.name = 'bob' > else:

Re: [Tutor] Changing instance attributes in different threads

2006-02-07 Thread Michael Lange
On Mon, 06 Feb 2006 18:34:18 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > > It sounds like you have some attributes that you are using as flags to > allow one thread to control another. There are definitely some pitfalls > here. You probably want to use threading.Condition or Queue.Queue to

Re: [Tutor] GUI Development - Which toolkit

2006-02-06 Thread Michael Lange
On Mon, 6 Feb 2006 09:44:48 -0500 Paul Kraus <[EMAIL PROTECTED]> wrote: > I am developing applications that need to run without work on both windows > and > linux and was wondering what gui toolkits everyone uses and why. > > I have been looking at wxpython and tkinter. > I have only used Tki

[Tutor] Using ioctl

2006-02-02 Thread Michael Lange
Hello, I am writing an app that records from the soundcard using ossaudiodev. In the OSS programmer's guide they recommend when reading data fragments from the soundcard to use the fragment size as it is requested by the driver. According to the programmer's guide the ioctl call to determine the

Re: [Tutor] First steps with Tkinter

2006-01-26 Thread Michael Lange
On Thu, 26 Jan 2006 18:20:48 + [EMAIL PROTECTED] wrote: > > root.mainloop() > > I am running from inside Pythonwin 2.4 IDE under XP Pro and every time I run > hello2.py it freezes when I press "QUIT". The only way to kill it is through > Alt-Ctrl-Del but this crashes Pythonwin. Any work

Re: [Tutor] Tkinter help required

2005-12-14 Thread Michael Lange
On Wed, 14 Dec 2005 15:05:07 +0200 Vlad Popescu <[EMAIL PROTECTED]> wrote: Hi Vlad, > Hello everyone, > > I have been desperately trying to get Tkinter to run, but without much > success thus far. I've followed the instructions at > http://wiki.python.org/moin/TkInter ; importing _tkinter does n

Re: [Tutor] tkFileDialog bug on windows

2005-12-03 Thread Michael Lange
On Fri, 2 Dec 2005 16:58:26 -0800 Fred Lionetti <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I may have found a strange bug with tkFileDialog, and I'm wondering if > anyone has a workaround for the problem. It happens when you have a > button (or any other clickable widget) directly behind the

Re: [Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-12-03 Thread Michael Lange
On Fri, 2 Dec 2005 15:20:43 -0700 "Nathan Pinno" <[EMAIL PROTECTED]> wrote: > I like the Toolkit, is there anywhere where there is a how to use it? > A good place to look for Tkinter resources is the wiki: There is a number of links to Tkinter documentatio

Re: [Tutor] Unicode trouble

2005-11-30 Thread Michael Lange
On Wed, 30 Nov 2005 13:41:54 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > >>>This is the full error: > >>>Traceback (most recent call last): > >>> File > >>>"C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > >>>line 310, in RunScript > >>>exec codeObject in __main

Re: [Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-11-29 Thread Michael Lange
On Tue, 29 Nov 2005 13:48:21 -0700 "Nathan Pinno" <[EMAIL PROTECTED]> wrote: > Hey Danny and all, > > Alberto told me that there was a password entry box in TKInter. Can anyone > tell me about that, please? > Hi Nathan, maybe he meant the Pmw.PromptDialog (

Re: [Tutor] Tkinter mainloop (was Re: tkFileDialog.Directory)

2005-11-16 Thread Michael Lange
On Wed, 16 Nov 2005 10:55:24 +0100 (MET) [EMAIL PROTECTED] wrote: Hi Karsten, > I thought the mainloop() function is something like > > def mainloop(): > e= get_event() > if e: > for w in widgets: w.handle(e) > > but apparently it is not. > > It's not bad that the Tkinter windows don't

Re: [Tutor] Creating Tkinter Menubars

2005-11-16 Thread Michael Lange
On Tue, 15 Nov 2005 16:17:53 -0500 Double Six <[EMAIL PROTECTED]> wrote: > Hi, > > I am testing the following Tkinter code (attached at the end of > this message) by Fredrik Lundh on a Mac OS X 10.4.2 with Python > version 2.3. I do get a root window, but it is totally blank > without the desirab

Re: [Tutor] tkFileDialog.Directory

2005-11-15 Thread Michael Lange
On Tue, 15 Nov 2005 17:03:24 +0100 (MET) [EMAIL PROTECTED] wrote: > > I would like to ask another question. I don't understand the exception > mechanism > of Python when running a Tkinter app. If an exception happens (it does > happen quite often > at the moment..), a traceback is written to the

Re: [Tutor] tkFileDialog.Directory

2005-11-14 Thread Michael Lange
On Mon, 14 Nov 2005 14:42:27 +0100 (MET) [EMAIL PROTECTED] wrote: > Hello! > I want to learn Tkinter and try to build a small File search dialog. Tkinter > is nice, but here is a problem where I am stuck: > > I want to allow the dialog's user to pick a directory. The widget for this > is tkFileDi

Re: [Tutor] TKinter Question

2005-11-08 Thread Michael Lange
On Tue, 08 Nov 2005 00:10:16 -0600 Rob Dowell <[EMAIL PROTECTED]> wrote: > Just a quick TKinter question. Is it possible to have custom > frames/widgets? In other words can I customize the way that the GUI > looks (i.e. rounded corners on the frames, beveled/raised edges, etc.) I > was just won

Re: [Tutor] Tutor Digest, Vol 20, Issue 37

2005-10-11 Thread Michael Lange
On Mon, 10 Oct 2005 17:07:47 -0600 Joseph Quigley <[EMAIL PROTECTED]> wrote: > Hi, > > Unfortunately I get this error: > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "P

Re: [Tutor] New image with Tkinter?

2005-10-10 Thread Michael Lange
On Mon, 10 Oct 2005 11:36:22 -0600 Joseph Quigley <[EMAIL PROTECTED]> wrote: > Hi, > I've written an image reader that uses the PIL module. > I have a variable that uses os.listdir('mydir') to make a list of all the > pictures in the folder... here's what I'm talking about: (...) > The image won't

Re: [Tutor] Focus in tkinter

2005-09-14 Thread Michael Lange
On Wed, 14 Sep 2005 19:58:07 +0100 (BST) David Holland <[EMAIL PROTECTED]> wrote: > I want to make the mouse focus in a GUI move to the > correct button/text entry widget. Does anyone know > how to do this ? > Hi David, to set the focus to a particular widget you need the focus_Set() method:

Re: [Tutor] upgrading from 2.3 to 2.4.1 on Mandrake Linux 10.1

2005-09-12 Thread Michael Lange
On Mon, 12 Sep 2005 07:35:52 -0500 "Andy Dani" <[EMAIL PROTECTED]> wrote: > Hi, > > Which is the best location to install Python in Linux? Should it be under one > directory or different (like lib, doc, bin etc.)? > > I followed installation instructions in "inst.pdf" from python documents. I

Re: [Tutor] how to make a script do two things at once.

2005-08-22 Thread Michael Lange
On Sun, 21 Aug 2005 16:23:20 -0500 nephish <[EMAIL PROTECTED]> wrote: > Hey there, > i have a simple question about getting a script to do > two things at once. > like this. > > > for i in range(100): > print i > time.sleep(.2) > if i == 15: > os.system('python /home/me/ipupd

Re: [Tutor] convert a file from plaintext(Ascii) to unicode? very quickquestions

2005-08-16 Thread Michael Lange
On Mon, 15 Aug 2005 22:51:20 -0400 Kent Johnson <[EMAIL PROTECTED]> wrote: > I think Luke's suggestion will work if you use f.read() (to read the whole > file as a single string) instead of f.readlines() and f.write() instead of > writelines(). > > Kent > And if you want to convert ascii into

Re: [Tutor] Tkinter event for changing OptionMenu items

2005-07-23 Thread Michael Lange
On Thu, 21 Jul 2005 14:16:05 -0400 Bernard Lebel <[EMAIL PROTECTED]> wrote: > Hi Michael, > > Let say I have a MenuOption, that consists of 3 items. This MenuOption > sits on top of the Tkinter window. > > In the lower part, I have a bunch of widgets (text fields). When the > choose a different

Re: [Tutor] Tkinter event for changing OptionMenu items

2005-07-21 Thread Michael Lange
On Thu, 21 Jul 2005 12:19:00 -0400 Bernard Lebel <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to bind an event to the changes made to an OptionMenu. Ie > the user chooses a different item, the rest of the Tk window gets > updated. To repopulate the window, a function would be called by the

Re: [Tutor] Scrolling multilistbox help

2005-07-19 Thread Michael Lange
On Mon, 18 Jul 2005 13:54:45 + "Alberto Troiano" <[EMAIL PROTECTED]> wrote: > Hey tutors > > I'm using the Multilistbox class and I noticed that it only handles the > mouse scroll and the scrollbar to go down or up.I succesfully implemented > the sort function that came with the class > I a

Re: [Tutor] ListBox in Tkinter

2005-07-19 Thread Michael Lange
On Mon, 18 Jul 2005 17:54:34 +0200 geon <[EMAIL PROTECTED]> wrote: > Alan G napsal(a): > > >> I would like to ask if it is possible to create such a listbox > >> (attached) in TKinter itself or must have pmw ot tix...or ... > > > > > > PMW is written in Tkinter so yes, you could do it yourself b

Re: [Tutor] Tk -- which label clicked

2005-07-15 Thread Michael Lange
On Fri, 15 Jul 2005 23:29:22 +1200 (NZST) [EMAIL PROTECTED] wrote: > Quoting Michael Lange <[EMAIL PROTECTED]>: > > > I don't think it will work this way, because you don't catch the event > > bind() passes to the callback > > (you also use a variable

Re: [Tutor] HTML links from Tkinter

2005-07-15 Thread Michael Lange
On Fri, 15 Jul 2005 10:55:37 +1200 (NZST) [EMAIL PROTECTED] wrote: > There's no table widget in standard Tkinter. Search in the Python Cookbook > (on > ActiveState) for a MultiListbox; it might do what you need. > > -- On the Tkinter wiki there are some links to Tkinter table widgets (I have

Re: [Tutor] Tk -- which label clicked

2005-07-15 Thread Michael Lange
On Fri, 15 Jul 2005 10:20:48 +1200 (NZST) [EMAIL PROTECTED] wrote: > def clicked(w): > print 'Widget %s clicked! Text:' % (str(w), w.cget('text')) > > def makeCallback(w): > def callback(e): > clicked(w) > return callback > > # create labels > for text in ['foo', 'bar', 'baz

Re: [Tutor] Tkinter Q's

2005-07-13 Thread Michael Lange
On Wed, 13 Jul 2005 08:13:42 + Joseph Quigley <[EMAIL PROTECTED]> wrote: > Hi, > what's the **kw stand for, used for? What does it mean? > **kw means that there is an optional list of keyword arguments that you can pass to __init__ (for example: main = Main(background="black") ). Key

Re: [Tutor] Tkinter Q's

2005-07-12 Thread Michael Lange
On Mon, 11 Jul 2005 17:22:57 + Joseph Quigley <[EMAIL PROTECTED]> wrote: Hi, Joseph, > Hi first off, here's my code: > > # -*- coding: utf-8 -*- > from Tkinter import * > import random > import time > import about > import quotes > > > def closeprog(): > raise SystemExit > > class ma

Re: [Tutor] Adding attributes to imported class

2005-07-07 Thread Michael Lange
On Thu, 07 Jul 2005 11:03:00 +1200 (NZST) [EMAIL PROTECTED] wrote: > Quoting Michael Lange <[EMAIL PROTECTED]>: > > > I'm trying to write a python wrapper for the tkDnD Tk extension to add > > drag and drop support > > Hi Michael, > > Just a side iss

[Tutor] Adding attributes to imported class

2005-07-06 Thread Michael Lange
Hello list, I'm trying to write a python wrapper for the tkDnD Tk extension to add drag and drop support to Tkinter. Looking for a way to give all widgets access to the newly defined dnd methods I came to create a subclass of Tkinter.Tk() and pass the dnd methods to Tkinter.BaseWidget() (all T

Re: [Tutor] Process problem

2005-06-16 Thread Michael Lange
On Wed, 15 Jun 2005 22:04:48 + "Alberto Troiano" <[EMAIL PROTECTED]> wrote: Hi Alberto, > Hey > > Let me make you understand > > I need that levantamuertos.py run cotascamon.py (every script with it > differents arguments that are passed) and then die letting the cotascamon.py > scripts r

Re: [Tutor] Buttons automatically executing

2005-06-15 Thread Michael Lange
On Wed, 15 Jun 2005 14:31:55 -0500 Phillip Hart <[EMAIL PROTECTED]> wrote: Hi Phillip, > #!usr/bin/python > > from Tkinter import * > > def location(x,y): > print "I am in row ",x," and column ",y > > > root=Tk() > root.geometry('300x300') > can=Canvas(root,width=250, height=250) > > bimage

Re: [Tutor] finding path to resource files in a GUI application

2005-06-09 Thread Michael Lange
On Thu, 9 Jun 2005 08:52:59 +0200 Christian Meesters <[EMAIL PROTECTED]> wrote: > Hi > > Currently I'm writing a GUI application with wxPython (on OS X, but I > guess the problem is the same, regardless of the UNIX derivative one is > using). When I start the main script where it is located t

Re: [Tutor] help me on python + snack

2005-05-18 Thread Michael Lange
On Tue, 17 May 2005 21:18:09 -0700 (PDT) Mahmad Sadique Hannure <[EMAIL PROTECTED]> wrote: Hi Mahmad, > Hello friends, > I m currently working on sound stuff. I have installed > all stuff related to Snack. My code for playing mp3 > song is like this > > #!/usr/bin/python2.3 > > from Tkinter imp

Re: [Tutor] Tkinter and Animation

2005-05-02 Thread Michael Lange
On Wed, 27 Apr 2005 19:31:06 -0700 Jeremiah Rushton <[EMAIL PROTECTED]> wrote: > > I tried your idea and it doesn't animate it. I made a for loop and told it > to mover 1 pixel downward every .3 seconds for 25 times. It just waits till > the for loop is completed and then displays the result of

Re: [Tutor] Re: Tkinter and Animation

2005-04-27 Thread Michael Lange
On Wed, 27 Apr 2005 09:35:47 -0700 Jeremiah Rushton <[EMAIL PROTECTED]> wrote: > > I wanted them to visually shrink and visually move to a corner on the frame. > I did not know how to do it the way you explained, thanks for that. But is > there any way to do it visually? > I guess so, if you

Re: [Tutor] using TK to view an image and then close the window

2005-04-25 Thread Michael Lange
On Mon, 25 Apr 2005 10:24:08 -0700 "Ertl, John" <[EMAIL PROTECTED]> wrote: Hi John, > I can get the image to show > up and minimize and maximize but I can not get the window to close and then > display the next image. > > I have tired several things but no luck. > > Any help on getting the

Re: [Tutor] TKinter and things over Linux

2005-04-18 Thread Michael Lange
On Mon, 18 Apr 2005 13:24:03 + "Alberto Troiano" <[EMAIL PROTECTED]> wrote: Hi Alberto, > Hey > Let me know if this format is better (I use Hotmail in the web so...) > Looks pretty much ok to me :-) > Sadly I'm not in the linux machine so I can't run the command you sent me > but I shall

Re: [Tutor] Problems with encodings

2005-04-18 Thread Michael Lange
On Mon, 18 Apr 2005 09:22:28 +0300 Olli Rajala <[EMAIL PROTECTED]> wrote: > Hi! > Been offlist for a while, but now I started to code an administration > tool for my own photo gallery and have some troubles, so thought to > write and ask some help. :) > > So, I'm from Finland and I'm using ISO-88

Re: [Tutor] Entry widgets

2005-04-10 Thread Michael Lange
On Sun, 10 Apr 2005 18:07:48 +1000 "Diana Hawksworth" <[EMAIL PROTECTED]> wrote: > Hello list, > > Is it possible to change the width of an Entry widget - or not? I am using > Tkinter, GUI - and have an Entry widget that accepts a number. I just don't > want it to extend the width of the colum

Re: [Tutor] using the enter key

2005-04-07 Thread Michael Lange
On Thu, 07 Apr 2005 10:06:46 +1000 "Nova Nova" <[EMAIL PROTECTED]> wrote: > def create_widgets(self): >self.a_lbl=Label(self,text="",fg="Red") >self.a_lbl.grid(row=0,column=0,columnspan=2,sticky=W) >self.inst_lbl=Label(self,text="Enter A Number

Re: [Tutor] using the enter key

2005-04-05 Thread Michael Lange
On Tue, 5 Apr 2005 06:28:54 +1000 "Diana Hawksworth" <[EMAIL PROTECTED]> wrote: > Hello list! > > At the moment I have some user input tied to a button that allows the input > to be "submitted" and then an answer is supplied. How can I get rid of this > submit button, and have the user just pr

Re: [Tutor] wxPython / Tkinter Grid

2005-04-01 Thread Michael Lange
On Fri, 1 Apr 2005 09:11:20 +0100 "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > I know a wxPython grid is totally different to a Tkinter grid, but > is > > there a Tkinter equivalent of a wxPython grid? I'm finding wxPython > to > > be fiddly and restrictive... > > Then Tkinter will be more so. Tk

  1   2   >