New submission from Decorater:

runnign exec on import lines are fine however if I run the following code in a 
exec:

>>>import py2pycx;py2pycx.api.compress_script(sys.path[0] + 
>>>'\resources\Dependencies', 'six.py')
Traceback (most recent call last):
  File ".\resources\Dependencies\DecoraterBotCore\BotCommands.py", line 261, in 
debug_code
    debugcode = eval(debugcode)
  File "<string>", line 1
    import py2pycx;py2pycx.api.compress_script(sys.path[0] + 
'\resources\Dependencies\', 'six.py')
         ^
SyntaxError: invalid syntax

It says it is a SyntaxError. It would be nice if eval could support import 
statements as well so I do not have to import the module in the file/package to 
be able to use eval with the functions it has.

----------
messages: 272621
nosy: Decorater
priority: normal
severity: normal
status: open
title: eval() does not allow import statements to run.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27757>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to