On Thu, 2004-12-30 at 03:08, Alan Gauld wrote:
>
> I'm slightly confused about why you need to do this?
> You create a list of names (PROVISION_ACTIONS), then
> you add the corresponding functions to a dictionary
> by looking the names up in the globals dictionary.
> But since uyou know the na
Thanks alot Jeff. This worked for me:
formhandlers={}
for verb,verb_desc in PROVISION_ACTIONS:
try:
formhandlers[verb]=globals()[verb]
except KeyError:
pass
On Wed, 2004-12-29 at 14:37, Jeff Shannon wrote:
> If you can't make that change to PROVIS
def addvirt():
pass
def remvirt():
pass
PROVISION_ACTIONS=[('addvirt','Add Virt'),('remvirt','Remove Virt'),]
formhandlers={}
# this works
formhandlers["addvirt"]=addvirt
formhandlers["remvirt"]=remvirt
# this does not work:
for verb,verb_desc in PROVISION_ACTIONS:
if cal
--On Friday, December 17, 2004 1:49 PM -0800 Jeff Shannon
<[EMAIL PROTECTED]> wrote:
I don't know perl, so I can't tell for certain, but I think so. However,
there are many ways in which this could become more idiomatic Python
code, and more efficient.
Thanks so much for all the comments and the
Hello all,
I ported to python a little Perl script that applies some math algorithm
that I do not understand... My version seems to give the same results as
the Perl version... but just to make sure I am asking the following:
The Perl version starts by testing whether Perl is in integer mode or
--On Thursday, December 02, 2004 1:42 PM -0500 Kent Johnson
<[EMAIL PROTECTED]> wrote:
Here is one way to do it,
Thanks so much. that's perfect.
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor