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

Skip to content

Commit 9ba5675

Browse files
committed
Threading and Web
1 parent 81fab70 commit 9ba5675

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2014,6 +2014,7 @@ thread.start()
20142014
<bool> = thread.is_alive() # Checks if thread has finished executing.
20152015
thread.join() # Waits for thread to finish.
20162016
```
2017+
* **Use `'kwargs=<dict>'` to pass keyword arguments to the function.**
20172018

20182019
### Lock
20192020
```python
@@ -2394,7 +2395,7 @@ Web
23942395
---
23952396
```python
23962397
# $ pip3 install bottle
2397-
from bottle import run, route, post, template, request, response
2398+
from bottle import run, route, static_file, template, post, request, response
23982399
import json
23992400
```
24002401

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,9 @@
17751775
thread.join() <span class="hljs-comment"># Waits for thread to finish.</span>
17761776
</code></pre></div>
17771777

1778+
<ul>
1779+
<li><strong>Use <code class="python hljs"><span class="hljs-string">'kwargs=&lt;dict&gt;'</span></code> to pass keyword arguments to the function.</strong></li>
1780+
</ul>
17781781
<div><h3 id="lock">Lock</h3><pre><code class="python language-python hljs">lock = RLock()
17791782
lock.acquire() <span class="hljs-comment"># Waits for lock to be available.</span>
17801783
...
@@ -2059,7 +2062,7 @@
20592062

20602063

20612064
<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>
2062-
<span class="hljs-keyword">from</span> bottle <span class="hljs-keyword">import</span> run, route, post, template, request, response
2065+
<span class="hljs-keyword">from</span> bottle <span class="hljs-keyword">import</span> run, route, static_file, template, post, request, response
20632066
<span class="hljs-keyword">import</span> json
20642067
</code></pre></div>
20652068

0 commit comments

Comments
 (0)