#NEWLINE# def write_int( self , value , fmt = '%d' , sep = '' , full_record = False ) : #NEWLINE# #INDENT# '\n        Writes an integer.\n\n        value: int\n            Value to be written.\n\n        fmt: string\n            Format to use when writing as text.\n\n        sep: string\n            Appended to stream after writing `value`.\n\n        full_record: bool\n            If True, then write surrounding recordmarks.\n            Only meaningful if `unformatted`.\n        ' #NEWLINE# if self . binary : #NEWLINE# #INDENT# if ( full_record and self . unformatted ) : #NEWLINE# #INDENT# self . write_recordmark ( self . reclen_ints ( 1 ) ) #NEWLINE# #UNINDENT# fmt = ( '>' if self . big_endian else '<' ) #NEWLINE# fmt += ( 'q' if self . integer_8 else 'i' ) #NEWLINE# self . file . write ( struct . pack ( fmt , value ) ) #NEWLINE# if ( full_record and self . unformatted ) : #NEWLINE# #INDENT# self . write_recordmark ( self . reclen_ints ( 1 ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . file . write ( ( sep % value ) ) #NEWLINE# if full_record : #NEWLINE# #INDENT# self . file . write ( '\n' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if sep : #NEWLINE# #INDENT# self . file . write ( sep )