Re: how to catch error with system()

2005-12-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > hi > > i have a piece of python code extract that calls an external java > program > cmd = """java someclass someargs""" > try: >ret = os.WEXITSTATUS(os.system(cmd)) > except: >print blah > else: >dosomething(ret) > > the thing is, the java class "someclass

how to catch error with system()

2005-12-12 Thread eight02645999
hi i have a piece of python code extract that calls an external java program cmd = """java someclass someargs""" try: ret = os.WEXITSTATUS(os.system(cmd)) except: print blah else: dosomething(ret) the thing is, the java class "someclass" produces it's own errors when something goes wrong