A
Art
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.
ex:Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1
print('foo')
but this works:foo
also, I can't get eval to make callable objects. is this possible?Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1
def foo():
^
SyntaxError: invalid syntax
I'd like to have a command line parameter be turned into a callable
statement with an expected environment (a la awk) but I can't seem to
get this working. (I get the same behavior for compile.
Thanks,
A
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.
ex:Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1
print('foo')
but this works:foo
also, I can't get eval to make callable objects. is this possible?Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1
def foo():
^
SyntaxError: invalid syntax
I'd like to have a command line parameter be turned into a callable
statement with an expected environment (a la awk) but I can't seem to
get this working. (I get the same behavior for compile.
Thanks,
A