Python for a PHP user, how do i...?

Rainer Deyke root at rainerdeyke.com
Wed May 16 01:20:59 CEST 2001


"rw2" <richw at objenv.com> wrote in message
news:20010515.162432.2118421993.2310 at mayne.dhcp.fnal.gov...
> Stop the presses.  I just found 'exec'.  That's the general purpose
> function I was looking for.  Don't do the compile nonesense I previously
> recommended.  exec does it for you in one cleaner step.

Except that 'exec' isn't a function.  You can't do this:

eval('exec "print \'spam\'"')

or this:

f = exec


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list