I have set python as a tool in Textpad. It works in a non-interactive mode. However it fails when I run a script which requires user input, all I get is a spinning circle. Here is my present configuration
Command: my path to \Python\Python313\python.exe
Parameters: $File
Initial folder: $FileDir
N Prompt for parameters
N Run minimized
N Save all documents first
Y Capture output
N Suppress output until completed
N Sound alert when completed
jazzastronomer wrote: ↑Sun Jan 19, 2025 10:50 pmIt works in a non-interactive mode.
You cannot even set up a tool in interactive mode. It doesn't matter if you "just" execute python.exe with parameters (speak: parsing a script) or without - in sum it is always python.exe which outputs to STDOUT (or STDERR) or wants to wait for input on STDIN. However, for TextPad the "tool" is expected to only capture STDOUT output - if the program wants input it is not suited to be executed as tool by TextPad.
As AmigoJack wrote, TextPad only captures STDOUT. The intention is to capture the output of tools such as compilers and then be able to jump to lines corresponding to any flagged with errors.
What advantage would it be to you, if you could interact with your script within TextPad? If it's just convenient to be able to run it from TextPad, configure it as a Command Prompt tool like this:
Thanks for the explanations much appreciated. There is an old saying "If you don't use it, you loose it!" which clearly is what is happening to me. It has been many a year since I last did any scripting.
I got around my issue by running these scripts from Idle. Idle works as a tool in Textpad.
On a humorous note, did you know that there is a file in windows 11 that looks like the installed python executable, but if you use that file in your python tool in Textpad you get a message directing you to the Microsoft Store to download python? Guess how I found this out! For more info Google "CMD opens Windows Store when I type 'python'"