Odd handling of type.__init__ bases

2008-02-28 Thread quick
I encountered an oddity in attempting to use a metaclass to perform mix-in 
inheritance for classes.  I've attached a small demonstration file.  Have I 
misunderstood the bases argument for type.__init__ or should this be submitted 
as a bug?

Python 2.5 (r25:51908, Feb 22 2007, 19:05:27) 
[GCC 4.1.2] on linux2

-KQ





-
This mail sent through IMP: http://horde.org/imp/


pyclass.py
Description: Binary data
-- 
http://mail.python.org/mailman/listinfo/python-list

Configuring Python for Tk on Mac

2005-01-21 Thread Martyn Quick
On my desk here at work I have a Mac G4 running Mac OS X v10.2.8.

When I go into a terminal and type "python" up comes a nice python
interface and all seems great.  However when I type "import Tkinter"
I'm greeted by the following error.

>>> import Tkinter
Traceback (most recent call last):
  File "", line 1, in ?
  File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
import _tkinter # If this fails your Python may not be configured
for Tk
ImportError: No module named _tkinter

So I guess something about this implementation is not appropriately
configured.  I'm guessing this is the default behaviour since I don't
think anyone did anything special about python when they set up my
machine.

What do I do to set it up so I can use Tkinter?

Thanks... and sorry if this is an FAQ... but I couldn't find the info
easily.

Yours,
Martyn
-- 
http://mail.python.org/mailman/listinfo/python-list


Configuring Python for Tk on Mac (continued)

2005-01-24 Thread Martyn Quick
From: Alex Martelli ([EMAIL PROTECTED])
> 
> No idea about any 10.2, sorry, but on 10.3 that's not the problem: Tk
> support is there alright, it's Tcl/Tk which _isn't_.  Get MacPython, its
> PackageManager will explain where to get Tcl/Tk Aqua from, as a prereq
> for Tkinter and IDLE!

Ok, I've installed MacPython.  It doesn't seem to work right though...
for example, if I try to run the 00-HELLO-WORLD.py example then it
crashes and tells me the IDE has unexpectedly crashed.

I can't really see how to run things either.  (I'm used to just typing
"python" in a terminal on Unix but that seems to just run the version
that comes pre-installed.)

Sorry for not knowing much about Macs and being a bit clueless.

Martyn
-- 
http://mail.python.org/mailman/listinfo/python-list


Background/foreground on disabled Tkinter.Entry

2006-01-22 Thread Martyn Quick
If I create a Tkinter.Entry widget, I can adjust the background and the
text colours, using the background and foreground options.  However, if
the state is "disabled", then this has no effect and it just appears as
grey on a light grey background.  E.g.,

Tkinter.Entry(root, foreground="black", background="white",
state="disabled").grid()

does not do what I expected.  What is the correct way to adjust the
foreground and background on disabled Entry widgets?

Thanks,

Martyn

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Background/foreground on disabled Tkinter.Entry

2006-01-22 Thread Martyn Quick
Thanks v. much.
I'd missed that in the documentation I have access to.

Martyn

-- 
http://mail.python.org/mailman/listinfo/python-list