[Pydev-cvs] org.python.pydev/PySrc/ThirdParty/logilab/common/doc/html/public toc-logilab.common.modu
Brought to you by:
fabioz
Update of /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/common/doc/html/public In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7532/PySrc/ThirdParty/logilab/common/doc/html/public Added Files: toc-logilab.common.modutils-module.html toc-logilab.common.fileutils-module.html trees.html logilab.common.fileutils-module.html toc.html toc-logilab.common.textutils-module.html logilab.common.textutils-module.html index.html toc-everything.html indices.html epydoc.css frames.html exceptions.Exception-class.html logilab.common.modutils-module.html logilab.common.fileutils.UnresolvableError-class.html help.html logilab.common.modutils.NoSourceFile-class.html Log Message: New pylint version --- NEW FILE: logilab.common.modutils.NoSourceFile-class.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>logilab.common.modutils.NoSourceFile</title> <link rel="stylesheet" href="epydoc.css" type="text/css"></link> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <font size="-1"><b class="breadcrumbs"> Package logilab :: Package common :: <a href="logilab.common.modutils-module.html">Module modutils</a> :: Class NoSourceFile </b></font></br> </td> <td><table cellpadding="0" cellspacing="0"> <tr><td align="right"><font size="-2">[<a href="../private/logilab.common.modutils.NoSourceFile-class.html">show private</a> | hide private]</font></td></tr> <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="logilab.common.modutils.NoSourceFile-class.html" target="_top">no frames</a>]</font></td></tr> </table></td> </tr></table> <!-- =========== START OF CLASS DESCRIPTION =========== --> <h2 class="class">Class NoSourceFile</h2> <pre class="base-tree"> <a href="exceptions.Exception-class.html"><code>Exception</code></a> --+ | <b>NoSourceFile</b> </pre><br /> <hr/> <p>exception raised when we are not able to get a python source file for a precompiled file</p> <hr/> <!-- =========== START OF METHOD SUMMARY =========== --> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="summary"> <th colspan="2">Method Summary</th></tr> <tr bgcolor="#e8f0f8" class="group"> <th colspan="2"> Inherited from Exception</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> </table><br /> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Feb 16 13:40:10 2005</font></td> <td align="right"><a href="http://epydoc.sourceforge.net" ><font size="-2">http://epydoc.sf.net</font></a></td> </tr> </table> </body> </html> --- NEW FILE: indices.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Index</title> <link rel="stylesheet" href="epydoc.css" type="text/css"></link> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th bgcolor="#70b0f0" class="navselect"> Index </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> </td> <td><table cellpadding="0" cellspacing="0"> <tr><td align="right"><font size="-2">[<a href="../private/indices.html">show private</a> | hide private]</font></td></tr> <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="indices.html" target="_top">no frames</a>]</font></td></tr> </table></td> </tr></table> <br /> <!-- =========== START OF IDENTIFIER INDEX =========== --> <table class="index" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="index"> <th colspan="2">Identifier Index</th></tr> <tr><td width="15%"><a href="exceptions.Exception-class.html#__getitem__"><code>__getitem__</code></a></td> <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr> <tr><td width="15%"><a href="exceptions.Exception-class.html#__init__"><code>__init__</code></a></td> <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#__revision__"><code>__revision__</code></a></td> <td>Variable in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#__revision__"><code>__revision__</code></a></td> <td>Variable in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#__revision__"><code>__revision__</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="exceptions.Exception-class.html#__str__"><code>__str__</code></a></td> <td>Method in class <a href="exceptions.Exception-class.html"><code>exceptions.Exception</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#ANSI_COLORS"><code>ANSI_COLORS</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#ANSI_END"><code>ANSI_END</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#ANSI_PREFIX"><code>ANSI_PREFIX</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#ANSI_RESET"><code>ANSI_RESET</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#ANSI_STYLES"><code>ANSI_STYLES</code></a></td> <td>Variable in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#BASE_BLACKLIST"><code>BASE_BLACKLIST</code></a></td> <td>Variable in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#BUILTIN_MODULES"><code>BUILTIN_MODULES</code></a></td> <td>Variable in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#colorize_ansi"><code>colorize_ansi</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#ensure_fs_mode"><code>ensure_fs_mode</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="exceptions.Exception-class.html"><code>Exception</code></a></td> <td>Class in module <code>exceptions</code></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#exclude_files_by_ext"><code>exclude_files_by_ext</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#export"><code>export</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#file_from_modpath"><code>file_from_modpath</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#files_by_ext"><code>files_by_ext</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html"><code>fileutils</code></a></td> <td>Module in package <code>logilab.common</code></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#first_level_directory"><code>first_level_directory</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#get_by_ext"><code>get_by_ext</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#get_csv"><code>get_csv</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#get_mode"><code>get_mode</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#get_module_files"><code>get_module_files</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#get_module_part"><code>get_module_part</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#get_modules"><code>get_modules</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#get_source_file"><code>get_source_file</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#IGNORED_EXTENSIONS"><code>IGNORED_EXTENSIONS</code></a></td> <td>Variable in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#include_files_by_ext"><code>include_files_by_ext</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#is_binary"><code>is_binary</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#is_python_source"><code>is_python_source</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#is_relative"><code>is_relative</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#is_standard_module"><code>is_standard_module</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#lines"><code>lines</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#load_module_from_modpath"><code>load_module_from_modpath</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#load_module_from_name"><code>load_module_from_name</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#modpath_from_file"><code>modpath_from_file</code></a></td> <td>Function in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html"><code>modutils</code></a></td> <td>Module in package <code>logilab.common</code></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#norm_open"><code>norm_open</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#norm_read"><code>norm_read</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#normalize_paragraph"><code>normalize_paragraph</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#normalize_text"><code>normalize_text</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils.NoSourceFile-class.html"><code>NoSourceFile</code></a></td> <td>Class in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#pretty_match"><code>pretty_match</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#PY_SOURCE_EXTS"><code>PY_SOURCE_EXTS</code></a></td> <td>Variable in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#relative_path"><code>relative_path</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#searchall"><code>searchall</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.modutils-module.html#STD_LIB_DIR"><code>STD_LIB_DIR</code></a></td> <td>Variable in module <a href="logilab.common.modutils-module.html"><code>logilab.common.modutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#stream_lines"><code>stream_lines</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html"><code>textutils</code></a></td> <td>Module in package <code>logilab.common</code></td></tr> <tr><td width="15%"><a href="logilab.common.textutils-module.html#unquote"><code>unquote</code></a></td> <td>Function in module <a href="logilab.common.textutils-module.html"><code>logilab.common.textutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils.UnresolvableError-class.html"><code>UnresolvableError</code></a></td> <td>Class in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> <tr><td width="15%"><a href="logilab.common.fileutils-module.html#write_open_mode"><code>write_open_mode</code></a></td> <td>Function in module <a href="logilab.common.fileutils-module.html"><code>logilab.common.fileutils</code></a></td></tr> </table> <br /> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th bgcolor="#70b0f0" class="navselect"> Index </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Feb 16 13:40:12 2005</font></td> <td align="right"><a href="http://epydoc.sourceforge.net" ><font size="-2">http://epydoc.sf.net</font></a></td> </tr> </table> </body> </html> --- NEW FILE: logilab.common.fileutils.UnresolvableError-class.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>logilab.common.fileutils.UnresolvableError</title> <link rel="stylesheet" href="epydoc.css" type="text/css"></link> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <font size="-1"><b class="breadcrumbs"> Package logilab :: Package common :: <a href="logilab.common.fileutils-module.html">Module fileutils</a> :: Class UnresolvableError </b></font></br> </td> <td><table cellpadding="0" cellspacing="0"> <tr><td align="right"><font size="-2">[<a href="../private/logilab.common.fileutils.UnresolvableError-class.html">show private</a> | hide private]</font></td></tr> <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="logilab.common.fileutils.UnresolvableError-class.html" target="_top">no frames</a>]</font></td></tr> </table></td> </tr></table> <!-- =========== START OF CLASS DESCRIPTION =========== --> <h2 class="class">Class UnresolvableError</h2> <pre class="base-tree"> <a href="exceptions.Exception-class.html"><code>Exception</code></a> --+ | <b>UnresolvableError</b> </pre><br /> <hr/> <p>exception raised by relative path when it's unable to compute relative path between two paths</p> <hr/> <!-- =========== START OF METHOD SUMMARY =========== --> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="summary"> <th colspan="2">Method Summary</th></tr> <tr bgcolor="#e8f0f8" class="group"> <th colspan="2"> Inherited from Exception</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__getitem__" class="summary-sig-name"><code>__getitem__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="exceptions.Exception-class.html#__str__" class="summary-sig-name"><code>__str__</code></a>(<span class="summary-sig-vararg">...</span>)</span></code> </td></tr> </table><br /> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left"><font size="-2">Generated by Epydoc 2.1 on Wed Feb 16 13:40:10 2005</font></td> <td align="right"><a href="http://epydoc.sourceforge.net" ><font size="-2">http://epydoc.sf.net</font></a></td> </tr> </table> </body> </html> --- NEW FILE: logilab.common.fileutils-module.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>logilab.common.fileutils</title> <link rel="stylesheet" href="epydoc.css" type="text/css"></link> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- =========== START OF NAVBAR =========== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="center"> <th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th> <th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th> <th class="navbar"> <a class="navbar" href="help.html">Help</a> </th> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center"> <p class="nomargin"> Logilab's common library </p></th></tr></table> </th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <font size="-1"><b class="breadcrumbs"> Package logilab :: Package common :: Module fileutils </b></font></br> </td> <td><table cellpadding="0" cellspacing="0"> <tr><td align="right"><font size="-2">[<a href="../private/logilab.common.fileutils-module.html">show private</a> | hide private]</font></td></tr> <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="logilab.common.fileutils-module.html" target="_top">no frames</a>]</font></td></tr> </table></td> </tr></table> <!-- =========== START OF MODULE DESCRIPTION =========== --> <h2 class="module">Module logilab.common.fileutils</h2> <p>Some file / file path manipulation utilities.</p> <hr/> <p><b>Version:</b> <p>$Revision: 1.1 $</p> </p> <p><b>Author:</b> <p>Logilab</p> </p> <p><b>Contact:</b> <p><a class="reference" href="http://www.logilab.fr/">http://www.logilab.fr/</a> -- <a class="reference" href="mailto:python-projects@logilab.org">mailto:python-projects@logilab.org</a></p> </p> <p><b>Copyright:</b> <p>2003-2005 LOGILAB S.A. (Paris, FRANCE)</p> </p> <!-- =========== START OF EXCEPTIONS =========== --> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="summary"> <th colspan="2">Exceptions</th></tr> <tr><td width="15%"> <b><a href="logilab.common.fileutils.UnresolvableError-class.html"><code>UnresolvableError</code></a></b></td> <td>exception raised by relative path when it's unable to compute relative path between two paths</td></tr> </table><br /> <!-- =========== START OF FUNCTION SUMMARY =========== --> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="summary"> <th colspan="2">Function Summary</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#ensure_fs_mode" class="summary-sig-name"><code>ensure_mode</code></a>(<span class=summary-sig-arg>filepath</span>, <span class=summary-sig-arg>desired_mode</span>)</span></code> <br /> check that the given file has the given mode(s) set, else try to set it</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#get_mode" class="summary-sig-name"><code>get_mode</code></a>(<span class="summary-sig-vararg">*args</span>, <span class="summary-sig-kwarg">**kwargs</span>)</span></code> <br /> deprecated, use <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>files_by_ext</code></a> instead</td></tr> <tr bgcolor="#e8f0f8" class="group"> <th colspan="2"> path manipulation</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#first_level_directory" class="summary-sig-name"><code>first_level_directory</code></a>(<span class=summary-sig-arg>path</span>)</span></code> <br /> return the first level directory of a path</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#relative_path" class="summary-sig-name"><code>relative_path</code></a>(<span class=summary-sig-arg>from_file</span>, <span class=summary-sig-arg>to_file</span>)</span></code> <br /> try to get a relative path from from <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>from_file</code></a> to <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>to_file</code></a> (path will be absolute if to_file is an absolute file).</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#is_binary" class="summary-sig-name"><code>is_binary</code></a>(<span class=summary-sig-arg>filename</span>)</span></code> <br /> return true if filename may be a binary file, according to it's extension</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>list</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#files_by_ext" class="summary-sig-name"><code>files_by_ext</code></a>(<span class=summary-sig-arg>directory</span>, <span class=summary-sig-arg>include_exts</span>, <span class=summary-sig-arg>exclude_exts</span>, <span class=summary-sig-arg>exclude_dirs</span>)</span></code> <br /> return a list of files in a directory matching (or not) some extensions: you should either give the <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>include_exts</code></a> argument (and only files ending with one of the listed extensions will be considered) or the <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>exclude_exts</code></a> argument (and only files not ending by one of the listed extensions will be considered).</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>list</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#include_files_by_ext" class="summary-sig-name"><code>include_files_by_ext</code></a>(<span class=summary-sig-arg>directory</span>, <span class=summary-sig-arg>include_exts</span>, <span class=summary-sig-arg>exclude_dirs</span>)</span></code> <br /> return a list of files in a directory matching some extensions</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>list</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#exclude_files_by_ext" class="summary-sig-name"><code>exclude_files_by_ext</code></a>(<span class=summary-sig-arg>directory</span>, <span class=summary-sig-arg>exclude_exts</span>, <span class=summary-sig-arg>exclude_dirs</span>)</span></code> <br /> return a list of files in a directory not matching some extensions</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#get_by_ext" class="summary-sig-name"><code>get_by_ext</code></a>(<span class="summary-sig-vararg">*args</span>, <span class="summary-sig-kwarg">**kwargs</span>)</span></code> <br /> deprecated, use <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>files_by_ext</code></a> instead</td></tr> <tr bgcolor="#e8f0f8" class="group"> <th colspan="2"> file manipulation</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#norm_read" class="summary-sig-name"><code>norm_read</code></a>(<span class=summary-sig-arg>path</span>)</span></code> <br /> return the content of the file with normalized line feeds</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>file or StringIO</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#norm_open" class="summary-sig-name"><code>norm_open</code></a>(<span class=summary-sig-arg>path</span>)</span></code> <br /> return a stream for a file with content with normalized line feeds</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>list</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#lines" class="summary-sig-name"><code>lines</code></a>(<span class=summary-sig-arg>path</span>, <span class=summary-sig-arg>comments</span>)</span></code> <br /> return a list of non empty lines in the file located at <a href="logilab.common.fileutils-module.html#lines" class="link"><code>path</code></a></td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>list</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#stream_lines" class="summary-sig-name"><code>stream_lines</code></a>(<span class=summary-sig-arg>stream</span>, <span class=summary-sig-arg>comments</span>)</span></code> <br /> return a list of non empty lines in the given <a href="logilab.common.fileutils-module.html#stream_lines" class="link"><code>stream</code></a></td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#write_open_mode" class="summary-sig-name"><code>write_open_mode</code></a>(<span class=summary-sig-arg>filename</span>)</span></code> <br /> return the write mode that should used to open file</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#ensure_fs_mode" class="summary-sig-name"><code>ensure_fs_mode</code></a>(<span class=summary-sig-arg>filepath</span>, <span class=summary-sig-arg>desired_mode</span>)</span></code> <br /> check that the given file has the given mode(s) set, else try to set it</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td> <td><code><span class="summary-sig"><a href="logilab.common.fileutils-module.html#export" class="summary-sig-name"><code>export</code></a>(<span class=summary-sig-arg>from_dir</span>, <span class=summary-sig-arg>to_dir</span>, <span class=summary-sig-arg>blacklist</span>, <span class=summary-sig-arg>ignore_ext</span>, <span class=summary-sig-arg>verbose</span>)</span></code> <br /> make a mirror of <a href="logilab.common.fileutils-module.html#export" class="link"><code>from_dir</code></a> in <a href="logilab.common.fileutils-module.html#export" class="link"><code>to_dir</code></a>, omitting directories and files listed in the black list or ending with one of the given extensions</td></tr> </table><br /> <!-- =========== START OF VARIABLE SUMMARY =========== --> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="summary"> <th colspan="2">Variable Summary</th></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td> <td><b><a href="logilab.common.fileutils-module.html#__revision__"><code>__revision__</code></a></b> = <span title="'$Id: logilab.common.fileutils-module.html,v 1.1 2005/02/16 16:45:37 fabioz Exp $'"><code><span class="variable-quote">'</span>$Id: fileutils.py,v 1.24 2005/02/08 17:2<span class="variable-ellipsis">...</span></code> </span></td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>tuple</p></font></td> <td><b><a href="logilab.common.fileutils-module.html#BASE_BLACKLIST"><code>BASE_BLACKLIST</code></a></b>: list files or directories ignored by default by the <a href="logilab.common.fileutils-module.html#export" class="link"><code>export</code></a> function</td></tr> <tr><td align="right" valign="top" width="15%"><font size="-1"><p>tuple</p></font></td> <td><b><a href="logilab.common.fileutils-module.html#IGNORED_EXTENSIONS"><code>IGNORED_EXTENSIONS</code></a></b>: list file extensions ignored by default by the <a href="logilab.common.fileutils-module.html#export" class="link"><code>export</code></a> function</td></tr> </table><br /> <!-- =========== START OF FUNCTION DETAILS =========== --> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="details"> <th colspan="2">Function Details</th></tr> </table> <a name="first_level_directory"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">first_level_directory</span>(<span class=sig-arg>path</span>)</span> </h3> <p>return the first level directory of a path</p> <pre class="doctest-block"> >>> first_level_directory('home/syt/work') 'home' >>> first_level_directory('/home/syt/work') '/' >>> first_level_directory('work') 'work' >>> </pre> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>path</b></code> - <p>the path for which we want the first level directory</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the first level directory appearing in <a href="logilab.common.fileutils-module.html#first_level_directory" class="link"><code>path</code></a></p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="relative_path"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">relative_path</span>(<span class=sig-arg>from_file</span>, <span class=sig-arg>to_file</span>)</span> </h3> <p>try to get a relative path from from <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>from_file</code></a> to <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>to_file</code></a> (path will be absolute if to_file is an absolute file). This function is useful to create link in <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>from_file</code></a> to <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>to_file</code></a>. This typical use case is used in this function description.</p> <p>If both files are relative, they're expected to be relative to the same directory.</p> <pre class="doctest-block"> >>> relative_path( from_file='toto/index.html', to_file='index.html') '../index.html' >>> relative_path( from_file='index.html', to_file='toto/index.html') 'toto/index.html' >>> relative_path( from_file='tutu/index.html', to_file='toto/index.html') '../toto/index.html' >>> relative_path( from_file='toto/index.html', to_file='/index.html') '/index.html' >>> relative_path( from_file='/toto/index.html', to_file='/index.html') '../index.html' >>> relative_path( from_file='/toto/index.html', to_file='/toto/summary.html') 'summary.html' >>> relative_path( from_file='index.html', to_file='index.html') '' >>> relative_path( from_file='/index.html', to_file='toto/index.html') Traceback (most recent call last): File "<string>", line 1, in ? File "<stdin>", line 37, in relative_path UnresolvableError >>> relative_path( from_file='/index.html', to_file='/index.html') '' >>> </pre> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>from_file</b></code> - <p>source file (where links will be inserted)</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>to_file</b></code> - <p>target file (on which links point)</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the relative path of <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>to_file</code></a> from <a href="logilab.common.fileutils-module.html#relative_path" class="link"><code>from_file</code></a></p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Raises:</b></dt> <dd><code><b>UnresolvableError</b></code> - <p>if it has been unable to guess a correct path</p> </dl> </dd></dl> </td></tr></table> <a name="is_binary"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">is_binary</span>(<span class=sig-arg>filename</span>)</span> </h3> <p>return true if filename may be a binary file, according to it's extension</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>filename</b></code> - <p>the name of the file</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>true if the file is a binary file (actually if it's mime type isn't begining by text/)</p> <br /><i> (type=<p>bool</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="files_by_ext"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">files_by_ext</span>(<span class=sig-arg>directory</span>, <span class=sig-arg>include_exts</span>=<span class=sig-default>None</span>, <span class=sig-arg>exclude_exts</span>=<span class=sig-default>None</span>, <span class=sig-arg>exclude_dirs</span>=<span class=sig-default>('CVS', '.svn')</span>)</span> </h3> <p>return a list of files in a directory matching (or not) some extensions: you should either give the <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>include_exts</code></a> argument (and only files ending with one of the listed extensions will be considered) or the <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>exclude_exts</code></a> argument (and only files not ending by one of the listed extensions will be considered). Subdirectories are processed recursivly.</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>directory</b></code> - <p>directory where files should be searched</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>include_exts</b></code> - <p>list of file extensions to consider</p> <br /><i> (type=<p>list or tuple or None</p>)</i> <dd><code><b>exclude_exts</b></code> - <p>list of file extensions to ignore</p> <br /><i> (type=<p>list or tuple or None</p>)</i> <dd><code><b>exclude_dirs</b></code> - <p>list of directory where we should not recurse</p> <br /><i> (type=<p>list or tuple or None</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the list of files matching input criteria</p> <br /><i> (type=<p>list</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="include_files_by_ext"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">include_files_by_ext</span>(<span class=sig-arg>directory</span>, <span class=sig-arg>include_exts</span>, <span class=sig-arg>exclude_dirs</span>=<span class=sig-default>('CVS', '.svn')</span>)</span> </h3> <p>return a list of files in a directory matching some extensions</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>directory</b></code> - <p>directory where files should be searched</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>include_exts</b></code> - <p>list of file extensions to consider</p> <br /><i> (type=<p>list or tuple or None</p>)</i> <dd><code><b>exclude_dirs</b></code> - <p>list of directory where we should not recurse</p> <br /><i> (type=<p>list or tuple or None</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the list of files matching input criteria</p> <br /><i> (type=<p>list</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="exclude_files_by_ext"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">exclude_files_by_ext</span>(<span class=sig-arg>directory</span>, <span class=sig-arg>exclude_exts</span>, <span class=sig-arg>exclude_dirs</span>=<span class=sig-default>('CVS', '.svn')</span>)</span> </h3> <p>return a list of files in a directory not matching some extensions</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>directory</b></code> - <p>directory where files should be searched</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>exclude_exts</b></code> - <p>list of file extensions to ignore</p> <br /><i> (type=<p>list or tuple or None</p>)</i> <dd><code><b>exclude_dirs</b></code> - <p>list of directory where we should not recurse</p> <br /><i> (type=<p>list or tuple or None</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the list of files matching input criteria</p> <br /><i> (type=<p>list</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="get_by_ext"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">get_by_ext</span>(<span class="sig-vararg">*args</span>, <span class="sig-kwarg">**kwargs</span>)</span> </h3> <p>deprecated, use <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>files_by_ext</code></a> instead</p> <dl><dt></dt><dd> </dd></dl> </td></tr></table> <a name="norm_read"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">norm_read</span>(<span class=sig-arg>path</span>)</span> </h3> <p>return the content of the file with normalized line feeds</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>path</b></code> - <p>path to the file to read</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the content of the file with normalized line feeds</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="norm_open"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">norm_open</span>(<span class=sig-arg>path</span>)</span> </h3> <p>return a stream for a file with content with normalized line feeds</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>path</b></code> - <p>path to the file to open</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the opened file with normalized line feeds</p> <br /><i> (type=<p>file or StringIO</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="lines"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">lines</span>(<span class=sig-arg>path</span>, <span class=sig-arg>comments</span>=<span class=sig-default>None</span>)</span> </h3> <p>return a list of non empty lines in the file located at <a href="logilab.common.fileutils-module.html#lines" class="link"><code>path</code></a></p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>path</b></code> - <p>path to the file</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>comments</b></code> - <p>optional string which can be used to comment a line in the file (ie lines starting with this string won't be returned)</p> <br /><i> (type=<p>str or None</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>a list of stripped line in the file, without empty and commented lines</p> <br /><i> (type=<p>list</p>)</i> </dd> </dl> <p><b>Warning:</b> <p>at some point this function will probably return an iterator</p> </p> </dd></dl> </td></tr></table> <a name="stream_lines"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">stream_lines</span>(<span class=sig-arg>stream</span>, <span class=sig-arg>comments</span>=<span class=sig-default>None</span>)</span> </h3> <p>return a list of non empty lines in the given <a href="logilab.common.fileutils-module.html#stream_lines" class="link"><code>stream</code></a></p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>stream</b></code> - <p>file like object</p> <br /><i> (type=<p>object implementing 'xreadlines' or 'readlines'</p>)</i> <dd><code><b>comments</b></code> - <p>optional string which can be used to comment a line in the file (ie lines starting with this string won't be returned)</p> <br /><i> (type=<p>str or None</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>a list of stripped line in the file, without empty and commented lines</p> <br /><i> (type=<p>list</p>)</i> </dd> </dl> <p><b>Warning:</b> <p>at some point this function will probably return an iterator</p> </p> </dd></dl> </td></tr></table> <a name="write_open_mode"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">write_open_mode</span>(<span class=sig-arg>filename</span>)</span> </h3> <p>return the write mode that should used to open file</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>filename</b></code> - <p>the name of the file</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> <dl><dt><b>Returns:</b></dt> <dd> <p>the mode that should be use to open the file ('w' or 'wb')</p> <br /><i> (type=<p>str</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="ensure_fs_mode"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">ensure_fs_mode</span>(<span class=sig-arg>filepath</span>, <span class=sig-arg>desired_mode</span>)</span> </h3> <p>check that the given file has the given mode(s) set, else try to set it</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>filepath</b></code> - <p>path of the file</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>desired_mode</b></code> - <p>ORed flags describing the desired mode. Use constants from the <code>stat</code> module for file permission's modes</p> <br /><i> (type=<p>int</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="export"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">export</span>(<span class=sig-arg>from_dir</span>, <span class=sig-arg>to_dir</span>, <span class=sig-arg>blacklist</span>=<span class=sig-default>('CVS', '.svn', 'debian', 'dist', 'build', '__buildlog')</span>, <span class=sig-arg>ignore_ext</span>=<span class=sig-default>('.pyc', '.pyo', '.elc', '~')</span>, <span class=sig-arg>verbose</span>=<span class=sig-default>0</span>)</span> </h3> <p>make a mirror of <a href="logilab.common.fileutils-module.html#export" class="link"><code>from_dir</code></a> in <a href="logilab.common.fileutils-module.html#export" class="link"><code>to_dir</code></a>, omitting directories and files listed in the black list or ending with one of the given extensions</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>from_dir</b></code> - <p>directory to export</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>to_dir</b></code> - <p>destination directory</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>blacklist</b></code> - <p>list of files or directories to ignore, default to the content of <a href="logilab.common.fileutils-module.html#BASE_BLACKLIST" class="link"><code>BASE_BLACKLIST</code></a></p> <br /><i> (type=<p>list or tuple</p>)</i> <dd><code><b>ignore_ext</b></code> - <p>list of extensions to ignore, default to the content of <a href="logilab.common.fileutils-module.html#IGNORED_EXTENSIONS" class="link"><code>IGNORED_EXTENSIONS</code></a></p> <br /><i> (type=<p>list or tuple</p>)</i> <dd><code><b>verbose</b></code> - <p>flag indicating wether information about exported files should be printed to stderr, default to True</p> <br /><i> (type=<p>bool</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="ensure_fs_mode"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">ensure_mode</span>(<span class=sig-arg>filepath</span>, <span class=sig-arg>desired_mode</span>)</span> </h3> <p>check that the given file has the given mode(s) set, else try to set it</p> <dl><dt></dt><dd> <dl><dt><b>Parameters:</b></dt> <dd><code><b>filepath</b></code> - <p>path of the file</p> <br /><i> (type=<p>str</p>)</i> <dd><code><b>desired_mode</b></code> - <p>ORed flags describing the desired mode. Use constants from the <code>stat</code> module for file permission's modes</p> <br /><i> (type=<p>int</p>)</i> </dd> </dl> </dd></dl> </td></tr></table> <a name="get_mode"></a> <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td> <h3><span class="sig"><span class="sig-name">get_mode</span>(<span class="sig-vararg">*args</span>, <span class="sig-kwarg">**kwargs</span>)</span> </h3> <p>deprecated, use <a href="logilab.common.fileutils-module.html#files_by_ext" class="link"><code>files_by_ext</code></a> instead</p> <dl><dt></dt><dd> </dd></dl> </td></tr></table> <br /> <!-- =========== START OF VARIABLE DETAILS =========== --> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="details"> <th colspan="2">Variable Details</th></tr> </table> <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td> <a name="__revision__"></a> ... [truncated message content] |