John, I think the push/pop functions are going to be fairly
> useful (ipush and ipop??). We're going to be writing a lot
> scripts (i.e. functions) that generate plots for our users.
> There is no way to tell inside the script if it's going to be
> used by a user in interactive mode or by another script (like
> a batch report generator). Having push/pop would let me do:
> def stdPlot( [inputs] ): ipush( False ) try: [ create plot ]
> finally: ipop()
> Of course it's pretty easy to roll your own but I think it
> would be nice to have it in the standard set of commands.
I hadn't thought of using a stack. What is the argument for a stack
as opposed to a single state manipulated along the lines of (with try
except as needed)
b = isinteractive()
....your plot here...
if b: ion()
Your approach requires one fewer line of code. Are their other
advantages to a stack approach? I think a stack may be slightly less
intuitive to a typical user, whereas turning drawing mode on and off
is fairly straight forward.