Serving just a piece of text isn't very useful, so our next step is to add some HTML content and enhance the display and functionality with JavaScript:
Go to the same directory where
nocontent.py
could be found.Double-click the file
unitconvertor.py
, CherryPy console will again open in a text window.Enter
http://localhost:8080
in the address bar of your browser (or click refresh if it is still open on that address). You will now see a small unit convertor:
You can enter any number (with an optional fraction) in the text input on the left and after selecting the units to convert from and to, pressing the convert button will present you with the converted number on the right.