Re: [Tutor] Tix NoteBook programming problem

2004-12-21 Thread Michael Lange
On Tue, 21 Dec 2004 14:16:56 +0900 Guillermo Fernandez Castellanos <[EMAIL PROTECTED]> wrote: Hi Guille, thats a classic case of geometry manager conflicts. You dont need to pack the notebook pages explicitely, tix does this automagically for you and *tix does not use pack()*, so when you try to

[Tutor] Re: Tix Select programming problem

2004-12-22 Thread Michael Lange
On Wed, 22 Dec 2004 11:37:57 +0900 Guillermo Fernandez Castellanos <[EMAIL PROTECTED]> wrote: Hi Guille, > > I'm playing now with the Select buttons: > > import Tix > > def prtS(): > print fruits.cget('value') > > def prtC(val): > print val > print sel.cget('value') > > root = Ti

Re: [Tutor] O.T.

2004-12-31 Thread Michael Lange
> * Jacob S. <[EMAIL PROTECTED]> [041228 01:42]: > > But who are you all, what are you're ages, what do you do, marriage status, > > etc? 37, no kids but a girlfriend with a cat. I work at a clinical laboratory in a hospital in germany. I'm just a hobby programmer and started with python about 2

Re: [Tutor] Tix and Table printing

2005-01-14 Thread Michael Lange
On Fri, 14 Jan 2005 08:47:49 - "Alan Gauld" <[EMAIL PROTECTED]> wrote: > Tk was written in the 80's so given > its origins was not likely to have a table. > > Of course it would be nice if they added one now!!! > It looks like they are already working on it: http://wiki.tcl.tk/12753

Re: [Tutor] Tkinter questions

2005-02-02 Thread Michael Lange
On Tue, 1 Feb 2005 19:08:41 +0200 Mark Kels <[EMAIL PROTECTED]> wrote: Hi Mark, > Hello, > I got some Tkinter questions that I need the answer for to complete a > little project of mine: > 1. How can I make the program to open in a X*Y sized window ? from Tkinter import * root = Tk() root.geomet

Re: [Tutor] help with .get in Tkinter

2005-02-20 Thread Michael Lange
On Sun, 20 Feb 2005 17:12:54 +0200 Mark Kels <[EMAIL PROTECTED]> wrote: > Hi all. > First, here is the code I have a problem with (I got same problem in > my project) : > from Tkinter import * > def go(): > e.get() > print e > > main=Tk() > e=Entry(main) > e.pack() > b=Button(main,text='O

[Tutor] UnicodeDecodeError

2005-02-22 Thread Michael Lange
Hello list, I've encountered an (at least for me) weird error in the project I'm working on (see the traceback below). Unfortunately there are several of my application's modules involved, so I cannot post all of my code here. I hope I can explain in plain words what I'm doing. The line in the

Re: [Tutor] UnicodeDecodeError

2005-02-23 Thread Michael Lange
On Tue, 22 Feb 2005 19:17:40 -0500 "Isr Gish" <[EMAIL PROTECTED]> wrote: > This part of the error is saying what the problem is. > >>UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 22: > ordinal not in range(128) > > Thatthe ascii codec that's being used can't decod

Re: [Tutor] UnicodeDecodeError

2005-02-23 Thread Michael Lange
On Wed, 23 Feb 2005 07:21:40 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > > This is a part of Python that still confuses me. I think what is happening is > - self.nextfile is a Unicode string sometimes (when it includes special > characters) > - the gettext string is a byte string > - to comp

[Tutor] Unicode issues (was: UnicodeDecodeError)

2005-02-24 Thread Michael Lange
On Wed, 23 Feb 2005 23:16:20 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > How about >n = self.nextfile >if not isinstance(n, unicode): > n = unicode(n, 'iso8859-1') > ? > > > At least this might explain why "A\xe4" worked and "\xe4" not as I > > mentioned in a previous post. > >

Re: [Tutor] Unicode issues

2005-02-24 Thread Michael Lange
On Thu, 24 Feb 2005 07:51:04 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > Michael Lange wrote: > > I *thought* I would have to convert the user input which might be any > > encoding back into > > byte string first > > How are you getting the user input? Is

Re: [Tutor] Recursive Tkinter buttons

2005-02-25 Thread Michael Lange
On Fri, 25 Feb 2005 20:19:15 +1300 Liam Clarke <[EMAIL PROTECTED]> wrote: > > > > for i in range(0,10): > > print i > > buttonlabel = "field " +str(i) > > button[i].append = Button (text=buttonl

Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Michael Lange
On Sat, 26 Feb 2005 19:48:25 + Adam Cripps <[EMAIL PROTECTED]> wrote: > On Fri, 25 Feb 2005 12:21:18 +0100, Michael Lange > > > > > You see, in my example above I called the list "buttonlist" instead of > > "button"; maybe this naming

Re: [Tutor] Saving Entry fields in Tkinter

2005-03-01 Thread Michael Lange
On Tue, 1 Mar 2005 12:52:57 +0100 Ewald Ertl <[EMAIL PROTECTED]> wrote: > Hi! > > Perhaps this could help you: > > fileContent=open( "my/file/to/read", "r").readlines() > > for line in fileContent: > print line.strip() # remove leading and trailing whitspace's incl. \n > > > In the l

Re: [Tutor] help

2005-03-07 Thread Michael Lange
On Mon, 07 Mar 2005 11:46:42 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > Gregory Sexton wrote: > > Thanks for the help! Sorry for the trivial questions, but I guess we all > > have to start somewhere. Beginning python student, OS Windows XP,using > > Python 2.4. Also novice to programming.

[Tutor] Using signal handlers

2005-03-08 Thread Michael Lange
Hello tutors, I experience problems with signal handlers, and the explanatzions in the docs don't seem to help me much. The code I try to handle basically comes down to this (it's supposed to run on linux only, btw): from Tkinter import * import tkSnack root = Tk() tkSnack.initializeSnack(roo

Re: [Tutor] Changing Keyboard output

2005-03-20 Thread Michael Lange
On Sun, 20 Mar 2005 19:38:40 - "Igor Riabtchuk" <[EMAIL PROTECTED]> wrote: > Hi, > > I am totally new to Python and still learning. > > I am looking for a way to change keyboard output within Tkinter widget - for > example, say I press "p" and I want it to come out as "t". > > Could anyone

Re: [Tutor] Tkinter and keyboard output

2005-03-25 Thread Michael Lange
On Thu, 24 Mar 2005 18:05:25 - "Igor Riabtchuk" <[EMAIL PROTECTED]> wrote: > Hi, > > I was playing around with Tkinter bindings and I got a question which is > probably not particularly bright. > > If I have the following code, it works because I specifically code a function > for keypre

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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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

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] 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] 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] 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 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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

[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] 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

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] 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-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-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 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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] [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] 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] : 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] : 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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

  1   2   >