Write a NumberList box to file.
503795
def write(self, fptr):
        
        fptr.write(struct.pack('>I4s',
                               len(self.associations) * 4 + 8, b'nlst'))

        fmt = '>' + 'I' * len(self.associations)
        write_buffer = struct.pack(fmt, *self.associations)
        fptr.write(write_buffer)
423790
def write_int(self, value):
        """"""
        format = '!I'
        self.data.append(struct.pack(format, int(value)))
        self.size += 4
901840
def write_short(self, number):
        
        buf = pack(self.byte_order + "h", number)
        self.write(buf)
566307
def write_catalogue(self, output_file, key_list=SORTED_ATTRIBUTE_LIST):
        

        with open(output_file, 'w') as of:
            writer = csv.DictWriter(of, fieldnames=key_list)
            writer.writeheader()
            for i in range(self.get_number_events()):
                row_dict = {}
                for key in key_list:
                    if len(self.data[key]) > 0:
                        data = self.data[key][i]
                        if key in self.INT_ATTRIBUTE_LIST:
                            if np.isnan(data):
                                data = ''
                            else:
                                data = int(data)
                        if key in self.FLOAT_ATTRIBUTE_LIST:
                            if np.isnan(data):
                                data = ''
                            else:
                                data = float(data)
                    row_dict[key] = data
                writer.writerow(row_dict)
1278942
def writeln(self, data):
        
        self.f.write(" "*self.indent_level)
        self.f.write(data + "\n")
385938
def append_to_list(self, source, start=None, hasIndex=False):
        '''
        '''
        nfy = Numberify()
        try:
            if start is None:
                if type(source) is str:
                    if hasIndex is True:
                        newList = self.get_from_indexedFile(source)
                else:
                    newList = nfy.numberify_data(source,
                                                 len(self.nameDict) + 1)
            else:
                newList = nfy.numberify_data(source, start)
            self.nameDict = dict(self.nameDict.items() + newList.items())
            self.totalCount = len(self.nameDict)
        except:
            print 'Unknown error:', exc_info()[0]
905035
def write_file(self, fp, data):
        """"""
        with open(fp, 'w') as f:
            f.write(data)
54302
function _saveBigData($iStBlk, &$raList)
    {
        $FILE = $this->_FILEH_;
   
        // cycle through PPS's
        for ($i = 0; $i < count($raList); $i++) {
            if ($raList[$i]->Type != OLE_PPS_TYPE_DIR) {
                $raList[$i]->Size = $raList[$i]->_DataLen();
                if (($raList[$i]->Size >= OLE_DATA_SIZE_SMALL) ||
                    (($raList[$i]->Type == OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data)))
                {
                    // Write Data
                    if (isset($raList[$i]->_PPS_FILE)) {
                        $iLen = 0;
                        fseek($raList[$i]->_PPS_FILE, 0); // To The Top
                        while($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) {
                            $iLen += strlen($sBuff);
                            fwrite($FILE, $sBuff);
                        }
                    } else {
                        fwrite($FILE, $raList[$i]->_data);
                    }
           
                    if ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE) {
                        for ($j = 0; $j < ($this->_BIG_BLOCK_SIZE - ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)); $j++) {
                            fwrite($FILE, "\x00");
                        }
                    }
                    // Set For PPS
                    $raList[$i]->_StartBlock = $iStBlk;
                    $iStBlk += 
                            (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) +
                                (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0));
                }
                // Close file for each PPS, and unlink it
                if (isset($raList[$i]->_PPS_FILE)) {
                    @fclose($raList[$i]->_PPS_FILE);
                    $raList[$i]->_PPS_FILE = null;
                    @unlink($raList[$i]->_tmp_filename);
                }
            }
        }
    }
1359277
def _write_section(self, fp, section_name, section_items, delimiter):
        """"""
        fp.write("[{0}]\n".format(section_name))
        for key, value in section_items:
            value = self._interpolation.before_write(self, section_name, key,
                                                     value)
            if value is not None or not self._allow_no_value:
                value = delimiter + str(value).replace('\n', '\n\t')
            else:
                value = ""
            fp.write("{0}{1}\n".format(key, value))
        fp.write("\n")
665781
def write_array(self, data):
        """"""
        try:
            data.tofile(self._fh)
        except Exception:
            # BytesIO
            self._fh.write(data.tostring())
647971
def writeList(self, a):
        
        if self.writeReference(a) != -1:
            return

        self.context.addObject(a)

        self.writeType(TYPE_ARRAY)
        self.stream.write_ulong(len(a))

        for data in a:
            self.writeElement(data)
408176
def write(self, s):
        """"""
        for line in re.split(r'\n+', s):
            if line != '':
                self._logger.log(self._level, line)
371117
private void writeIonListContent(IonList val)
    {
        if (val.isNullValue())
        {
            writeByte((byte) (TYPE_LIST | NULL_LENGTH_MASK));
        }
        else
        {
            writeIonSequenceContent(val);
        }
    }
226034
def _toIntList(numstr, acceptX=0):
    
    res = []
    # Converting and removing invalid characters
    for i in numstr:
        if i in string.digits and i not in string.letters:
            res.append(int(i))

    # Converting control number into ISBN
    if acceptX and (numstr[-1] in 'Xx'):
        res.append(10)
    return res
168569
def writelines(self, lines):
        """"""
        self.make_dir()
        with open(self.path, "w") as f:
            return f.writelines(lines)
676926
def write_short(self, n):
        """"""
        if n < 0 or n > 65535:
            raise FrameSyntaxError(
                'Octet {0!r} out of range 0..65535'.format(n))
        self._flushbits()
        self.out.write(pack('>H', int(n)))
1251455
def _append_integer(self, value, _file):
        
        _tabs = '\t' * self._tctr
        _text = value
        _labs = '{tabs}<integer>{text}</integer>\n'.format(tabs=_tabs, text=_text)
        _file.write(_labs)