How can I host a python server script, on a cloud hosted server (Google, Amazon, Azure...)?
<p>let me start by answering the obvious.  Why would I want to do this?  Actually, I don't.  I made the following program below, but it's designed to run on a remote server.  I'm basically using the socket library, but I want to host it on another machine, preferbly a google, amazon, azure, etc.  But, as I knew before I tried, this was slightly not possible.  Google app engine gave me an error, like "access denied to socket blah blah blah".  </p>

<p>I feel I'm left with 2 options:</p>

<p>I can continue to run this code on my own servers, if I can figure out how to host this server script on a hosted cloud base server, or I could take the code, every bit that doesn't contain the server portion, and make it get the "data" from the clients, via POST requests.  </p>

<p>the data is what's sent from the client...</p>

<pre><code>bap = {}
while 1:
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    server_address = ("localhost", 8081)
    #print 'starting up on %s port %s' % server_address
    server.bind(server_address)
    server.listen(5)
    connection, client_address = server.accept()
    #print 'connection from', connection.getpeername()
    server.close()
    data = connection.recv(4096)

    if data in bap:
        print data + " is checking in!!!"
        for k, v in bap.iteritems():
            if k == data:
                bap[k] = 10
                print bap
                c = open('check.json', "w")
                wiz = json.dumps(bap)
                c.write(wiz)
                c.close()
            else:
                bap[k] -= 1
                if bap[k] &lt; 0:
                    print k + " is Offline!!!"
                    mail()
                    c = open('log.txt', "a")
                    wiz = json.dumps(bap)
                    time1 = datetime.datetime.now().strftime("%m/%d/%y %H:%M ")
                    c.write(k + " is offline!!! "+ time1 + "\n")
                    c.close()
                else:
                    print bap
    else:
        bap[data] = 10
        print data + " was added!!!"
</code></pre>