Context-aware return
Sven R. Kunze
srkunze at mail.de
Thu Sep 10 14:34:11 EDT 2015
On 10.09.2015 20:14, Ben Finney wrote:
> "Sven R. Kunze" <srkunze at mail.de> writes:
>
>> http://stackoverflow.com/questions/2356399/tell-if-python-is-in-interactive-mode
> I'm pretty sure Steven knows full well the answer to that question,
> which is not anything like the one he asked. Would you care to read the
> question he did ask?
You are right. I turned out to me harder that I first thought.
My initial guess was like: use AST. But now I see, it would be hard to
get the source code.
So, what actually could work, would be faking the interactive
interpreter wrapping it up and thus have control over the source code
typed in.
Best,
Sven
More information about the Python-list
mailing list