TheFlyingDutchman wrote:
> Does anyone know how the variables label and scale are recognized
> without a global statement or parameter, in the function resize() in
> this code:
[snip]
> def resize(ev=None):
>       label.config(font='Helvetica -%d bold' % \
>           scale.get())

You're just calling a method on the "label" object. Python looks in the 
function local namespace and doesn't see a "label" object, so it steps 
up to the global namespace. There is a "label" object in the global 
namespace so it uses that one.

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

Reply via email to