Andrew Dalke wrote:
> import subprocess
> def gensky(hour):
>   subprocess.check_call(["gensky", "3", "21", str(hour)],
>                        stdout = open("sky%d.rad" % (hour,), "w"))
> 
> 
> The main differences here are:
>  - the original code didn't check the return value of os.system().
> It should do this because, for example, the gensky program might
> not be on the path.  The check_call does that test for me.

Where do you find check_call()? It's not in the docs and I get
 >>> import subprocess
 >>> subprocess.check_call
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'check_call'

with Python 2.4.1.

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to