This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kadir Haldenbilen
Recipients Kadir Haldenbilen
Date 2018-04-12.14:55:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523544959.58.0.682650639539.issue33269@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-04-12 14:55:59Kadir Haldenbilensetrecipients: + Kadir Haldenbilen
2018-04-12 14:55:59Kadir Haldenbilensetmessageid: <1523544959.58.0.682650639539.issue33269@psf.upfronthosting.co.za>
2018-04-12 14:55:59Kadir Haldenbilenlinkissue33269 messages
2018-04-12 14:55:59Kadir Haldenbilencreate