The Python interpreter is interactive, but it is not a general purpose shell. You would need to wrap external programs in an os.system or os.popen call. One attractive way of getting around this is to pre-wrap each program in a python object. For example:
<br><br>class Display:<br><br>&nbsp;&nbsp;&nbsp; def rast(self, rastername):<br><br><br><br><div><span class="gmail_quote">On 8/12/06, <b class="gmail_sendername">Glynn Clements</b> &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Trevor Wiens wrote:<br><br>&gt; &gt; If anyone can find a real language which is &quot;good enough&quot; on all of
<br>&gt; &gt; Unix, Windows (Cygwin and native) and OSX, I'll quite happily rewrite<br>&gt; &gt; all of GRASS' shell scripts.<br>&gt;<br>&gt; Python is easy to install on Windows. So with an offer like that, I<br>&gt; can't help asking if any of the interactive Python shells are to your
<br>&gt; knowledge good enough. Or perhaps what in you mind defines an<br>&gt; interactive shell environment that is good enough to replace bash?<br><br>The main issue is the ability to have scripts which can be run as e.g
.<br>&quot;d.save&quot;, and not having to use &quot;<a href="http://d.save.py">d.save.py</a>&quot;. This needs to work both<br>from a shell and from system/exec/popen/spawn/etc functions provided<br>by various languages.
<br><br>--<br>Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br></blockquote></div><br><br clear="all"><br>-- <br>David Finlayson