"Steve S.L. Wong" <sailwong at alumni.cuhk.edu.hk> writes: > if (sscanf(command, "%d", &num) != 1 ) { > } One method could be try: num = int( command ) except: pass # or perhaps num = 0 else: # contents of if statement > > -- Lee Morgan