Re: elementtree w/utf8

2007-10-27 Thread rzzzwilson

Tim Arnold wrote:

> On a related note, I have another question--where/how can I get the
> cElementTree.py module? Sorry for something so basic, but I tried installing
> cElementTree, but while I could compile with setup.py build, I didn't end up
> with a cElementTree.py file anywhere. The directory structure on my system
> (HPux, but no root access) doesn't work well with setup.py install.
>
> thanks,
> --Tim Arnold

I had the same question a while ago  and the answer is ElementTree
is now
part of the standard library.

http://docs.python.org/lib/module-xml.etree.ElementTree.html

Ross

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


wxpython and zoom/pan image

2009-05-23 Thread rzzzwilson
Hi,

I've googled for this, but can only find things like openlayers that
is a web-based javascript solution.

I need to display an image at various zoom levels and want to allow
the user to pan around in the Google maps style, that is, left-click
hold and drag.  The code should also action double-clicks on the image
(but that's easy).

There are no 'standard' wxpython widgets that allow this.  Can anyone
point me to information on how to implement such a thing, or maybe
some working code?

Thanks,
Ross
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: switch

2009-12-08 Thread rzzzwilson
On Dec 9, 1:00 pm, Benjamin Kaplan  wrote:
> On Tue, Dec 8, 2009 at 8:53 PM, hong zhang  wrote:
> > List,
>
> > Python does not have switch statement. Any other option does similar work?
> > Thanks for help.
>
> Use a dict instead, where the keys are the different cases and the
> values are usually callable objects (such as functions)
> options = {"a" : do_a, "b",do_b, "c", do_c}
>
> option = "a"
>
> try :
>     options[option]()
> except KeyError :
>     do_default()
>
> > --henry
>
> > --
> >http://mail.python.org/mailman/listinfo/python-list
>
>

Even better (well, shorter!):
options = {"a" : do_a, "b",do_b, "c", do_c}
options.get(option, do_default)()

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


Re: Challenging Job Opportunity for a C# Architect/ Developer

2010-06-01 Thread rzzzwilson
http://www.catb.org/~esr/faqs/smart-questions.html#forum
-- 
http://mail.python.org/mailman/listinfo/python-list