I'm trying to run a python script from a Windows shell (invoked via M-x shell
or M-x powershell
) inside Emacs.
However, no output is shown via print
statements until I after I hit a raw_input
statement AND provide input. In other words, the script shows no almost no output in the window until after I provide input, at which point all the output that should have been printed before get shown.
I say "almost" because LOGGER.info
statements still get shown in my Emacs shell window, where LOGGER=logger.getLogger("loggerName")
For example if my script were...
LOGGER.info("Starting script")
print "Hello world."
raw_input("What's your name?").strip()
I would see
Starting script
And then nothing until I typed in something, at which point I would see:
Hello world.
What's your name?