3 ms·
Why not just eval?
by andreyf 18y ago
Why not just eval?
- JesseAldridge 18y ago>>> eval("print 'Hello macro!'") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1 print 'Hello macro!' ^ SyntaxError: invalid syntax I guess you can't do prints in an eval?
- dill_day 18y agoeval(compile("print 'Hello macro!'",'macro','exec'))