Passing a String to a Python CGI Script

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

    Passing a String to a Python CGI Script

    When one is using an HTML form via a web broswer, the user submits the form
    contents and these are passed to a CGI Python script on the web server.
    I need to write a client script that connects to a web site, runs a Python
    CGI script on the web server AND passes a string to the CGI Python script
    that the Python CGI script can store/manipulate/evalute etc....
    I know how to connect to the web site and run the CGI Python script using a
    client Python script with the urllib module. But how do I submit/send a
    string via this client Python script to the web server on behalf of the CGI
    Python script? Can someone give me a clue or a hint on how to do that? Do
    I write the string to the web server? If so, how would the CGI Python
    script know about it, read it, and store it?
    Thanks,
    DeepBleu


  • DeepBleu

    #2
    Re: Passing a String to a Python CGI Script

    I'll reword that:
    A client is writing a string to the web server (IPlanet on a Sun Server)
    using a java program. The client then establishes a connection with a cgi
    Python program on the server. This client wants the string to be passed
    into this cgi Python script on the server.
    There are no name=value request pairs. How can this cgi Python script read
    the string sent to the web server. The client is POSTING the string as a
    REQUEST. For the Pythong cgi script I am using CGI module to handle
    requests and responses. However, how do you handle this REQUEST?

    "DeepBleu" <DeepBleu@DeepB leu.org> wrote in message
    news:AY3cb.1045 24$834.93516@tw ister.austin.rr .com...[color=blue]
    > When one is using an HTML form via a web broswer, the user submits the[/color]
    form[color=blue]
    > contents and these are passed to a CGI Python script on the web server.
    > I need to write a client script that connects to a web site, runs a Python
    > CGI script on the web server AND passes a string to the CGI Python script
    > that the Python CGI script can store/manipulate/evalute etc....
    > I know how to connect to the web site and run the CGI Python script using[/color]
    a[color=blue]
    > client Python script with the urllib module. But how do I submit/send a
    > string via this client Python script to the web server on behalf of the[/color]
    CGI[color=blue]
    > Python script? Can someone give me a clue or a hint on how to do that?[/color]
    Do[color=blue]
    > I write the string to the web server? If so, how would the CGI Python
    > script know about it, read it, and store it?
    > Thanks,
    > DeepBleu
    >
    >[/color]


    Comment

    • DeepBleu

      #3
      Re: Passing a String to a Python CGI Script

      I figured this thing out. But, really truly no one could have suggested the
      use of standard I/O????
      DeepBleu

      "DeepBleu" <DeepBleu@DeepB leu.org> wrote in message
      news:METcb.1133 16$z32.83149@tw ister.austin.rr .com...[color=blue]
      > I'll reword that:
      > A client is writing a string to the web server (IPlanet on a Sun Server)
      > using a java program. The client then establishes a connection with a cgi
      > Python program on the server. This client wants the string to be passed
      > into this cgi Python script on the server.
      > There are no name=value request pairs. How can this cgi Python script[/color]
      read[color=blue]
      > the string sent to the web server. The client is POSTING the string as a
      > REQUEST. For the Pythong cgi script I am using CGI module to handle
      > requests and responses. However, how do you handle this REQUEST?
      >
      > "DeepBleu" <DeepBleu@DeepB leu.org> wrote in message
      > news:AY3cb.1045 24$834.93516@tw ister.austin.rr .com...[color=green]
      > > When one is using an HTML form via a web broswer, the user submits the[/color]
      > form[color=green]
      > > contents and these are passed to a CGI Python script on the web server.
      > > I need to write a client script that connects to a web site, runs a[/color][/color]
      Python[color=blue][color=green]
      > > CGI script on the web server AND passes a string to the CGI Python[/color][/color]
      script[color=blue][color=green]
      > > that the Python CGI script can store/manipulate/evalute etc....
      > > I know how to connect to the web site and run the CGI Python script[/color][/color]
      using[color=blue]
      > a[color=green]
      > > client Python script with the urllib module. But how do I submit/send a
      > > string via this client Python script to the web server on behalf of the[/color]
      > CGI[color=green]
      > > Python script? Can someone give me a clue or a hint on how to do that?[/color]
      > Do[color=green]
      > > I write the string to the web server? If so, how would the CGI Python
      > > script know about it, read it, and store it?
      > > Thanks,
      > > DeepBleu
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...