<h1>the Io module<a class="headerlink" href="#the-io-module" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="pNbody.io.checkfile">
<tt class="descclassname">pNbody.io.</tt><tt class="descname">checkfile</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#pNbody.io.checkfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if a file exists. An error is generated if the file
File <span class="nb">"<stdin>"</span>, line <span class="m">1</span>, in <span class="n-Identifier"><module></span>
File <span class="nb">"/home/epfl/revaz/local/lib64/python2.6/site-packages/pNbody/io.py"</span>, line <span class="m">33</span>, in <span class="n-Identifier">checkfile</span>
<span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="mi">915</span><span class="p">,</span><span class="s">'file </span><span class="si">%s</span><span class="s"> not found ! Pease check the file name.'</span><span class="o">%</span><span class="p">(</span><span class="n">name</span><span class="p">))</span>
<span class="nc">IOError</span>: <span class="n-Identifier">[Errno 915] file nofile not found ! Pease check the file name. </span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="pNbody.io.end_of_file">
<tt class="descclassname">pNbody.io.</tt><tt class="descname">end_of_file</tt><big>(</big><em>f</em>, <em>pio='no'</em>, <em>MPI=None</em><big>)</big><a class="headerlink" href="#pNbody.io.end_of_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if we have reached the end of the file f, False instead</p>
<tt class="descclassname">pNbody.io.</tt><tt class="descname">write_array</tt><big>(</big><em>file</em>, <em>vec</em><big>)</big><a class="headerlink" href="#pNbody.io.write_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Write an array to a file, in a very simple ascii format.</p>
<tr class="field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>file</strong> : the path to a file or an open file</p>
<p><strong>columns</strong> : list</p>
<blockquote>
<p>the list of the columns to read
if none, all columns are read</p>
</blockquote>
<p><strong>lines</strong> : list</p>
<blockquote>
<p>the list of the lines to read
if none, all lines are read</p>
</blockquote>
<p><strong>dtype</strong> : dtype</p>
<blockquote>
<p>the ndtype of the objects to read</p>
</blockquote>
<p><strong>skipheader</strong> : bool</p>
<blockquote>
<p>if true, do not read the header
if there is one</p>
</blockquote>
<p><strong>cchar</strong> : char</p>
<blockquote>
<p>lines begining with cchar are skiped
the first line is considered as the header</p>
</blockquote>
</td>
</tr>
<tr class="field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>data</strong> : Dict or ndarray</p>