I performed a
$pip install lpthw.web
and the package installed correctly.
I then went to the section titled Make a Simple “Hello World” Project
$mkdir bin gothonweb tests docs templates
Using Windows PowerShell, I wasn’t able to create the following folders and files on the command line so I created them manually using Windows GUI.
I also typed up ex50.py as written on page 207.
When I run
I get these errors.
I’d appreciate some help!
Hi, I replied to you privately but will reply here for other people.
In the exercise for 50:
You’ll see I don’t mention 0.0.0.0 or 8080 at all. I use 127.0.0.1:5000 because some operating systems don’t allow 0.0.0.0 and many people have 8080 already.
Based on this, my advice is to go back and follow the instructions exactly. It looks to me like you’re skipping around and coming from another programming language and bringing what you know to Python, but that means you don’t follow instructions and have errors. In that case, the only advice is to follow the instructions more closely and forget what you know from other places until you’ve understood how I’m doing it in Python.
Need help on this exercise.
I did completed the hello world code and run it successfully.
But when we deleting the greeting variable I did not get the same response as in the book In the powershell my code doesn’t return anything.
deleting this if name == “main”: just make the code blank and return nothing in the powershell but browser response is same — ‘hello world’
Hi @Deepanshu, can you please start a new thread? Also you need to show your code like this:
your code here
Or like this:
# your code here