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 configuration error:

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 strange is going on here. all

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 GUI

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 the

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 do you expect a

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 text, its only the

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 you don't need

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 from

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 def

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, max=None): if

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 to have a

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, then a

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

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 them

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] 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 effect of using

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') system_name =

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 Started

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. Documentation is

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 sound card.

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 Asrarahmed, in

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 move

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 to terminate

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 which is using

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 wiki:

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 three

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 window

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 code so

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 always

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 convert to

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### from

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

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 display from

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 left

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 resulting

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 os.path

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 Tkinter.

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 way to

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.org

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=15, ipady=15,

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 sound

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.setdefault('LANG',

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 but I

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 in

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 # -*- coding:

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 amount of

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 not sure about the correct

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

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

[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

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 workaround

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 not

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: http://tkinter.unpythonic.net/wiki There is a number of links to Tkinter documentation

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] 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__.__dict__ File

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

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 destroy

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

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

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: b =

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 can see

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/ipupdate.py')

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 item

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 but it is not

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 also added

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 not

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 e in makeCallback() that isn't defined anywhere

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) ). Keyword,

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 main: root =

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 running

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 the

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 import *

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

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-8859-15

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 column. I

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 Between 1

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 press the

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 is a fairly

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 possibly point

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. I cant

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 loop you could

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 snip You see, in my example above I called the list buttonlist instead of button; maybe this naming helps avoid confusion . Best regards Michael Many

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=buttonlabel)

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 it from the console or from a GUI? It's

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 decode any

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 compare the

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

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()

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 Regards

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 years

  1   2   >