(self, args)
WRITE: Output machine-readable expressions to the screen or a file.
WRITE: Output machine-readable expressions to the screen or a file.
WRITE : Output machine - readable expressions to the screen or a file .
def write_(self, args):
        """WRITE: Output machine-readable expressions to the screen or a file."""
        file_number = next(args)
        if file_number is None:
            output = self.scrn_file
        else:
            file_number = values.to_int(file_number)
            error.range_check(0, 255, file_number)
            output = self.get(file_number, b'OAR')
        outstrs = []
        try:
            while True:
                expr = next(args)
                if isinstance(expr, values.String):
                    outstrs.append(b'"%s"' % expr.to_str())
                else:
                    outstrs.append(values.to_repr(expr, leading_space=False, type_sign=False))
        except StopIteration:
            # write the whole thing as one thing (this affects line breaks)
            output.write_line(b','.join(outstrs))
        except error.BASICError:
            if outstrs:
                output.write(b','.join(outstrs) + b',')
            raise
def write_ ( self , args ) : file_number = next ( args ) if file_number is None : output = self . scrn_file else : file_number = values . to_int ( file_number ) error . range_check ( 0 , 255 , file_number ) output = self . get ( file_number , b'OAR' ) outstrs = [ ] try : while True : expr = next ( args ) if isinstance ( expr , values . String ) : outstrs . append ( b'"%s"' % expr . to_str ( ) ) else : outstrs . append ( values . to_repr ( expr , leading_space = False , type_sign = False ) ) except StopIteration : # write the whole thing as one thing (this affects line breaks) output . write_line ( b',' . join ( outstrs ) ) except error . BASICError : if outstrs : output . write ( b',' . join ( outstrs ) + b',' ) raise