From 8447a11ca02ca649091969bbadff88ae2b02b0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Fri, 28 Feb 2025 23:58:49 +0100 Subject: [PATCH] Web, Virtual environments --- README.md | 4 ++-- index.html | 8 ++++---- pdf/remove_links.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 15b63a8..e646a6c 100644 --- a/README.md +++ b/README.md @@ -2563,7 +2563,7 @@ app.run(host=None, port=None, debug=None) # Or: $ flask --app FILE run [--ARG[= ```python @app.route('/img/') def serve_file(filename): - return fl.send_from_directory('DIRNAME/', filename) + return fl.send_from_directory('DIRNAME', filename) ``` ### Dynamic Request @@ -3549,7 +3549,7 @@ cdef class : ```perl $ python3 -m venv NAME # Creates virtual environment in current directory. -$ source NAME/bin/activate # Activates env. On Windows run `NAME\Scripts\activate`. +$ source NAME/bin/activate # Activates it. On Windows run `NAME\Scripts\activate`. $ pip3 install LIBRARY # Installs the library into active environment. $ python3 FILE # Runs the script in active environment. Also `./FILE`. $ deactivate # Deactivates the active virtual environment. diff --git a/index.html b/index.html index 85c60f0..75c7b34 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -2107,7 +2107,7 @@ app.run(host=None, port=Static Request
@app.route('/img/<path:filename>')
 def serve_file(filename):
-    return fl.send_from_directory('DIRNAME/', filename)
+    return fl.send_from_directory('DIRNAME', filename)
 

Dynamic Request

@app.route('/<sport>')
@@ -2898,7 +2898,7 @@ px.line(df, x='Date', y=Virtual Environments

System for installing libraries directly into project's directory.

$ python3 -m venv NAME      # Creates virtual environment in current directory.
-$ source NAME/bin/activate  # Activates env. On Windows run `NAME\Scripts\activate`.
+$ source NAME/bin/activate  # Activates it. On Windows run `NAME\Scripts\activate`.
 $ pip3 install LIBRARY      # Installs the library into active environment.
 $ python3 FILE              # Runs the script in active environment. Also `./FILE`.
 $ deactivate                # Deactivates the active virtual environment.
@@ -2942,7 +2942,7 @@ $ deactivate                # Deactivates the active
  
 
   
- +
diff --git a/pdf/remove_links.py b/pdf/remove_links.py index df31531..891cb6b 100755 --- a/pdf/remove_links.py +++ b/pdf/remove_links.py @@ -8,7 +8,7 @@ from pathlib import Path MATCHES = { 'For details about sort(), sorted(), min() and max() see Sortable.': 'For details about sort(), sorted(), min() and max() see Sortable (p. 16).', - 'Module operator has function itemgetter() that can replace listed lambdas.': 'Module \'operator\' (p. 31) has function itemgetter() that can replace listed lambdas (p. 11).', + 'Module operator has function itemgetter() that can replace listed lambdas.': 'Module \'operator\' has function itemgetter() that can replace listed lambdas (p. 31).', 'This text uses the term collection instead of iterable. For rationale see Collection.': 'This text uses the term collection instead of iterable. For rationale see Collection (p. 18).', 'Adding \'!r\' to the expression converts object to string by calling its repr() method.': 'Adding \'!r\' to the expression converts object to string by calling its repr() method.', 'It can be any callable, but is usually implemented as a function that returns a closure.': 'It can be any callable, but is usually implemented as a function that returns a closure.',