Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d0bf6b

Browse files
committed
Exceptions, Web
1 parent f32d13e commit 0d0bf6b

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,13 +1445,13 @@ BaseException
14451445
+-- AssertionError # Raised by `assert <exp>` if expression returns false value.
14461446
+-- AttributeError # Raised when an attribute is missing.
14471447
+-- EOFError # Raised by input() when it hits end-of-file condition.
1448-
+-- LookupError # Raised when a look-up on a collection fails.
1448+
+-- LookupError # Base class for errors when a collection can't find an item.
14491449
| +-- IndexError # Raised when a sequence index is out of range.
14501450
| +-- KeyError # Raised when a dictionary key or set element is missing.
14511451
+-- MemoryError # Out of memory. Could be too late to start deleting vars.
1452-
+-- NameError # Raised when an object is missing.
1453-
+-- OSError # Errors such as “file not found” or “disk full” (see Open).
1454-
| +-- FileNotFoundError # When a file or directory is requested but doesn't exist.
1452+
+-- NameError # Raised when nonexistent name (variable/func/class) is used.
1453+
| +-- UnboundLocalError # Raised when local name is used before it's being defined.
1454+
+-- OSError # Errors such as FileExistsError/PermissionError (see Open).
14551455
+-- RuntimeError # Raised by errors that don't fall into other categories.
14561456
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
14571457
+-- StopIteration # Raised by next() when run on an empty iterator.
@@ -2518,6 +2518,7 @@ except requests.exceptions.ConnectionError:
25182518

25192519
Web
25202520
---
2521+
**Bottle is a micro web framework/server. If you just want to open a html file in a web browser use `'webbrowser.open(<path>)'` instead.**
25212522
```python
25222523
# $ pip3 install bottle
25232524
from bottle import run, route, static_file, template, post, request, response

index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,13 +1239,13 @@
12391239
├── AssertionError <span class="hljs-comment"># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>
12401240
├── AttributeError <span class="hljs-comment"># Raised when an attribute is missing.</span>
12411241
├── EOFError <span class="hljs-comment"># Raised by input() when it hits end-of-file condition.</span>
1242-
├── LookupError <span class="hljs-comment"># Raised when a look-up on a collection fails.</span>
1242+
├── LookupError <span class="hljs-comment"># Base class for errors when a collection can't find an item.</span>
12431243
│ ├── IndexError <span class="hljs-comment"># Raised when a sequence index is out of range.</span>
12441244
│ └── KeyError <span class="hljs-comment"># Raised when a dictionary key or set element is missing.</span>
12451245
├── MemoryError <span class="hljs-comment"># Out of memory. Could be too late to start deleting vars.</span>
1246-
├── NameError <span class="hljs-comment"># Raised when an object is missing.</span>
1247-
├── OSError <span class="hljs-comment"># Errors such as “file not found” or “disk full” (see Open).</span>
1248-
└── FileNotFoundError <span class="hljs-comment"># When a file or directory is requested but doesn't exist.</span>
1246+
├── NameError <span class="hljs-comment"># Raised when nonexistent name (variable/func/class) is used.</span>
1247+
└── UnboundLocalError <span class="hljs-comment"># Raised when local name is used before it's being defined.</span>
1248+
├── OSError <span class="hljs-comment"># Errors such as FileExistsError/PermissionError (see Open).</span>
12491249
├── RuntimeError <span class="hljs-comment"># Raised by errors that don't fall into other categories.</span>
12501250
│ └── RecursionError <span class="hljs-comment"># Raised when the maximum recursion depth is exceeded.</span>
12511251
├── StopIteration <span class="hljs-comment"># Raised by next() when run on an empty iterator.</span>
@@ -2067,11 +2067,12 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
20672067
</code></pre></div></div>
20682068

20692069

2070-
<div><h2 id="web"><a href="#web" name="web">#</a>Web</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install bottle</span>
2070+
<div><h2 id="web"><a href="#web" name="web">#</a>Web</h2><p><strong>Bottle is a micro web framework/server. If you just want to open a html file in a web browser use <code class="python hljs"><span class="hljs-string">'webbrowser.open(&lt;path&gt;)'</span></code> instead.</strong></p><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install bottle</span>
20712071
<span class="hljs-keyword">from</span> bottle <span class="hljs-keyword">import</span> run, route, static_file, template, post, request, response
20722072
<span class="hljs-keyword">import</span> json
20732073
</code></pre></div>
20742074

2075+
20752076
<div><h3 id="run">Run</h3><pre><code class="python language-python hljs">run(host=<span class="hljs-string">'localhost'</span>, port=<span class="hljs-number">8080</span>) <span class="hljs-comment"># Runs locally.</span>
20762077
run(host=<span class="hljs-string">'0.0.0.0'</span>, port=<span class="hljs-number">80</span>) <span class="hljs-comment"># Runs globally.</span>
20772078
</code></pre></div>

parse.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ const DIAGRAM_7_B =
367367
" ├── AssertionError <span class='hljs-comment'># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>\n" +
368368
" ├── AttributeError <span class='hljs-comment'># Raised when an attribute is missing.</span>\n" +
369369
" ├── EOFError <span class='hljs-comment'># Raised by input() when it hits end-of-file condition.</span>\n" +
370-
" ├── LookupError <span class='hljs-comment'># Raised when a look-up on a collection fails.</span>\n" +
370+
" ├── LookupError <span class='hljs-comment'># Base class for errors when a collection can't find an item.</span>\n" +
371371
" │ ├── IndexError <span class='hljs-comment'># Raised when a sequence index is out of range.</span>\n" +
372372
" │ └── KeyError <span class='hljs-comment'># Raised when a dictionary key or set element is missing.</span>\n" +
373373
" ├── MemoryError <span class='hljs-comment'># Out of memory. Could be too late to start deleting vars.</span>\n" +
374-
" ├── NameError <span class='hljs-comment'># Raised when an object is missing.</span>\n" +
375-
" ├── OSError <span class='hljs-comment'># Errors such as “file not found” or “disk full” (see Open).</span>\n" +
376-
" └── FileNotFoundError <span class='hljs-comment'># When a file or directory is requested but doesn't exist.</span>\n" +
374+
" ├── NameError <span class='hljs-comment'># Raised when nonexistent name (variable/func/class) is used.</span>\n" +
375+
" └── UnboundLocalError <span class='hljs-comment'># Raised when local name is used before it's being defined.</span>\n" +
376+
" ├── OSError <span class='hljs-comment'># Errors such as FileExistsError/PermissionError (see Open).</span>\n" +
377377
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall into other categories.</span>\n" +
378378
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
379379
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +

0 commit comments

Comments
 (0)