Hi everyone, I'm a beginner at Python and Python anywhere and am a bit fuzzy on the nature of how Python works. If someone could please help clarify things for me, I have some questions:
-
I copy/pasted a client.py and server.py for a basic chat app in python from a tutorial website> If I run the server.py using BASH on pythonanywhere - What ip address am I supposed to pass as a parameter to the client? When I put an ipaddress in the server code, it came up with 127.0.0.1 but that is not going to help me to connect from my client on my computer. The client is supposed to take two parameters: python server.py <ipaddress> <port>.
-
Does a python web app behave in the same way as say a PHP web app (i.e. spit out html code for the browser to interpret as well as do it's processing stuff in the background on the server?
-
Can I just set up my server.py file to be itself a web app? so that when I type http://myusername.pythonanywhere in my browser- it will run the server program server.py?
-
Is it imperative to use Django or Flask or some alternative to make a web app? When I ran the client and server from PyCharm, although they couldn't connect to each other (I'm guessing because they don't like to be both run locally on my pc?) they at least ran, before I had even installed Django or Flask.
I'm sorry if these seem like silly questions, but I am really in a muddle and want to clear it all up. Thank you for all responses.
Keep well.
RoyalSon777