#NEWLINE# def _file_is_seekable( f ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# f . tell ( ) #NEWLINE# #UNINDENT# except IOError as e : #NEWLINE# #INDENT# if ( ( e . errno == errno . ESPIPE ) and ( e . strerror == 'Illegal seek' ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# raise #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True