diff --git a/20-executors/getflags/README.adoc b/20-executors/getflags/README.adoc index a649994..7883ffa 100644 --- a/20-executors/getflags/README.adoc +++ b/20-executors/getflags/README.adoc @@ -21,12 +21,12 @@ here are the steps to experiment with the `flags2*` examples using just the Python ≥ 3.9 distribution: . Clone or download the https://github.com/fluentpython/example-code-2e[_Fluent Python 2e_ code repository] (this repo!). -. Open your shell and go to the _20-futures/getflags/_ directory of your local copy of the repository (this directory!) -. Unzip the _flags.zip_ file, creating a _flags_ directory at _20-futures/getflags/flags/_. -. Open a second shell, go to the _20-futures/getflags/_ directory and run `python3 -m http.server`. This will start a `ThreadingHTTPServer` listening to port 8000, serving the local files. If you open the URL http://localhost:8000/flags/[http://localhost:8000/flags/] with your browser, you'll see a long list of directories named with two-letter country codes from `ad/` to `zw/`. +. Open your shell and go to the _20-executors/getflags/_ directory of your local copy of the repository (this directory!) +. Unzip the _flags.zip_ file, creating a _flags_ directory at _20-executors/getflags/flags/_. +. Open a second shell, go to the _20-executors/getflags/_ directory and run `python3 -m http.server`. This will start a `ThreadingHTTPServer` listening to port 8000, serving the local files. If you open the URL http://localhost:8000/flags/[http://localhost:8000/flags/] with your browser, you'll see a long list of directories named with two-letter country codes from `ad/` to `zw/`. . Now you can go back to the first shell and run the _flags2*.py_ examples with the default `--server LOCAL` option. -. To test with the `--server DELAY` option, go to _20-futures/getflags/_ and run `python3 slow_server.py`. This binds to port 8001 by default. It will add a random delay of .5s to 5s before each response. -. To test with the `--server ERROR` option, go to _20-futures/getflags/_ and run `python3 slow_server.py 8002 --error-rate .25`. +. To test with the `--server DELAY` option, go to _20-executors/getflags/_ and run `python3 slow_server.py`. This binds to port 8001 by default. It will add a random delay of .5s to 5s before each response. +. To test with the `--server ERROR` option, go to _20-executors/getflags/_ and run `python3 slow_server.py 8002 --error-rate .25`. Each request will have a 25% probability of getting a https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418[418 I'm a teapot] response, and all responses will be delayed .5s.