New submission from Kadir Haldenbilen <khaldenbi...@gmail.com>: on terminal push and runcode accepts indentation where required (like for loop etc), within script gives error message
on terminal import works properly and objects can be found as normal, within script you may need to add module name upfront simple example import code ii = code.InteractiveConsole() ii.push("for ii in range(3):") ii.push(" print('i', i)") you will get normal expected output on terminal, but indentation error within script ii.push("from time import sleep") ii.push("sleep(1)") will sleep 1 sec on terminal, but will give name error ---------- messages: 315224 nosy: Kadir Haldenbilen priority: normal severity: normal status: open title: InteractiveConsole behaves differently when used on terminal and used within script type: behavior versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33269> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com