Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Notepad++'s NppExec plugin to execute Python scripts from within Notepad++. I notice that Python console output produced with the print() statement doesn't appear on the Notepad++ console until the entire script is finished executing. Is there a way to make print statements appear in real-time?

I'm using Notepad++ v.5.9.8 and NppExec v0.4.1.

share|improve this question
Try python -u to run in an unbuffered mode.… – jdigital Jan 24 '12 at 23:44
@user8368 - Thanks, that worked perfectly. – Abiel Jan 25 '12 at 2:01

The console window of NppExec is started as a child process, meaning that updating the display of the console window, as well as running the main program, are carried out on a single thread. By default, Python print statement outputs are buffered and run on the same thread as the parent script, so the output has to be displayed in unbuffered mode. This is done with the -u flag.

Use python -u instead of the conventional python, as can be seen in this SO question.

share|improve this answer
To prevent your script's own windows being suppressed (not sure exactly what is going on here), run the call to Python as an argument to cmd by preprending cmd /c. For example, I'm using cmd /c python -u "$(FULL_CURRENT_PATH)" so my Cocos2D window shows up. – Eric Jun 21 '12 at 10:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.