Permalink
Browse files

Merge branch 'feature/pep8' into develop

  • Loading branch information...
2 parents 9521f4a + 220689e commit 5c141330faf09dad70a12bc321f4c564917d0a91 @KelSolaar committed May 12, 2014
Showing with 8,959 additions and 12,838 deletions.
  1. +1 −1 .travis.yml
  2. +401 −264 docs/help/Foundations_Manual.html
  3. +10 −9 docs/sphinx/source/conf.py
  4. +6 −6 docs/sphinx/source/index.rst
  5. +24 −24 docs/sphinx/source/resources/pages/api.rst
  6. +117 −131 foundations/cache.py
  7. +219 −223 foundations/common.py
  8. +31 −44 foundations/core.py
  9. +0 −349 foundations/dataStructures.py
  10. +339 −0 foundations/data_structures.py
  11. +116 −128 foundations/decorators.py
  12. +258 −274 foundations/environment.py
  13. +629 −611 foundations/exceptions.py
  14. +93 −107 foundations/globals/constants.py
  15. +53 −63 foundations/guerilla.py
  16. +385 −394 foundations/io.py
  17. +353 −372 foundations/library.py
  18. +131 −138 foundations/namespace.py
  19. +941 −968 foundations/nodes.py
  20. +1,361 −1,383 foundations/parsers.py
  21. +111 −131 foundations/pkzip.py
  22. +0 −237 foundations/rotatingBackup.py
  23. +217 −0 foundations/rotating_backup.py
  24. +104 −113 foundations/shell.py
  25. +380 −379 foundations/strings.py
  26. +0 −315 foundations/tcpServer.py
  27. +296 −0 foundations/tcp_server.py
  28. +32 −38 foundations/tests/tests.py
  29. +0 −100 foundations/tests/testsFoundations/resources/dummy.py
  30. +0 −112 foundations/tests/testsFoundations/testsCache.py
  31. +0 −220 foundations/tests/testsFoundations/testsCommon.py
  32. +0 −52 foundations/tests/testsFoundations/testsCore.py
  33. +0 −165 foundations/tests/testsFoundations/testsDataStructures.py
  34. +0 −52 foundations/tests/testsFoundations/testsDecorators.py
  35. +0 −191 foundations/tests/testsFoundations/testsEnvironment.py
  36. +0 −322 foundations/tests/testsFoundations/testsExceptions.py
  37. +0 −198 foundations/tests/testsFoundations/testsGlobals/testsConstants.py
  38. +0 −293 foundations/tests/testsFoundations/testsIo.py
  39. +0 −148 foundations/tests/testsFoundations/testsLibrary.py
  40. +0 −131 foundations/tests/testsFoundations/testsNamespace.py
  41. +0 −475 foundations/tests/testsFoundations/testsNodes.py
  42. +0 −867 foundations/tests/testsFoundations/testsParsers.py
  43. +0 −100 foundations/tests/testsFoundations/testsPkzip.py
  44. +0 −103 foundations/tests/testsFoundations/testsRotatingBackup.py
  45. +0 −786 foundations/tests/testsFoundations/testsShell.py
  46. +0 −369 foundations/tests/testsFoundations/testsStrings.py
  47. +0 −130 foundations/tests/testsFoundations/testsTcpServer.py
  48. +0 −761 foundations/tests/testsFoundations/testsTrace.py
  49. +0 −74 foundations/tests/testsFoundations/testsUi/testsCommon.py
  50. +0 −270 foundations/tests/testsFoundations/testsVerbose.py
  51. +0 −217 foundations/tests/testsFoundations/testsWalkers.py
  52. 0 foundations/tests/{testsFoundations/testsUi → tests_foundations}/__init__.py
  53. 0 foundations/tests/{testsFoundations/testsGlobals → tests_foundations/resources}/__init__.py
  54. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/defaults.rc
  55. +92 −0 foundations/tests/tests_foundations/resources/dummy.py
  56. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/libraries/freeImage/FreeImage.dll
  57. 0 ...ons/tests/{testsFoundations → tests_foundations}/resources/libraries/freeImage/libfreeimage.dylib
  58. 0 ...ations/tests/{testsFoundations → tests_foundations}/resources/libraries/freeImage/libfreeimage.so
  59. 0 ...testsFoundations/resources/standard/loremIpsum.txt → tests_foundations/resources/lorem_ipsum.txt}
  60. 0 ...sts/{testsFoundations/resources/parsingErrors.rc → tests_foundations/resources/parsing_errors.rc}
  61. 0 foundations/tests/{testsFoundations/resources/standard → tests_foundations/resources}/standard.ibl
  62. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/standard.plist
  63. 0 foundations/tests/{testsFoundations/resources/standard → tests_foundations/resources}/standard.rc
  64. 0 foundations/tests/{testsFoundations/resources/standard → tests_foundations/resources}/standard.sIBLT
  65. BIN foundations/tests/{testsFoundations → tests_foundations}/resources/standard.zip
  66. 0 .../{testsFoundations → tests_foundations}/resources/standard/level_0/level_1/level_2/standard.sIBLT
  67. 0 ..._0/level_1/loremIpsum.txt → tests_foundations/resources/standard/level_0/level_1/lorem_ipsum.txt}
  68. 0 ...tions/tests/{testsFoundations → tests_foundations}/resources/standard/level_0/level_1/standard.rc
  69. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/standard/level_0/standard.ibl
  70. 0 ...testsFoundations/resources/loremIpsum.txt → tests_foundations/resources/standard/lorem_ipsum.txt}
  71. 0 foundations/tests/{testsFoundations/resources → tests_foundations/resources/standard}/standard.ibl
  72. 0 foundations/tests/{testsFoundations/resources → tests_foundations/resources/standard}/standard.rc
  73. 0 foundations/tests/{testsFoundations/resources → tests_foundations/resources/standard}/standard.sIBLT
  74. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/stripping.rc
  75. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/ui/Tests_Widget.ui
  76. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/标准.ibl
  77. 0 foundations/tests/{testsFoundations/resources/标准 → tests_foundations/resources/标准/0级/1级/2级}/内容.txt
  78. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/标准/0级/1级/2级/物.txt
  79. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/标准/0级/1级/空虚.txt
  80. 0 foundations/tests/{testsFoundations → tests_foundations}/resources/标准/0级/无效.txt
  81. 0 foundations/tests/{testsFoundations/resources/标准/0级/1级/2级 → tests_foundations/resources/标准}/内容.txt
  82. +101 −0 foundations/tests/tests_foundations/tests_cache.py
  83. +214 −0 foundations/tests/tests_foundations/tests_common.py
  84. +38 −0 foundations/tests/tests_foundations/tests_core.py
  85. +156 −0 foundations/tests/tests_foundations/tests_data_structures.py
  86. +38 −0 foundations/tests/tests_foundations/tests_decorators.py
  87. +182 −0 foundations/tests/tests_foundations/tests_environment.py
  88. +322 −0 foundations/tests/tests_foundations/tests_exceptions.py
  89. 0 foundations/tests/{testsFoundations/resources → tests_foundations/tests_globals}/__init__.py
  90. +186 −0 foundations/tests/tests_foundations/tests_globals/tests_constants.py
  91. +286 −0 foundations/tests/tests_foundations/tests_io.py
  92. +137 −0 foundations/tests/tests_foundations/tests_library.py
  93. +125 −0 foundations/tests/tests_foundations/tests_namespace.py
  94. +474 −0 foundations/tests/tests_foundations/tests_nodes.py
Sorry, we could not display the entire diff because it was too big.
View
2 .travis.yml
@@ -7,7 +7,7 @@ before_install:
- git clone -b hdrlabs git://github.com/KelSolaar/FreeImage.git
- cd FreeImage
- make -j 4
- - cp libfreeimage-3.15.1.so ../Foundations/foundations/tests/testsFoundations/resources/libraries/freeImage/libfreeimage.so
+ - cp libfreeimage-3.15.1.so ../Foundations/foundations/tests/tests_foundations/resources/libraries/freeimage/libfreeimage.so
- cd ..
- curl -O -L http://downloads.sourceforge.net/project/pyqt/sip/sip-4.13.3/sip-4.13.3.tar.gz
- tar -xvf sip-4.13.3.tar.gz
View
665 docs/help/Foundations_Manual.html
@@ -1,313 +1,450 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
- <title></title>
- <style type="text/css">
-/*<![CDATA[*/
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/"/>
+ <title></title>
+ <style type="text/css">
+ /*<![CDATA[*/
- body {
- background-color: rgb(252, 252, 252);
- color: rgb(64, 64, 64);
- font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
- text-align: justify;
- margin: 10px 10px 10px 10px;
- }
+ body {
+ background-color: rgb(252, 252, 252);
+ color: rgb(64, 64, 64);
+ font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
+ text-align: justify;
+ margin: 10px 10px 10px 10px;
+ }
- A:link {
- color: rgb(41, 128, 185);
- text-decoration: none;
- }
+ A:link {
+ color: rgb(41, 128, 185);
+ text-decoration: none;
+ }
- A:visited {
- text-decoration: none;
- color: rgb(155, 89, 182);
- }
+ A:visited {
+ text-decoration: none;
+ color: rgb(155, 89, 182);
+ }
- A:active {
- text-decoration: none;
- color: rgb(41, 128, 185);
- }
+ A:active {
+ text-decoration: none;
+ color: rgb(41, 128, 185);
+ }
- A:hover {
- text-decoration: underline;
- color: rgb(48, 145, 209);
- }
+ A:hover {
+ text-decoration: underline;
+ color: rgb(48, 145, 209);
+ }
- h1, h2, h3, h4, h5, h6 {
- font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif;
- font-weight: 700;
- margin-top: 0;
- }
+ h1, h2, h3, h4, h5, h6 {
+ font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif;
+ font-weight: 700;
+ margin-top: 0;
+ }
- p {
- font-size: 16px;
- line-height: 24px;
- margin: 0;
- margin-bottom: 24px;
- }
+ p {
+ font-size: 16px;
+ line-height: 24px;
+ margin: 0;
+ margin-bottom: 24px;
+ }
- table {
- border-color: rgb(225, 228, 229);
- border-collapse: collapse;
- border-style: solid;
- border-width: 1px;
- }
+ table {
+ border-color: rgb(225, 228, 229);
+ border-collapse: collapse;
+ border-style: solid;
+ border-width: 1px;
+ }
- tt {
- background-color: rgb(255, 255, 255);
- color: rgb(80, 80, 80);
- padding: 5px;
- white-space: -moz-pre-wrap !important;
- }
+ tt {
+ background-color: rgb(255, 255, 255);
+ color: rgb(80, 80, 80);
+ padding: 5px;
+ white-space: -moz-pre-wrap !important;
+ }
- pre {
- background: rgb(255, 255, 255);
- border: 1px solid rgb(225, 228, 229);
- display: block;
- font-size: 12px;
- font-family: "Incosolata", "Consolata", "Monaco", monospace;
- line-height: 1.5;
- margin: 1px 0px 24px 0px;
- overflow: auto;
- padding: 12px 12px;
- white-space: pre;
- }
- /*]]>*/
- </style>
- </head>
- <body>
- <div class="document">
- <div class="section" id="foundations-manual-help-file">
- <h1>
- Foundations - Manual - Help File
- </h1><br />
- </div>
- <div class="section" id="table-of-content">
- <h1>
- Table Of Content
- </h1><!-- .tocTree -->
- <ul class="simple">
- <li>
- <a class="reference internal" href="#introduction">Introduction</a>
- </li>
- <li>
- <a class="reference internal" href="#installation">Installation</a>
- </li>
- <li>
- <a class="reference internal" href="#usage">Usage</a>
- </li>
- <li>
- <a class="reference internal" href="#api">Api</a>
- </li>
- <li>
- <a class="reference internal" href="#changes">Changes</a>
- </li>
- <li>
- <a class="reference internal" href="#about">About</a>
- </li>
- </ul><br />
- <!-- .introduction -->
- </div>
- <div class="section" id="id1">
- <h1>
- <span class="target" id="introduction">Introduction</span>
- </h1>
- <p>
- <strong>Foundations</strong> is the core package of <a class="reference external" href="http://github.com/KelSolaar/Oncilla">Oncilla</a>, <a class="reference external" href="http://github.com/KelSolaar/Color">Color</a>, <a class="reference external" href="http://github.com/KelSolaar/Manager">Manager</a>, <a class="reference external" href="http://github.com/KelSolaar/Umbra">Umbra</a>, <a class="reference external" href="http://github.com/KelSolaar/sIBL_GUI">sIBL_GUI</a>, <a class="reference external" href="http://github.com/KelSolaar/sIBL_Reporter">sIBL_Reporter</a>. It provides modules defining various utilities objects used in those packages.
- </p><br />
- <!-- .installation -->
- </div>
- <div class="section" id="id2">
- <h1>
- <span class="target" id="installation">Installation</span>
- </h1>
- <p>
- The following dependencies are needed:
- </p>
- <ul class="simple">
- <li>
- <strong>Python 2.6.7</strong> or <strong>Python 2.7.3</strong>: <a class="reference external" href="http://www.python.org/">http://www.python.org/</a>
- </li>
- <li>
- <strong>PyQt</strong>: <a class="reference external" href="http://www.riverbankcomputing.co.uk/">http://www.riverbankcomputing.co.uk/</a>
- </li>
- </ul>
- <p>
- To install <strong>Foundations</strong> from the <a class="reference external" href="http://pypi.python.org/pypi/Foundations">Python Package Index</a> you can issue this command in a shell:
- </p>
+ pre {
+ background: rgb(255, 255, 255);
+ border: 1px solid rgb(225, 228, 229);
+ display: block;
+ font-size: 12px;
+ font-family: "Incosolata", "Consolata", "Monaco", monospace;
+ line-height: 1.5;
+ margin: 1px 0px 24px 0px;
+ overflow: auto;
+ padding: 12px 12px;
+ white-space: pre;
+ }
+
+ /*]]>*/
+ </style>
+</head>
+<body>
+<div class="document">
+<div class="section" id="foundations-manual-help-file">
+ <h1>
+ Foundations - Manual - Help File
+ </h1><br/>
+</div>
+<div class="section" id="table-of-content">
+ <h1>
+ Table Of Content
+ </h1><!-- .tocTree -->
+ <ul class="simple">
+ <li>
+ <a class="reference internal" href="#introduction">Introduction</a>
+ </li>
+ <li>
+ <a class="reference internal" href="#installation">Installation</a>
+ </li>
+ <li>
+ <a class="reference internal" href="#usage">Usage</a>
+ </li>
+ <li>
+ <a class="reference internal" href="#api">Api</a>
+ </li>
+ <li>
+ <a class="reference internal" href="#changes">Changes</a>
+ </li>
+ <li>
+ <a class="reference internal" href="#about">About</a>
+ </li>
+ </ul>
+ <br/>
+ <!-- .introduction -->
+</div>
+<div class="section" id="id1">
+ <h1>
+ <span class="target" id="introduction">Introduction</span>
+ </h1>
+
+ <p>
+ <strong>Foundations</strong> is the core package of <a class="reference external"
+ href="http://github.com/KelSolaar/Oncilla">Oncilla</a>,
+ <a class="reference external" href="http://github.com/KelSolaar/Color">Color</a>, <a class="reference external"
+ href="http://github.com/KelSolaar/Manager">Manager</a>,
+ <a class="reference external" href="http://github.com/KelSolaar/Umbra">Umbra</a>, <a class="reference external"
+ href="http://github.com/KelSolaar/sIBL_GUI">sIBL_GUI</a>,
+ <a class="reference external" href="http://github.com/KelSolaar/sIBL_Reporter">sIBL_Reporter</a>. It provides
+ modules defining various utilities objects used in those packages.
+ </p><br/>
+ <!-- .installation -->
+</div>
+<div class="section" id="id2">
+ <h1>
+ <span class="target" id="installation">Installation</span>
+ </h1>
+
+ <p>
+ The following dependencies are needed:
+ </p>
+ <ul class="simple">
+ <li>
+ <strong>Python 2.6.7</strong> or <strong>Python 2.7.3</strong>: <a class="reference external"
+ href="http://www.python.org/">http://www.python.org/</a>
+ </li>
+ <li>
+ <strong>PyQt</strong>: <a class="reference external" href="http://www.riverbankcomputing.co.uk/">http://www.riverbankcomputing.co.uk/</a>
+ </li>
+ </ul>
+ <p>
+ To install <strong>Foundations</strong> from the <a class="reference external"
+ href="http://pypi.python.org/pypi/Foundations">Python
+ Package Index</a> you can issue this command in a shell:
+ </p>
<pre class="literal-block">
pip install Foundations
</pre>
- <p>
- or this alternative command:
- </p>
+ <p>
+ or this alternative command:
+ </p>
<pre class="literal-block">
easy_install Foundations
</pre>
- <p>
- You can also directly install from <a class="reference external" href="http://github.com/KelSolaar/Foundations">Github</a> source repository:
- </p>
+ <p>
+ You can also directly install from <a class="reference external" href="http://github.com/KelSolaar/Foundations">Github</a>
+ source repository:
+ </p>
<pre class="literal-block">
git clone git://github.com/KelSolaar/Foundations.git
cd Foundations
python setup.py install
</pre>
- <p>
- If you want to build the documentation you will also need:
- </p>
- <ul class="simple">
- <li>
- <strong>Tidy</strong> <a class="reference external" href="http://tidy.sourceforge.net/">http://tidy.sourceforge.net/</a>
- </li>
- </ul><br />
- <!-- .usage -->
- </div>
- <div class="section" id="id3">
- <h1>
- <span class="target" id="usage">Usage</span>
- </h1>
- <p>
- Given the large spectrum of the objects defined in <strong>Foundations</strong> package, please refer to <a class="reference external" href="http://thomasmansencal.com/Sharing/Foundations/Support/Documentation/Api/index.html">Foundations - Api</a> for precise usage examples about each modules. Here are listed a few non exhaustive usage examples.
- </p>
- <ul class="simple">
- <li>
- <strong>foundations.dataStructures.Structure</strong>:
- </li>
- </ul>
+ <p>
+ If you want to build the documentation you will also need:
+ </p>
+ <ul class="simple">
+ <li>
+ <strong>Tidy</strong> <a class="reference external" href="http://tidy.sourceforge.net/">http://tidy.sourceforge.net/</a>
+ </li>
+ </ul>
+ <br/>
+ <!-- .usage -->
+</div>
+<div class="section" id="id3">
+ <h1>
+ <span class="target" id="usage">Usage</span>
+ </h1>
+
+ <p>
+ Given the large spectrum of the objects defined in <strong>Foundations</strong> package, please refer to <a
+ class="reference external"
+ href="http://thomasmansencal.com/Sharing/Foundations/Support/Documentation/Api/index.html">Foundations -
+ Api</a> for precise usage examples about each modules. Here are listed a few non exhaustive usage examples.
+ </p>
+ <ul class="simple">
+ <li>
+ <strong>foundations.dataStructures.Structure</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span> <span class="operator">=</span> <span class="name">Structure</span><span class="punctuation">(</span><span class="name">firstName</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">,</span> <span class="name">lastName</span><span class="operator">=</span><span class="literal string">&quot;John&quot;</span><span class="punctuation">,</span> <span class="name">gender</span><span class="operator">=</span><span class="literal string">&quot;male&quot;</span><span class="punctuation">)</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span class="name">firstName</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span> <span class="operator">=</span> <span
+ class="name">Structure</span><span class="punctuation">(</span><span
+ class="name">firstName</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span
+ class="punctuation">,</span> <span class="name">lastName</span><span
+ class="operator">=</span><span class="literal string">&quot;John&quot;</span><span
+ class="punctuation">,</span> <span class="name">gender</span><span
+ class="operator">=</span><span class="literal string">&quot;male&quot;</span><span
+ class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span
+ class="name">firstName</span>
<span class="literal string">'Doe'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span class="name">keys</span><span class="punctuation">()</span>
-<span class="punctuation">[</span><span class="literal string">'gender'</span><span class="punctuation">,</span> <span class="literal string">'firstName'</span><span class="punctuation">,</span> <span class="literal string">'lastName'</span><span class="punctuation">]</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="punctuation">[</span><span class="literal string">&quot;gender&quot;</span><span class="punctuation">]</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span
+ class="name">keys</span><span class="punctuation">()</span>
+<span class="punctuation">[</span><span class="literal string">'gender'</span><span class="punctuation">,</span> <span
+ class="literal string">'firstName'</span><span class="punctuation">,</span> <span
+ class="literal string">'lastName'</span><span class="punctuation">]</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="punctuation">[</span><span
+ class="literal string">&quot;gender&quot;</span><span class="punctuation">]</span>
<span class="literal string">'male'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">del</span><span class="punctuation">(</span><span class="name">person</span><span class="punctuation">[</span><span class="literal string">&quot;gender&quot;</span><span class="punctuation">])</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="punctuation">[</span><span class="literal string">&quot;gender&quot;</span><span class="punctuation">]</span>
-<span class="name">Traceback</span> <span class="punctuation">(</span><span class="name">most</span> <span class="name">recent</span> <span class="name">call</span> <span class="name">last</span><span class="punctuation">):</span>
- <span class="name">File</span> <span class="literal string">&quot;&lt;console&gt;&quot;</span><span class="punctuation">,</span> <span class="name">line</span> <span class="literal number integer">1</span><span class="punctuation">,</span> <span class="operator word">in</span> <span class="operator">&lt;</span><span class="name">module</span><span class="operator">&gt;</span>
-<span class="name exception">KeyError</span><span class="punctuation">:</span> <span class="literal string">'gender'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span class="name">gender</span>
-<span class="name">Traceback</span> <span class="punctuation">(</span><span class="name">most</span> <span class="name">recent</span> <span class="name">call</span> <span class="name">last</span><span class="punctuation">):</span>
- <span class="name">File</span> <span class="literal string">&quot;&lt;console&gt;&quot;</span><span class="punctuation">,</span> <span class="name">line</span> <span class="literal number integer">1</span><span class="punctuation">,</span> <span class="operator word">in</span> <span class="operator">&lt;</span><span class="name">module</span><span class="operator">&gt;</span>
-<span class="name exception">AttributeError</span><span class="punctuation">:</span> <span class="literal string">'Structure'</span> <span class="name builtin">object</span> <span class="name">has</span> <span class="name">no</span> <span class="name">attribute</span> <span class="literal string">'gender'</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">del</span><span class="punctuation">(</span><span
+ class="name">person</span><span class="punctuation">[</span><span class="literal string">&quot;gender&quot;</span><span
+ class="punctuation">])</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="punctuation">[</span><span
+ class="literal string">&quot;gender&quot;</span><span class="punctuation">]</span>
+<span class="name">Traceback</span> <span class="punctuation">(</span><span class="name">most</span> <span class="name">recent</span> <span
+ class="name">call</span> <span class="name">last</span><span class="punctuation">):</span>
+ <span class="name">File</span> <span class="literal string">&quot;&lt;console&gt;&quot;</span><span
+ class="punctuation">,</span> <span class="name">line</span> <span
+ class="literal number integer">1</span><span class="punctuation">,</span> <span
+ class="operator word">in</span> <span class="operator">&lt;</span><span
+ class="name">module</span><span class="operator">&gt;</span>
+<span class="name exception">KeyError</span><span class="punctuation">:</span> <span
+ class="literal string">'gender'</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span
+ class="name">gender</span>
+<span class="name">Traceback</span> <span class="punctuation">(</span><span class="name">most</span> <span class="name">recent</span> <span
+ class="name">call</span> <span class="name">last</span><span class="punctuation">):</span>
+ <span class="name">File</span> <span class="literal string">&quot;&lt;console&gt;&quot;</span><span
+ class="punctuation">,</span> <span class="name">line</span> <span
+ class="literal number integer">1</span><span class="punctuation">,</span> <span
+ class="operator word">in</span> <span class="operator">&lt;</span><span
+ class="name">module</span><span class="operator">&gt;</span>
+<span class="name exception">AttributeError</span><span class="punctuation">:</span> <span class="literal string">'Structure'</span> <span
+ class="name builtin">object</span> <span class="name">has</span> <span
+ class="name">no</span> <span class="name">attribute</span> <span
+ class="literal string">'gender'</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.dataStructures.Lookup</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.dataStructures.Lookup</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span> <span class="operator">=</span> <span class="name">Lookup</span><span class="punctuation">(</span><span class="name">firstName</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">,</span> <span class="name">lastName</span><span class="operator">=</span><span class="literal string">&quot;John&quot;</span><span class="punctuation">,</span> <span class="name">gender</span><span class="operator">=</span><span class="literal string">&quot;male&quot;</span><span class="punctuation">)</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span class="name">getFirstKeyFromValue</span><span class="punctuation">(</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span> <span class="operator">=</span> <span
+ class="name">Lookup</span><span class="punctuation">(</span><span
+ class="name">firstName</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span
+ class="punctuation">,</span> <span class="name">lastName</span><span
+ class="operator">=</span><span class="literal string">&quot;John&quot;</span><span
+ class="punctuation">,</span> <span class="name">gender</span><span
+ class="operator">=</span><span class="literal string">&quot;male&quot;</span><span
+ class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">person</span><span class="operator">.</span><span
+ class="name">getFirstKeyFromValue</span><span class="punctuation">(</span><span
+ class="literal string">&quot;Doe&quot;</span><span class="punctuation">)</span>
<span class="literal string">'firstName'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">persons</span> <span class="operator">=</span> <span class="name">foundations</span><span class="operator">.</span><span class="name">foundations</span><span class="operator">.</span><span class="name">dataStructures</span><span class="operator">.</span><span class="name">Lookup</span><span class="punctuation">(</span><span class="name">John</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">,</span> <span class="name">Jane</span><span class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">,</span> <span class="name">Luke</span><span class="operator">=</span><span class="literal string">&quot;Skywalker&quot;</span><span class="punctuation">)</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">persons</span><span class="operator">.</span><span class="name">getKeysFromValue</span><span class="punctuation">(</span><span class="literal string">&quot;Doe&quot;</span><span class="punctuation">)</span>
-<span class="punctuation">[</span><span class="literal string">'Jane'</span><span class="punctuation">,</span> <span class="literal string">'John'</span><span class="punctuation">]</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">persons</span> <span class="operator">=</span> <span
+ class="name">foundations</span><span class="operator">.</span><span
+ class="name">foundations</span><span class="operator">.</span><span
+ class="name">dataStructures</span><span class="operator">.</span><span
+ class="name">Lookup</span><span class="punctuation">(</span><span class="name">John</span><span
+ class="operator">=</span><span class="literal string">&quot;Doe&quot;</span><span
+ class="punctuation">,</span> <span class="name">Jane</span><span class="operator">=</span><span
+ class="literal string">&quot;Doe&quot;</span><span class="punctuation">,</span> <span
+ class="name">Luke</span><span class="operator">=</span><span class="literal string">&quot;Skywalker&quot;</span><span
+ class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">persons</span><span class="operator">.</span><span
+ class="name">getKeysFromValue</span><span class="punctuation">(</span><span
+ class="literal string">&quot;Doe&quot;</span><span class="punctuation">)</span>
+<span class="punctuation">[</span><span class="literal string">'Jane'</span><span class="punctuation">,</span> <span
+ class="literal string">'John'</span><span class="punctuation">]</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.environment.Environment</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.environment.Environment</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">environment</span> <span class="operator">=</span> <span class="name">Environment</span><span class="punctuation">(</span><span class="name">JOHN</span><span class="operator">=</span><span class="literal string">&quot;DOE&quot;</span><span class="punctuation">,</span> <span class="name">DOE</span><span class="operator">=</span><span class="literal string">&quot;JOHN&quot;</span><span class="punctuation">)</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">environment</span><span class="operator">.</span><span class="name">setValues</span><span class="punctuation">()</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">environment</span> <span class="operator">=</span> <span
+ class="name">Environment</span><span class="punctuation">(</span><span
+ class="name">JOHN</span><span class="operator">=</span><span class="literal string">&quot;DOE&quot;</span><span
+ class="punctuation">,</span> <span class="name">DOE</span><span class="operator">=</span><span
+ class="literal string">&quot;JOHN&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">environment</span><span class="operator">.</span><span
+ class="name">setValues</span><span class="punctuation">()</span>
<span class="name builtin pseudo">True</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="keyword namespace">import</span> <span class="name namespace">os</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">os</span><span class="operator">.</span><span class="name">environ</span><span class="punctuation">[</span><span class="literal string">&quot;JOHN&quot;</span><span class="punctuation">]</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="keyword namespace">import</span> <span
+ class="name namespace">os</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">os</span><span class="operator">.</span><span
+ class="name">environ</span><span class="punctuation">[</span><span class="literal string">&quot;JOHN&quot;</span><span
+ class="punctuation">]</span>
<span class="literal string">'DOE'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">os</span><span class="operator">.</span><span class="name">environ</span><span class="punctuation">[</span><span class="literal string">&quot;DOE&quot;</span><span class="punctuation">]</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">os</span><span class="operator">.</span><span
+ class="name">environ</span><span class="punctuation">[</span><span class="literal string">&quot;DOE&quot;</span><span
+ class="punctuation">]</span>
<span class="literal string">'JOHN'</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.strings.getNiceName</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.strings.getNiceName</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">getNiceName</span><span class="punctuation">(</span><span class="literal string">&quot;getMeANiceName&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">getNiceName</span><span class="punctuation">(</span><span
+ class="literal string">&quot;getMeANiceName&quot;</span><span class="punctuation">)</span>
<span class="literal string">'Get Me A Nice Name'</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">getNiceName</span><span class="punctuation">(</span><span class="literal string">&quot;__getMeANiceName&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">getNiceName</span><span class="punctuation">(</span><span
+ class="literal string">&quot;__getMeANiceName&quot;</span><span class="punctuation">)</span>
<span class="literal string">'__Get Me A Nice Name'</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.strings.getSplitextBasename</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.strings.getSplitextBasename</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">getSplitextBasename</span><span class="punctuation">(</span><span class="literal string">&quot;/Users/JohnDoe/Documents/Test.txt&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">getSplitextBasename</span><span
+ class="punctuation">(</span><span class="literal string">&quot;/Users/JohnDoe/Documents/Test.txt&quot;</span><span
+ class="punctuation">)</span>
<span class="literal string">'Test'</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.strings.getCommonPathsAncestor</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.strings.getCommonPathsAncestor</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="name">getCommonPathsAncestor</span><span class="punctuation">(</span><span class="literal string">&quot;/Users/JohnDoe/Documents&quot;</span><span class="punctuation">,</span> <span class="literal string">&quot;/Users/JohnDoe/Documents/Test.txt&quot;</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="name">getCommonPathsAncestor</span><span
+ class="punctuation">(</span><span
+ class="literal string">&quot;/Users/JohnDoe/Documents&quot;</span><span
+ class="punctuation">,</span> <span class="literal string">&quot;/Users/JohnDoe/Documents/Test.txt&quot;</span><span
+ class="punctuation">)</span>
<span class="literal string">'/Users/JohnDoe/Documents'</span>
</pre>
- <ul class="simple">
- <li>
- <strong>foundations.walkers.filesWalker</strong>:
- </li>
- </ul>
+ <ul class="simple">
+ <li>
+ <strong>foundations.walkers.filesWalker</strong>:
+ </li>
+ </ul>
<pre class="code python literal-block">
-<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">for</span> <span class="name builtin">file</span> <span class="operator word">in</span> <span class="name">filesWalker</span><span class="punctuation">(</span><span class="literal string">&quot;./foundations/tests/testsFoundations/resources/standard/level_0&quot;</span><span class="punctuation">):</span>
-<span class="operator">...</span> <span class="keyword">print</span><span class="punctuation">(</span><span class="name builtin">file</span><span class="punctuation">)</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">for</span> <span class="name builtin">file</span> <span
+ class="operator word">in</span> <span class="name">filesWalker</span><span
+ class="punctuation">(</span><span class="literal string">&quot;./foundations/tests/testsFoundations/resources/standard/level_0&quot;</span><span
+ class="punctuation">):</span>
+<span class="operator">...</span> <span class="keyword">print</span><span class="punctuation">(</span><span
+ class="name builtin">file</span><span class="punctuation">)</span>
<span class="operator">...</span>
-<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span class="operator">/</span><span class="name">testsFoundations</span><span class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span class="name">standard</span><span class="operator">/</span><span class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span class="operator">/</span><span class="name">level_2</span><span class="operator">/</span><span class="name">standard</span><span class="operator">.</span><span class="name">sIBLT</span>
-<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span class="operator">/</span><span class="name">testsFoundations</span><span class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span class="name">standard</span><span class="operator">/</span><span class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span class="operator">/</span><span class="name">loremIpsum</span><span class="operator">.</span><span class="name">txt</span>
-<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span class="operator">/</span><span class="name">testsFoundations</span><span class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span class="name">standard</span><span class="operator">/</span><span class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span class="operator">/</span><span class="name">standard</span><span class="operator">.</span><span class="name">rc</span>
-<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span class="operator">/</span><span class="name">testsFoundations</span><span class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span class="name">standard</span><span class="operator">/</span><span class="name">level_0</span><span class="operator">/</span><span class="name">standard</span><span class="operator">.</span><span class="name">ibl</span>
-<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">for</span> <span class="name builtin">file</span> <span class="operator word">in</span> <span class="name">filesWalker</span><span class="punctuation">(</span><span class="literal string">&quot;./foundations/tests/testsFoundations/resources/standard/level_0&quot;</span><span class="punctuation">,</span> <span class="punctuation">(</span><span class="literal string">&quot;\.sIBLT&quot;</span><span class="punctuation">,)):</span>
-<span class="operator">...</span> <span class="keyword">print</span><span class="punctuation">(</span><span class="name builtin">file</span><span class="punctuation">)</span>
+<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span
+ class="operator">/</span><span class="name">testsFoundations</span><span
+ class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">/</span><span
+ class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span
+ class="operator">/</span><span class="name">level_2</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">.</span><span class="name">sIBLT</span>
+<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span
+ class="operator">/</span><span class="name">testsFoundations</span><span
+ class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">/</span><span
+ class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span
+ class="operator">/</span><span class="name">loremIpsum</span><span
+ class="operator">.</span><span class="name">txt</span>
+<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span
+ class="operator">/</span><span class="name">testsFoundations</span><span
+ class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">/</span><span
+ class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span
+ class="operator">/</span><span class="name">standard</span><span class="operator">.</span><span
+ class="name">rc</span>
+<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span
+ class="operator">/</span><span class="name">testsFoundations</span><span
+ class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">/</span><span
+ class="name">level_0</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">.</span><span class="name">ibl</span>
+<span class="operator">&gt;&gt;&gt;</span> <span class="keyword">for</span> <span class="name builtin">file</span> <span
+ class="operator word">in</span> <span class="name">filesWalker</span><span
+ class="punctuation">(</span><span class="literal string">&quot;./foundations/tests/testsFoundations/resources/standard/level_0&quot;</span><span
+ class="punctuation">,</span> <span class="punctuation">(</span><span class="literal string">&quot;\.sIBLT&quot;</span><span
+ class="punctuation">,)):</span>
+<span class="operator">...</span> <span class="keyword">print</span><span class="punctuation">(</span><span
+ class="name builtin">file</span><span class="punctuation">)</span>
<span class="operator">...</span>
-<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span class="operator">/</span><span class="name">testsFoundations</span><span class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span class="name">standard</span><span class="operator">/</span><span class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span class="operator">/</span><span class="name">level_2</span><span class="operator">/</span><span class="name">standard</span><span class="operator">.</span><span class="name">sIBLT</span>
-</pre><br />
- <!-- .api -->
- </div>
- <div class="section" id="id4">
- <h1>
- <span class="target" id="api">Api</span>
- </h1>
- <p>
- <strong>Foundations</strong> Api documentation is available here: <a class="reference external" href="http://thomasmansencal.com/Sharing/Foundations/Support/Documentation/Api/index.html">Foundations - Api</a>
- </p><br />
- <!-- .changes -->
- </div>
- <div class="section" id="id6">
- <h1>
- <span class="target" id="changes">Changes</span>
- </h1>
- <p>
- <strong>Foundations</strong> Changes file is available here: <a class="reference external" href="http://thomasmansencal.com/Sharing/Foundations/Changes/Changes.html">Foundations - Changes</a>
- </p><br />
- <!-- .about -->
- </div>
- <div class="section" id="id7">
- <h1>
- <span class="target" id="about">About</span>
- </h1>
- <div class="line-block">
- <div class="line">
- <strong>Foundations</strong> by Thomas Mansencal - 2008 - 2014
- </div>
- <div class="line">
- Copyright © 2008 - 2014 - Thomas Mansencal - <a class="reference external" href="mailto:thomas.mansencal&#64;gmail.com">thomas.mansencal&#64;gmail.com</a>
- </div>
- <div class="line">
- This software is released under terms of GNU GPL V3 license: <a class="reference external" href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>
- </div>
- <div class="line">
- <a class="reference external" href="http://www.thomasmansencal.com/">http://www.thomasmansencal.com/</a>
- </div>
- </div>
- </div>
- </div>
- </body>
+<span class="operator">./</span><span class="name">foundations</span><span class="operator">/</span><span class="name">tests</span><span
+ class="operator">/</span><span class="name">testsFoundations</span><span
+ class="operator">/</span><span class="name">resources</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">/</span><span
+ class="name">level_0</span><span class="operator">/</span><span class="name">level_1</span><span
+ class="operator">/</span><span class="name">level_2</span><span class="operator">/</span><span
+ class="name">standard</span><span class="operator">.</span><span class="name">sIBLT</span>
+</pre>
+ <br/>
+ <!-- .api -->
+</div>
+<div class="section" id="id4">
+ <h1>
+ <span class="target" id="api">Api</span>
+ </h1>
+
+ <p>
+ <strong>Foundations</strong> Api documentation is available here: <a class="reference external"
+ href="http://thomasmansencal.com/Sharing/Foundations/Support/Documentation/Api/index.html">Foundations
+ - Api</a>
+ </p><br/>
+ <!-- .changes -->
+</div>
+<div class="section" id="id6">
+ <h1>
+ <span class="target" id="changes">Changes</span>
+ </h1>
+
+ <p>
+ <strong>Foundations</strong> Changes file is available here: <a class="reference external"
+ href="http://thomasmansencal.com/Sharing/Foundations/Changes/Changes.html">Foundations
+ - Changes</a>
+ </p><br/>
+ <!-- .about -->
+</div>
+<div class="section" id="id7">
+ <h1>
+ <span class="target" id="about">About</span>
+ </h1>
+
+ <div class="line-block">
+ <div class="line">
+ <strong>Foundations</strong> by Thomas Mansencal - 2008 - 2014
+ </div>
+ <div class="line">
+ Copyright © 2008 - 2014 - Thomas Mansencal - <a class="reference external"
+ href="mailto:thomas.mansencal&#64;gmail.com">thomas.mansencal&#64;gmail.com</a>
+ </div>
+ <div class="line">
+ This software is released under terms of GNU GPL V3 license: <a class="reference external"
+ href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>
+ </div>
+ <div class="line">
+ <a class="reference external" href="http://www.thomasmansencal.com/">http://www.thomasmansencal.com/</a>
+ </div>
+ </div>
+</div>
+</div>
+</body>
</html>
View
19 docs/sphinx/source/conf.py
@@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys
+import os
import sphinx_rtd_theme
from foundations.globals.constants import Constants
@@ -29,11 +30,11 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named "sphinx.ext.*") or your custom ones.
extensions = ["sphinx.ext.autodoc",
- "sphinx.ext.intersphinx",
- "sphinx.ext.todo",
- "sphinx.ext.coverage",
- "sphinx.ext.ifconfig",
- "sphinx.ext.viewcode"]
+ "sphinx.ext.intersphinx",
+ "sphinx.ext.todo",
+ "sphinx.ext.coverage",
+ "sphinx.ext.ifconfig",
+ "sphinx.ext.viewcode"]
# Add any paths that contain templates here, relative to this directory.
templates_path = [".templates"]
@@ -56,7 +57,7 @@
# built documents.
#
# The short X.Y version.
-version = str(Constants.majorVersion)
+version = str(Constants.major_version)
# The full version, including alpha/beta/rc tags.
release = str(Constants.version)
@@ -184,8 +185,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ("index", "Foundations.tex", u"Foundations Documentation",
- u"Thomas Mansencal", "manual"),
+ ("index", "Foundations.tex", u"Foundations Documentation",
+ u"Thomas Mansencal", "manual"),
]
# The name of an image file (relative to this directory) to place at the top of
View
12 docs/sphinx/source/index.rst
@@ -7,12 +7,12 @@ Contents:
:maxdepth: 2
:numbered:
- Introduction <resources/pages/introduction>
- Installation <resources/pages/installation>
- Usage <resources/pages/usage>
- Api <resources/pages/api>
- Changes <resources/pages/changes>
- About <resources/pages/about>
+ Introduction <resources/pages/introduction>
+ Installation <resources/pages/installation>
+ Usage <resources/pages/usage>
+ Api <resources/pages/api>
+ Changes <resources/pages/changes>
+ About <resources/pages/about>
Search:
==================
View
48 docs/sphinx/source/resources/pages/api.rst
@@ -4,28 +4,28 @@ Api
Modules Summary:
.. toctree::
- :maxdepth: 1
+:maxdepth: 1
- foundations.cache <api/foundations.cache>
- foundations.common <api/foundations.common>
- foundations.core <api/foundations.core>
- foundations.dataStructures <api/foundations.dataStructures>
- foundations.decorators <api/foundations.decorators>
- foundations.environment <api/foundations.environment>
- foundations.exceptions <api/foundations.exceptions>
- foundations.globals.constants <api/foundations.globals.constants>
- foundations.guerilla <api/foundations.guerilla>
- foundations.io <api/foundations.io>
- foundations.library <api/foundations.library>
- foundations.namespace <api/foundations.namespace>
- foundations.nodes <api/foundations.nodes>
- foundations.parsers <api/foundations.parsers>
- foundations.pkzip <api/foundations.pkzip>
- foundations.rotatingBackup <api/foundations.rotatingBackup>
- foundations.shell <api/foundations.shell>
- foundations.strings <api/foundations.strings>
- foundations.tcpServer <api/foundations.tcpServer>
- foundations.trace <api/foundations.trace>
- foundations.ui.common <api/foundations.ui.common>
- foundations.verbose <api/foundations.verbose>
- foundations.walkers <api/foundations.walkers>
+ foundations.cache <api/foundations.cache>
+ foundations.common <api/foundations.common>
+ foundations.core <api/foundations.core>
+ foundations.dataStructures <api/foundations.dataStructures>
+ foundations.decorators <api/foundations.decorators>
+ foundations.environment <api/foundations.environment>
+ foundations.exceptions <api/foundations.exceptions>
+ foundations.globals.constants <api/foundations.globals.constants>
+ foundations.guerilla <api/foundations.guerilla>
+ foundations.io <api/foundations.io>
+ foundations.library <api/foundations.library>
+ foundations.namespace <api/foundations.namespace>
+ foundations.nodes <api/foundations.nodes>
+ foundations.parsers <api/foundations.parsers>
+ foundations.pkzip <api/foundations.pkzip>
+ foundations.rotatingBackup <api/foundations.rotatingBackup>
+ foundations.shell <api/foundations.shell>
+ foundations.strings <api/foundations.strings>
+ foundations.tcpServer <api/foundations.tcpServer>
+ foundations.trace <api/foundations.trace>
+ foundations.ui.common <api/foundations.ui.common>
+ foundations.verbose <api/foundations.verbose>
+ foundations.walkers <api/foundations.walkers>
View
248 foundations/cache.py
@@ -5,28 +5,19 @@
**cache.py**
**Platform:**
- Windows, Linux, Mac Os X.
+ Windows, Linux, Mac Os X.
**Description:**
- Defines caching related classes.
+ Defines caching related classes.
**Others:**
"""
-#**********************************************************************************************************************
-#*** Future imports.
-#**********************************************************************************************************************
from __future__ import unicode_literals
-#**********************************************************************************************************************
-#*** Internal imports.
-#**********************************************************************************************************************
import foundations.verbose
-#**********************************************************************************************************************
-#*** Module attributes.
-#**********************************************************************************************************************
__author__ = "Thomas Mansencal"
__copyright__ = "Copyright (C) 2008 - 2014 - Thomas Mansencal"
__license__ = "GPL V3.0 - http://www.gnu.org/licenses/"
@@ -36,125 +27,120 @@
__all__ = ["LOGGER", "Cache"]
-LOGGER = foundations.verbose.installLogger()
+LOGGER = foundations.verbose.install_logger()
+
-#**********************************************************************************************************************
-#*** Module classes and definitions.
-#**********************************************************************************************************************
class Cache(dict):
- """
- Defines the cache object and provides various methods to interact with its content.
-
- Usage:
-
- """
-
- def __init__(self, **kwargs):
- """
- Initializes the class.
-
- :param \*\*kwargs: Key / Value pairs.
- :type \*\*kwargs: dict
- """
-
- dict.__init__(self, **kwargs)
-
- #******************************************************************************************************************
- #*** Class methods.
- #******************************************************************************************************************
- def addContent(self, **content):
- """
- Adds given content to the cache.
-
- Usage::
-
- >>> cache = Cache()
- >>> cache.addContent(John="Doe", Luke="Skywalker")
- True
- >>> cache
- {'Luke': 'Skywalker', 'John': 'Doe'}
-
- :param \*\*content: Content to add.
- :type \*\*content: \*\*
- :return: Method success.
- :rtype: bool
- """
-
- LOGGER.debug("> Adding '{0}' content to the cache.".format(self.__class__.__name__, content))
-
- self.update(**content)
- return True
-
- def removeContent(self, *keys):
- """
- Removes given content from the cache.
-
- Usage::
-
- >>> cache = Cache()
- >>> cache.addContent(John="Doe", Luke="Skywalker")
- True
- >>> cache.removeContent("Luke", "John")
- True
- >>> cache
- {}
-
- :param \*keys: Content to remove.
- :type \*keys: \*
- :return: Method success.
- :rtype: bool
- """
-
- LOGGER.debug("> Removing '{0}' content from the cache.".format(self.__class__.__name__, keys))
-
- for key in keys:
- if not key in self:
- raise KeyError("{0} | '{1}' key doesn't exists in cache content!".format(self.__class__.__name__, key))
-
- del self[key]
- return True
-
- def getContent(self, key):
- """
- Gets given content from the cache.
-
- Usage::
-
- >>> cache = Cache()
- >>> cache.addContent(John="Doe", Luke="Skywalker")
- True
- >>> cache.getContent("Luke")
- 'Skywalker'
-
- :param key: Content to retrieve.
- :type key: object
- :return: Content.
- :rtype: object
- """
-
- LOGGER.debug("> Retrieving '{0}' content from the cache.".format(self.__class__.__name__, key))
-
- return self.get(key)
-
- def flushContent(self):
- """
- Flushes the cache content.
-
- Usage::
-
- >>> cache = Cache()
- >>> cache.addContent(John="Doe", Luke="Skywalker")
- True
- >>> cache.flushContent()
- True
- >>> cache
- {}
-
- :return: Method success.
- :rtype: bool
- """
-
- LOGGER.debug("> Flushing cache content.".format(self.__class__.__name__))
-
- self.clear()
- return True
+ """
+ Defines the cache object and provides various methods to interact with its content.
+
+ Usage:
+
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes the class.
+
+ :param \*\*kwargs: Key / Value pairs.
+ :type \*\*kwargs: dict
+ """
+
+ dict.__init__(self, **kwargs)
+
+ def add_content(self, **content):
+ """
+ Adds given content to the cache.
+
+ Usage::
+
+ >>> cache = Cache()
+ >>> cache.add_content(John="Doe", Luke="Skywalker")
+ True
+ >>> cache
+ {'Luke': 'Skywalker', 'John': 'Doe'}
+
+ :param \*\*content: Content to add.
+ :type \*\*content: \*\*
+ :return: Method success.
+ :rtype: bool
+ """
+
+ LOGGER.debug("> Adding '{0}' content to the cache.".format(self.__class__.__name__, content))
+
+ self.update(**content)
+ return True
+
+ def remove_content(self, *keys):
+ """
+ Removes given content from the cache.
+
+ Usage::
+
+ >>> cache = Cache()
+ >>> cache.add_content(John="Doe", Luke="Skywalker")
+ True
+ >>> cache.remove_content("Luke", "John")
+ True
+ >>> cache
+ {}
+
+ :param \*keys: Content to remove.
+ :type \*keys: \*
+ :return: Method success.
+ :rtype: bool
+ """
+
+ LOGGER.debug("> Removing '{0}' content from the cache.".format(self.__class__.__name__, keys))
+
+ for key in keys:
+ if not key in self:
+ raise KeyError("{0} | '{1}' key doesn't exists in cache content!".format(self.__class__.__name__, key))
+
+ del self[key]
+ return True
+
+ def get_content(self, key):
+ """
+ Gets given content from the cache.
+
+ Usage::
+
+ >>> cache = Cache()
+ >>> cache.add_content(John="Doe", Luke="Skywalker")
+ True
+ >>> cache.get_content("Luke")
+ 'Skywalker'
+
+ :param key: Content to retrieve.
+ :type key: object
+ :return: Content.
+ :rtype: object
+ """
+
+ LOGGER.debug("> Retrieving '{0}' content from the cache.".format(self.__class__.__name__, key))
+
+ return self.get(key)
+
+ def flush_content(self):
+ """
+ Flushes the cache content.
+
+ Usage::
+
+ >>> cache = Cache()
+ >>> cache.add_content(John="Doe", Luke="Skywalker")
+ True
+ >>> cache.flush_content()
+ True
+ >>> cache
+ {}
+
+ :return: Method success.
+ :rtype: bool
+ """
+
+ LOGGER.debug("> Flushing cache content.".format(self.__class__.__name__))
+
+ self.clear()
+ return True
View
442 foundations/common.py
@@ -5,40 +5,28 @@
**common.py**
**Platform:**
- Windows, Linux, Mac Os X.
+ Windows, Linux, Mac Os X.
**Description:**
- Defines **Foundations** package common utilities objects that don't fall in any specific category.
+ Defines **Foundations** package common utilities objects that don't fall in any specific category.
**Others:**
- :func:`isBinaryFile` from Jorge Orpinel:
- http://stackoverflow.com/questions/898669/how-can-i-detect-if-a-file-is-binary-non-text-in-python
- :func:`dependencyResolver` from Louis Riviere: http://code.activestate.com/recipes/576570-dependency-resolver/
+ :func:`is_binary_file` from Jorge Orpinel:
+ http://stackoverflow.com/questions/898669/how-can-i-detect-if-a-file-is-binary-non-text-in-python
+ :func:`dependency_resolver` from Louis Riviere: http://code.activestate.com/recipes/576570-dependency-resolver/
"""
-#**********************************************************************************************************************
-#*** Future imports.
-#**********************************************************************************************************************
from __future__ import unicode_literals
-#**********************************************************************************************************************
-#*** External imports.
-#**********************************************************************************************************************
import itertools
import os
import socket
import urllib2
-#**********************************************************************************************************************
-#*** Internal imports.
-#**********************************************************************************************************************
import foundations.verbose
from foundations.globals.constants import Constants
-#**********************************************************************************************************************
-#*** Module attributes.
-#**********************************************************************************************************************
__author__ = "Thomas Mansencal"
__copyright__ = "Copyright (C) 2008 - 2014 - Thomas Mansencal"
__license__ = "GPL V3.0 - http://www.gnu.org/licenses/"
@@ -47,216 +35,224 @@
__status__ = "Production"
__all__ = ["LOGGER",
- "CONNECTION_IPS",
- "DEFAULT_HOST_IP",
- "wait",
- "uniqify",
- "unpackDefault",
- "orderedUniqify",
- "pathExists",
- "filterPath",
- "getFirstItem",
- "getLastItem",
- "repeat",
- "dependencyResolver",
- "isInternetAvailable",
- "getHostAddress"]
-
-LOGGER = foundations.verbose.installLogger()
+ "CONNECTION_IPS",
+ "DEFAULT_HOST_IP",
+ "wait",
+ "uniqify",
+ "unpack_default",
+ "ordered_uniqify",
+ "path_exists",
+ "filter_path",
+ "get_first_item",
+ "get_last_item",
+ "repeat",
+ "dependency_resolver",
+ "is_internet_available",
+ "get_host_address"]
+
+LOGGER = foundations.verbose.install_logger()
CONNECTION_IPS = ["173.194.34.36", # http://www.google.com
- "173.194.34.55", # http://www.google.co.uk
- "65.55.206.154", # http://www.live.com
- "173.252.110.27", # http://www.facebook.com
- "199.16.156.230", # http://www.twitter.com
- "98.139.183.24", # http://www.yahoo.com
- "77.238.178.122", # http://www.yahoo.co.uk
- "198.252.206.16", # http://www.stackoverflow.com
- "82.94.164.162", # http://www.python.org
- "65.196.127.226", # http://www.nsa.gov :D
- "www.google.com",
- "www.facebook.com",
- "www.twitter.com"]
+ "173.194.34.55", # http://www.google.co.uk
+ "65.55.206.154", # http://www.live.com
+ "173.252.110.27", # http://www.facebook.com
+ "199.16.156.230", # http://www.twitter.com
+ "98.139.183.24", # http://www.yahoo.com
+ "77.238.178.122", # http://www.yahoo.co.uk
+ "198.252.206.16", # http://www.stackoverflow.com
+ "82.94.164.162", # http://www.python.org
+ "65.196.127.226", # http://www.nsa.gov :D
+ "www.google.com",
+ "www.facebook.com",
+ "www.twitter.com"]
DEFAULT_HOST_IP = "127.0.0.1"
-#**********************************************************************************************************************
-#*** Module classes and definitions.
-#**********************************************************************************************************************
+
def uniqify(sequence):
- """
- Uniqifies the given sequence even if unhashable.
-
- :param sequence: Sequence.
- :type sequence: object
- :return: Uniqified sequence.
- :rtype: list
-
- :note: The sequence order is not maintained by this definition.
- """
-
- return [key for key, group in itertools.groupby(sorted(sequence))]
-
-def orderedUniqify(sequence):
- """
- Uniqifies the given hashable sequence while preserving its order.
-
- :param sequence: Sequence.
- :type sequence: object
- :return: Uniqified sequence.
- :rtype: list
- """
-
- items = set()
- return [key for key in sequence if key not in items and not items.add(key)]
-
-def unpackDefault(iterable, length=3, default=None):
- """
- Unpacks given iterable maintaining given length and filling missing entries with given default.
-
- :param iterable: iterable.
- :type iterable: object
- :param length: Iterable length.
- :type length: int
- :param default: Filling default object.
- :type default: object
- :return: Unpacked iterable.
- :rtype: object
- """
-
- return itertools.islice(itertools.chain(iter(iterable), itertools.repeat(default)), length)
-
-def pathExists(path):
- """
- Returns if given path exists.
-
- :param path: Path.
- :type path: unicode
- :return: Path existence.
- :rtype: bool
- """
-
- if not path:
- return False
- else:
- return os.path.exists(path)
-
-def filterPath(path):
- """
- Filters given path.
-
- :param path: Path.
- :type path: unicode
- :return: Filtered path.
- :rtype: unicode
- """
-
- return path if pathExists(path) else ""
-
-def getFirstItem(iterable, default=None):
- """
- Returns the first item of given iterable.
-
- :param iterable: Iterable.
- :type iterable: object
- :param default: Default value.
- :type default: object
- :return: First iterable item.
- :rtype: object
- """
-
- if not iterable:
- return default
-
- for item in iterable:
- return item
-
-def getLastItem(iterable, default=None):
- """
- Returns the last item of given iterable.
-
- :param iterable: Iterable.
- :type iterable: object
- :param default: Default value.
- :type default: object
- :return: Last iterable item.
- :rtype: object
- """
-
- if not iterable:
- return default
-
- return iterable[-1]
+ """
+ Uniqifies the given sequence even if unhashable.
+
+ :param sequence: Sequence.
+ :type sequence: object
+ :return: Uniqified sequence.
+ :rtype: list
+
+ :note: The sequence order is not maintained by this definition.
+ """
+
+ return [key for key, group in itertools.groupby(sorted(sequence))]
+
+
+def ordered_uniqify(sequence):
+ """
+ Uniqifies the given hashable sequence while preserving its order.
+
+ :param sequence: Sequence.
+ :type sequence: object
+ :return: Uniqified sequence.
+ :rtype: list
+ """
+
+ items = set()
+ return [key for key in sequence if key not in items and not items.add(key)]
+
+
+def unpack_default(iterable, length=3, default=None):
+ """
+ Unpacks given iterable maintaining given length and filling missing entries with given default.
+
+ :param iterable: iterable.
+ :type iterable: object
+ :param length: Iterable length.
+ :type length: int
+ :param default: Filling default object.
+ :type default: object
+ :return: Unpacked iterable.
+ :rtype: object
+ """
+
+ return itertools.islice(itertools.chain(iter(iterable), itertools.repeat(default)), length)
+
+
+def path_exists(path):
+ """
+ Returns if given path exists.
+
+ :param path: Path.
+ :type path: unicode
+ :return: Path existence.
+ :rtype: bool
+ """
+
+ if not path:
+ return False
+ else:
+ return os.path.exists(path)
+
+
+def filter_path(path):
+ """
+ Filters given path.
+
+ :param path: Path.
+ :type path: unicode
+ :return: Filtered path.
+ :rtype: unicode
+ """
+
+ return path if path_exists(path) else ""
+
+
+def get_first_item(iterable, default=None):
+ """
+ Returns the first item of given iterable.
+
+ :param iterable: Iterable.
+ :type iterable: object
+ :param default: Default value.
+ :type default: object
+ :return: First iterable item.
+ :rtype: object
+ """
+
+ if not iterable:
+ return default
+
+ for item in iterable:
+ return item
+
+
+def get_last_item(iterable, default=None):
+ """
+ Returns the last item of given iterable.
+
+ :param iterable: Iterable.
+ :type iterable: object
+ :param default: Default value.
+ :type default: object
+ :return: Last iterable item.
+ :rtype: object
+ """
+
+ if not iterable:
+ return default
+
+ return iterable[-1]
+
def repeat(object, iterations=1):
- """
- Repeats given object iterations times.
-
- :param object: Object to repeat.
- :type object: object
- :param iterations: Repetitions number.
- :type iterations: int
- :return: Object return values.
- :rtype: list
- """
-
- return [object() for i in range(iterations)]
-
-def dependencyResolver(dependencies):
- """
- Resolves given dependencies.
-
- :param dependencies: Dependencies to resolve.
- :type dependencies: dict
- :return: Resolved dependencies.
- :rtype: list
- """
-
- items = dict((key, set(dependencies[key])) for key in dependencies)
- resolvedDependencies = []
- while items:
- batch = set(item for value in items.values() for item in value) - set(items.keys())
- batch.update(key for key, value in items.items() if not value)
- resolvedDependencies.append(batch)
- items = dict(((key, value - batch) for key, value in items.items() if value))
- return resolvedDependencies
-
-def isInternetAvailable(ips=CONNECTION_IPS, timeout=1.0):
- """
- Returns if an internet connection is available.
-
- :param ips: Address ips to check against.
- :type ips: list
- :param timeout: Timeout in seconds.
- :type timeout: int
- :return: Is internet available.
- :rtype: bool
- """
-
- while ips:
- try:
- urllib2.urlopen("http://{0}".format(ips.pop(0)), timeout=timeout)
- return True
- except IndexError as error:
- continue
- except (urllib2.URLError, socket.error) as error:
- continue
- return False
-
-def getHostAddress(host=None, defaultAddress=DEFAULT_HOST_IP):
- """
- Returns the given host address.
-
- :param host: Host to retrieve the address.
- :type host: unicode
- :param defaultAddress: Default address if the host is unreachable.
- :type defaultAddress: unicode
- :return: Host address.
- :rtype: unicode
- """
-
- try:
- return unicode(socket.gethostbyname(host or socket.gethostname()),
- Constants.defaultCodec,
- Constants.codecError)
- except Exception as error:
- return defaultAddress
+ """
+ Repeats given object iterations times.
+
+ :param object: Object to repeat.
+ :type object: object
+ :param iterations: Repetitions number.
+ :type iterations: int
+ :return: Object return values.
+ :rtype: list
+ """
+
+ return [object() for i in range(iterations)]
+
+
+def dependency_resolver(dependencies):
+ """
+ Resolves given dependencies.
+
+ :param dependencies: Dependencies to resolve.
+ :type dependencies: dict
+ :return: Resolved dependencies.
+ :rtype: list
+ """
+
+ items = dict((key, set(dependencies[key])) for key in dependencies)
+ resolved_dependencies = []
+ while items:
+ batch = set(item for value in items.values() for item in value) - set(items.keys())
+ batch.update(key for key, value in items.items() if not value)
+ resolved_dependencies.append(batch)
+ items = dict(((key, value - batch) for key, value in items.items() if value))
+ return resolved_dependencies
+
+
+def is_internet_available(ips=CONNECTION_IPS, timeout=1.0):
+ """
+ Returns if an internet connection is available.
+
+ :param ips: Address ips to check against.
+ :type ips: list
+ :param timeout: Timeout in seconds.
+ :type timeout: int
+ :return: Is internet available.
+ :rtype: bool
+ """
+
+ while ips:
+ try:
+ urllib2.urlopen("http://{0}".format(ips.pop(0)), timeout=timeout)
+ return True
+ except IndexError as error:
+ continue
+ except (urllib2.URLError, socket.error) as error:
+ continue
+ return False
+
+
+def get_host_address(host=None, default_address=DEFAULT_HOST_IP):
+ """
+ Returns the given host address.
+
+ :param host: Host to retrieve the address.
+ :type host: unicode
+ :param default_address: Default address if the host is unreachable.
+ :type default_address: unicode
+ :return: Host address.
+ :rtype: unicode
+ """
+
+ try:
+ return unicode(socket.gethostbyname(host or socket.gethostname()),
+ Constants.default_codec,
+ Constants.codec_error)
+ except Exception as error:
+ return default_address
View
75 foundations/core.py
@@ -5,34 +5,22 @@
**core.py**
**Platform:**
- Windows, Linux, Mac Os X.
+ Windows, Linux, Mac Os X.
**Description:**
- Defines **Foundations** package core objects.
+ Defines **Foundations** package core objects.
**Others:**
"""
-#**********************************************************************************************************************
-#*** Future imports.
-#**********************************************************************************************************************
from __future__ import unicode_literals
-#**********************************************************************************************************************
-#*** External imports.
-#**********************************************************************************************************************
import sys
import time
-#**********************************************************************************************************************
-#*** Internal imports.
-#**********************************************************************************************************************
import foundations.verbose
-#**********************************************************************************************************************
-#*** Module attributes.
-#**********************************************************************************************************************
__author__ = "Thomas Mansencal"
__copyright__ = "Copyright (C) 2008 - 2014 - Thomas Mansencal"
__license__ = "GPL V3.0 - http://www.gnu.org/licenses/"
@@ -41,43 +29,42 @@
__status__ = "Production"
__all__ = ["LOGGER",
- "exit",
- "wait"]
+ "exit",
+ "wait"]
-LOGGER = foundations.verbose.installLogger()
+LOGGER = foundations.verbose.install_logger()
-#**********************************************************************************************************************
-#*** Module classes and definitions.
-#**********************************************************************************************************************
-def exit(exitCode=0):
- """
- Shuts down current process logging, associated handlers and then exits to system.
-
- :param exitCode: System exit code.
- :type exitCode: Integer or String or Object
- :note: **exitCode** argument is passed to Python :func:`sys.exit` definition.
- """
+def exit(exit_code=0):
+ """
+ Shuts down current process logging, associated handlers and then exits to system.
- LOGGER.debug("> {0} | Exiting current process!".format(__name__))
+ :param exit_code: System exit code.
+ :type exit_code: Integer or String or Object
- LOGGER.debug("> Stopping logging handlers and logger!")
- for handler in LOGGER.handlers:
- foundations.verbose.removeLoggingHandler(handler)
+ :note: **exit_code** argument is passed to Python :func:`sys.exit` definition.
+ """
- sys.exit(exitCode)
+ LOGGER.debug("> {0} | Exiting current process!".format(__name__))
-def wait(waitTime):
- """
- Halts current process exection for an user defined time.
+ LOGGER.debug("> Stopping logging handlers and logger!")
+ for handler in LOGGER.handlers:
+ foundations.verbose.remove_logging_handler(handler)
- :param waitTime: Current sleep time in seconds.
- :type waitTime: float
- :return: Definition success.
- :rtype: bool
- """
+ sys.exit(exit_code)
- LOGGER.debug("> Waiting '{0}' seconds!".format(waitTime))
- time.sleep(waitTime)
- return True
+def wait(wait_time):
+ """
+ Halts current process exection for an user defined time.
+
+ :param wait_time: Current sleep time in seconds.
+ :type wait_time: float
+ :return: Definition success.
+ :rtype: bool
+ """
+
+ LOGGER.debug("> Waiting '{0}' seconds!".format(wait_time))
+
+ time.sleep(wait_time)
+ return True
View
349 foundations/dataStructures.py
@@ -1,349 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-**dataStructures.py**
-
-**Platform:**
- Windows, Linux, Mac Os X.
-
-**Description:**
- Defines **Foundations** package data structures objects.
-
-**Others:**
-
-"""
-
-#**********************************************************************************************************************
-#*** Future imports.
-#**********************************************************************************************************************
-from __future__ import unicode_literals
-
-#**********************************************************************************************************************
-#*** External imports.
-#**********************************************************************************************************************
-import sys
-if sys.version_info[:2] <= (2, 6):
- from ordereddict import OrderedDict
-else:
- from collections import OrderedDict
-
-#**********************************************************************************************************************
-#*** Internal imports.
-#**********************************************************************************************************************
-import foundations.verbose
-
-#**********************************************************************************************************************
-#*** Module attributes.
-#**********************************************************************************************************************
-__author__ = "Thomas Mansencal"
-__copyright__ = "Copyright (C) 2008 - 2014 - Thomas Mansencal"
-__license__ = "GPL V3.0 - http://www.gnu.org/licenses/"
-__maintainer__ = "Thomas Mansencal"
-__email__ = "thomas.mansencal@gmail.com"
-__status__ = "Production"
-
-__all__ = ["LOGGER",
- "NestedAttribute",
- "Structure",
- "OrderedStructure",
- "Lookup"]
-
-LOGGER = foundations.verbose.installLogger()
-