0

I am trying to run a Python script with NppExec. It runs fine (the console is updated with whatever I print to stdout in the script) but the window the script creates (through PyQt) never shows up. If I execute the same script in a standard shell (cmd.exe), the window shows up just fine. Actually, the splash screen of the application I want to launch (vitables) shows up under NppExec but not the main window.

Update: Strangely, I noticed it works fine on some machines (but not on others). Both the machines where it works and those where it does not use the same OS (Windows 7 SP1), the same Notepad++ version (5.8.6) and NppExec version (0.4.1). I have tried updating to the latest versions (npp 6.5.3 and nppExec 0.5) but it does not fix the problem.

0

I have found a work-around in Eric's comment in the following question (Stop NppExec from trapping console output until program finishes), but is there a better way?

For reference, I had the additional problem that both the program to run and its argument need to be quoted (their path contain spaces), so I had to use an extra pair of quotes:

cmd /c ""c:\my path to python with spaces\python" -u "$(FULL_CURRENT_PATH)""

Update: the same workaround is found in the following post:

http://sourceforge.net/p/npp-plugins/discussion/672146/thread/4e2bc155/

In fact, that post is even copied verbatim in section 4.6.4. "Run Python scripts with wxPython" of NppExec manual. Sadly that manual is very poorly referenced by Google, hence my question here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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