From 9ba56751efc552b93ab78f013f90b0ba6fcc1d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 3 Oct 2019 02:29:52 +0200 Subject: [PATCH] Threading and Web --- README.md | 3 ++- index.html | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14c7dc2..8db4919 100644 --- a/README.md +++ b/README.md @@ -2014,6 +2014,7 @@ thread.start() = thread.is_alive() # Checks if thread has finished executing. thread.join() # Waits for thread to finish. ``` +* **Use `'kwargs='` to pass keyword arguments to the function.** ### Lock ```python @@ -2394,7 +2395,7 @@ Web --- ```python # $ pip3 install bottle -from bottle import run, route, post, template, request, response +from bottle import run, route, static_file, template, post, request, response import json ``` diff --git a/index.html b/index.html index f2c2ead..d600ca4 100644 --- a/index.html +++ b/index.html @@ -1775,6 +1775,9 @@ thread.start() thread.join() # Waits for thread to finish. +
    +
  • Use 'kwargs=<dict>' to pass keyword arguments to the function.
  • +

Lock

lock = RLock()
 lock.acquire()                       # Waits for lock to be available.
 ...
@@ -2059,7 +2062,7 @@ print(link, ver)
 
 
 

#Web

# $ pip3 install bottle
-from bottle import run, route, post, template, request, response
+from bottle import run, route, static_file, template, post, request, response
 import json