python: testing loops via input(): Possible within Zeus

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
werbarral
Posts: 1
Joined: Fri Jan 15, 2010 2:04 pm

python: testing loops via input(): Possible within Zeus

Post by werbarral »

Compiling command shows the result given out by the installed python engine.

My question:

Can I test loops, e.g. via the input() without opening another editor? The request to put in a number or else is shown in the result.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Unfortunately there is no way to configure Zeus so that the keyboard input is sent to a running script :(

The best that can be done is to have the script run in it's own console window which allows the user to interact with the script and then have Zeus capture the output once the script ends.

To do this you will need to use the tee.exe utility found in the Zeus install folder.

Next create a test.cmd batch file to run the script that looks something link this:

Code: Select all

@echo off

rem Run the the script through tee to capture its output
call python c:\temp\test.py | tee c:\temp\output.txt

rem Let Zeus see the output
type c:\temp\output.txt
Now add the test.cmd file to the Zeus tools menu as a visible DOS Command with the c:\temp\compile.cmd argument and with output captured.

IMPORTANT NOTE: The batch file must be configured as a tool and not a compile, because Zeus always runs the compilers as hidden.

What will happen is the script will be run in a new console window and when the script ends the output will be captured into Zeus.

Cheers Jussi
Post Reply