eval with print stmt

Mel Wilson mwilson at the-wire.com
Fri Jul 30 00:01:12 CEST 2004


In article <6c283161.0407291308.10641321 at posting.google.com>,
abrady at prontomail.com (Art) wrote:
>Hello,
>
>I can't seem to get eval or compile to accept the print stmt, or any
>complicated statements.
>
>The documentation I've looked out doesn't explain why this is.

eval only works with expressions, and `print ...` is a statement.
So is `def ...` .

exec should do what you want.

        Regards.        Mel.



More information about the Python-list mailing list