Emmulate SciTE in regards to program execution
Brought to you by:
drpython
Change the behaviour of the Prompt window to better
emulate SciTE in regards to executing a program.
1) display the command line. When I execute the program
foo.py in SciTE (version 1.61), the Output window displays:
>pythonw -u "foo.py"
2) Scroll to the command line after the program exits.
In the above example, SciTE will set the line ">pythonw
-u "foo.py" to be at the top of the Output window when
the program exits.
Logged In: YES
user_id=796750
1) Done for 3.6.8 (This actually has the nifty effect of
making the stc bug work around uneccessary).
2) I am not inclined to do this. However for a later
release I am going to look into executing arbitrary python
code on program end (letting people tell drpython exactly
what they want it to do).
Logged In: YES
user_id=558529
1) Thanks. It's very encouraging to provide feedback when
the turn-around time is so quick!
2) There is a good reason to consider doing this. If the
executing program spews a lot of output, then it is
difficult to find where the output for the current session
begins. Another possible work-around is to provide a way of
clearing the prompt window so that the next time a program
is executed, only the output from that session will be in
the prompt window.
Logged In: YES
user_id=796750
1) :) Sweet. It is also encouraging to get the good feedback.
2) This is something I plan on doing, I am just not sure
about implementation.
People have asked about cclearing the prompt automatically
on program exit. I figure letting people execute (for
example, a drscript) on program exit, might be a good way to
do this. On the other hand, perhaps a plugin would be best.
The prompt window is cleared when a new program is run.
the runcommand function (DrFrame) uses stc.SetText to set
the text for the whole stc to the command used to run the
program.
The prompt is filled up via OnIdle calls from the drPrompt,
using stc.AddText.