%02X % k
Kind Regards,
BgEddy
--
http://mail.python.org/mailman/listinfo/python-list
mk wrote:
Calvin Spealman wrote:
To your actual problem... Why do you wanna do this anyway? If you want
to change the function in the dictionary, why don't you simply define
the functions you'll want to use, and change the one you have bound to
the key in the dictionary when you want to change
castironpi wrote:
On Jul 17, 10:05 am, mk [EMAIL PROTECTED] wrote:
def f2(arg):
return f2 +arg
def f1(arg):
return f1 +arg
a={1:f1,2:f2}
print [eval(x[1])(x[0]) for x in a.items()]
def f2(arg):
return New f2 +arg
print [eval(x[1])(x[0]) for x in a.items()]
Neat trick, if probably
bgeddy wrote:
castironpi wrote:
On Jul 17, 10:05 am, mk [EMAIL PROTECTED] wrote:
def f2(arg):
return f2 +arg
def f1(arg):
return f1 +arg
a={1:f1,2:f2}
print [eval(x[1])(x[0]) for x in a.items()]
def f2(arg):
return New f2 +arg
print [eval(x[1])(x[0]) for x in a.items()]
Neat trick
Filipe Teixeira wrote:
Hi.
I have to open a binary file from an old computer and recover the
information stored (or at least try to). I use:
f=open('file.bin','rb')
a=f.read()
f.close()
a in now a string full of hex representations in the form:
a[6]='\x14'
a[7]='\x20'
I would like to
Tim Mitchell wrote:
Hi,
A quick question:
Is there any way for a python script to know if it's being executed by a
debug build of python (python_d.exe) instead of python?
Thanks
Tim
Not sure what this returns in Windows as I run Linux but this returns to
namer of the python