Re: [Tutor] Enumeration and constant

2006-05-29 Thread w chun
> > how about custom constant type? > > Does python provide? > No. Python tries to be as "light" as possible. There is a convention > amongst Python programmers to use upper case names to represent > constants, e.g. RED = 3. another aspect of Python numbers that make them "constant" is that all nu

Re: [Tutor] Enumeration and constant

2006-05-29 Thread Bob Gailer
Please always reply to the list as well as me. Others may be able to help, and we all learn from our interactions. Brendan Cheng wrote: > how about custom constant type? > Does python provide? No. Python tries to be as "light" as possible. There is a convention amongst Python programmers to use

Re: [Tutor] how to use the "image" option for Button widget in Tkinter

2006-05-29 Thread Bernard Lebel
After some further googling around, I found the solution. In fact, I found it in an example on a german web page, http://home.foni.net/~heikos/tkinter/node56.html (I don't speak German). Anyway, here is my working code, for the record: import Tkinter as tk import os # Define constants sIMAGERO

Re: [Tutor] Enumeration and constant

2006-05-29 Thread Alan Gauld
> I wander how to setup the enumeration type > and constant in Python, These concepts do not exist in Python per se. The convention is to make constant names uppercase: PI = 3.1415926 Enums are a little more variable in implementation depending on what you want to do with them. If you need

[Tutor] how to use the "image" option for Button widget in Tkinter

2006-05-29 Thread Bernard Lebel
Hello everyone, I'm looking for a way to put an image on a button in a Tkinter GUI, but for the life of me I just can't find any clear directions about how to do that. No matter where I look, the only documentation I can find is this (Fred Lundz): "image (image). The image to display in the widge