Web Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • misceverything@gmail.com

    Web Server

    As part of a Python app I wrote recently (for Windows), I would like
    to give the option of an HTTP (HTTPS if possible, but not necessary)
    front end, which would then call some existing python scripts. My
    question is - I know I can write a simple HTTP server in Python, but
    if there's something simple already out there, I'd prefer to just use
    that. Basically all I need is a simple (i.e. preferably a single
    executable) web server that can serve up my content - the only thing I
    want the user to be able to configure is the port the web server
    listens on (or ports if HTTPS also), and the location of the HTML
    files... thanks in advance for your help.
  • Fredrik Lundh

    #2
    Re: Web Server

    misceverything@ gmail.com wrote:
    As part of a Python app I wrote recently (for Windows), I would like
    to give the option of an HTTP (HTTPS if possible, but not necessary)
    front end, which would then call some existing python scripts. My
    question is - I know I can write a simple HTTP server in Python, but
    if there's something simple already out there, I'd prefer to just use
    that. Basically all I need is a simple (i.e. preferably a single
    executable) web server that can serve up my content - the only thing I
    want the user to be able to configure is the port the web server
    listens on (or ports if HTTPS also), and the location of the HTML
    files... thanks in advance for your help.
    import SimpleHTTPServe r ?

    sample code here:



    </F>

    Comment

    • misceverything@gmail.com

      #3
      Re: Web Server

      Thanks, Fredrik - that definitely works. Now to get a little greedy -
      is there something along those lines that is a bit more secure (i.e.
      allows HTTPS, possibly with authentication) ? Basically something that
      you would feel more comfortable opening up to the Internet..

      Comment

      • Fredrik Lundh

        #4
        Re: Web Server

        misceverything@ gmail.com wrote:
        Thanks, Fredrik - that definitely works. Now to get a little greedy -
        is there something along those lines that is a bit more secure (i.e.
        allows HTTPS, possibly with authentication) ? Basically something that
        you would feel more comfortable opening up to the Internet..
        open up to whom? I'm not sure I like the combination of "windows app"
        and "opened up to the internet", really...

        but assuming that you're aware of the issues involved, and want a
        light-weight HTTP server for Windows, this one's pretty nice:



        there's also apache, of course, and a bunch of others, including several
        Python solutions (more or less pre-packaged). but the "open up" part
        still sounds a bit risky. maybe you could turn things around, and let
        the application "push" data to your server instead?

        </F>

        Comment

        Working...