def isstdin():
 if (not _state):
  raise RuntimeError('no active input()')
 return _state.isstdin()

def isstdin ( ) : if ( not _state ) : raise RuntimeError ( 'no active input()' ) return _state . isstdin ( )
returns true if the last line was read from sys .