CGI Script using Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralf

    #1

    CGI Script using Python

    Hello,
    is there anybody who can help me.
    I would like to use a Python Script to download Files from a Server to the
    Client, to update the Client.

    Thanx
    Ralf


  • Fuzzyman

    #2
    Re: CGI Script using Python

    On Apr 19, 11:34 am, "Ralf" <r...@supanet.c omwrote:
    Hello,
    is there anybody who can help me.
    I would like to use a Python Script to download Files from a Server to the
    Client, to update the Client.
    >
    Downman is an example of a Python CGI which presents files for
    download.

    http://www.voidspace.org.uk/python/cgi.shtml#downman

    You will want to copy the part that sends the right headers (etc)...

    Fuzzyman

    Thanx
    Ralf

    Comment

    • Tim Roberts

      #3
      Re: CGI Script using Python

      "Ralf" <ralfi@supanet. comwrote:
      >
      >is there anybody who can help me.
      >I would like to use a Python Script to download Files from a Server to the
      >Client, to update the Client.
      Remember, though, that a CGI script cannot actually put files anywhere. You
      can certainly download files to the client browser, but the user will have
      to be involved to tell the browser where to store the incoming file.

      Doing anything else would be a security hole.
      --
      Tim Roberts, timr@probo.com
      Providenza & Boekelheide, Inc.

      Comment

      • Fuzzyman

        #4
        Re: CGI Script using Python

        On Apr 21, 10:02 pm, Tim Roberts <t...@probo.com wrote:
        "Ralf" <r...@supanet.c omwrote:
        >
        is there anybody who can help me.
        I would like to use a Python Script to download Files from a Server to the
        Client, to update the Client.
        >
        Remember, though, that a CGI script cannot actually put files anywhere. You
        can certainly download files to the client browser, but the user will have
        to be involved to tell the browser where to store the incoming file.
        >
        Doing anything else would be a security hole.
        But a CGI script can send a file in response to an automated request
        from a client application, without ever needing a browser to be
        involved.

        Sending the right headers means that existing libraries (urllib2 I
        guess) will know how to handle the response.

        Fuzzyman
        http://www.voidspace.org.uk/python/articles.shtml
        --
        Tim Roberts, t...@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        Working...