Running a Python server from Github


#1

Any help please. I was send a python web server.py to create a standalone server to run this.
Hello new to python. I have an existing server download for a project from github. I was wondering whether anyone could help me with snippets or methods of creating my own standalone server to run the web application. What do I need to have? Do I need apache server running myaql and python. Any help will be highly appreciated.
Thank you

Danny076


#2

Okay, I am trying to understand what you really need. You should make sure you have python installed by doing python -V . And I would advise that you have (L/W/X)AMP Server installed already.

You should also see these:

Let me know if this helps!


#3

thanks for your reply.sorry, am relatively new to python. I have downloaded a work web application from github with permission. The idea is to use the downloaded files to create a standalone server and application to run on my local machine.

I have managed to design a web server that could only run ‘hello world!’. Is there any way I could run this web application and all its’ features from the standalone server.

Here is the content of the github download:

-data
-docs
-htdocs
-test
-utilities
-newdata.py
-old.py
-old2.py
-README.md
-old3.py
-run_server.sh
-server.py

THE SERVER DEV. 'hello world!'
import socket
HOST, PORT = ‘’, 8888

listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
listen_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
listen_socket.bind((HOST,PORT))
listen_socket.listen(1)
print ‘Serving HTTP on port %s …’ % PORT
while True:
client_connection, client_address = listen_socket.accept ()
request = client_connection.recv(1024)
print request

http_response = """\

HTTP/1.1 200 OK

Hello, Me World!

“”"
client_connection.sendall(http_response)
client_connection.close()

Thank you, any help will be highly appreciated.


#4

Sorry I am just seeing this. If you had replied to me just like I am doing, I should have seen this earlier. My apologies still.

Kindly refer to this.

http://www.bogotobogo.com/python/python_ssh_remote_run.php

Or if you wish, post the git link.

Thank you!