On 26 June 2013 22:07, Sherwood, Matt <[log in to unmask]> wrote:
>> The problem with that is that commands like "stats" are just set up as (t)csh aliases by typing "kappa". To run them from outside of (t)csh you'll need to give the pathname, which you could construct in a manner such as:
>>
>> os.path.join(os.environ['KAPPA_DIR'], 'stats')
>>
>> You might also like to check out David's "starutil.py" module in applications/smurf/scripts, especially the "invoke" function, as that looks like it's intended to help you run Starlink applications from Python. There's an example of running "stats" in the documentation there.
>
> Thanks Graham, that looks very helpful!
And for longer examples, you could look at skyloop.py and pol2cat.py
(in $SMURF_DIR) that use starutils to do serious things.
David
|