Re: [Tutor] UPDATE: Is there a 'hook' to capture all exits from a python program?

2015-03-21 Thread Cameron Simpson
On 21Mar2015 09:19, Peter Otten <__pete...@web.de> wrote: I ran a few experiments: [...] Bonus: $ python3 bnb.py SIGTSTP Hello from 32614 ^Zreceiving signal 20 (20, ) ^Cfinally except (, KeyboardInterrupt(), ) exit So Ctrl-Z can be intercepted. The program could put the relay i

[Tutor] ArcGIS Create a python script to generate north-facing aspect raster from digital elevation model

2015-03-21 Thread Michael Omohundro
Does anyone know how to create a python script to generate an aspect raster from the input elevation in a digital elevation model? I need to specify TWO variables as user parameters: input elevation and output north-facing aspect. I need to create an aspect raster from the input elevation from

Re: [Tutor] UPDATE: Is there a 'hook' to capture all exits from a python program?

2015-03-21 Thread Peter Otten
Alan Gauld wrote: > On 20/03/15 09:37, Peter Otten wrote: > >>> def close_relay(e=None,v=None,t=None): >>> try: >>> if not relay_closed() >>>really_close_relay() >>> except: >>> really_close_relay() > > The purpose of the if clause is to ensure that > if the