[Tutor] Error Handling in python
Chris “Kwpolska” Warrick
kwpolska at gmail.com
Thu Jul 24 14:19:19 CEST 2014
On Thu, Jul 24, 2014 at 2:14 PM, Wolfgang Maier
<wolfgang.maier at biologie.uni-freiburg.de> wrote:
> On 24.07.2014 14:09, Chris “Kwpolska” Warrick wrote:
>>
>> On Thu, Jul 24, 2014 at 2:01 PM, Wolfgang Maier
>> <wolfgang.maier at biologie.uni-freiburg.de> wrote:
>>>
>>> Try something like this (assuming bash):
>>>
>>> python test.py
>>> if [ $? = 0 ]; then
>>> python second.py
>>> fi
>>>
>>> as your shell script.
>>
>>
>> The [ ] and = should be doubled.
>
>
> ?? why that ?
Double brackets can do more:
http://stackoverflow.com/questions/2188199/how-to-use-double-or-single-bracket-parentheses-curly-braces
--
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
More information about the Tutor
mailing list