Source codes that use the BottlePy framework with Python for the Internet
I used to teach basic computer programming and web programming using the Python 3 language. To enable web development with ease, I used the BottlePy framework that is very easy to use. I have included the bottle.py source code that is also available with the main website of BottlePy.
To use this program, do the following.
- Download all source code in a directory or folder.
- Open a terminal or a powershell and check if you have Python 3 installed in your system. If you do, great! If you do not, go to http://www.python.org to know how to install that in your system.
- Get in the directory where you have downloaded the source codes and run the bottle_example1.py script. I assume that your Python 3 is called python3, and you do this:
python3 bottle_example1.py
It will not give you back the cursor and you will see a bit of info about the running code.
- Open a web browser like Firefox and open the bottle_example1.html to see a basic web page with a URL.
- Click the link and it will send the request to the waiting web server. See the exchange in the terminal.