473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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
Jul 18 '05 #1
2 4879
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" <De******@DeepBleu.org> wrote in message
news:AY********************@twister.austin.rr.com. ..
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

Jul 18 '05 #2
I figured this thing out. But, really truly no one could have suggested the
use of standard I/O????
DeepBleu

"DeepBleu" <De******@DeepBleu.org> wrote in message
news:ME********************@twister.austin.rr.com. ..
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" <De******@DeepBleu.org> wrote in message
news:AY********************@twister.austin.rr.com. ..
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


Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wonder | last post by:
Hi, How can I pass the url of the current webpage link to a python script in html? thanks sam
3
by: eight02645999 | last post by:
hi if i have a string like this "ABCE-123456 ABC_DEF_Suggest(abc def ghi).txt" that needs to be passed to a python script and i wanted to get the words inside the brackets after i passed...
5
by: Chris Hieronymus | last post by:
Hi, I have a bunch of x-y data contained in an array. I would like to plot the data using an external program (psxy in GMT). The plotting program takes x-y couples as standard input. ...
5
by: moni | last post by:
Hi.. I am trying to use javascript for google maps display. If I call the javascript function from my aspx file I use: <input type="text" id="addresstext" value="Huntington Avenue,...
2
by: luis | last post by:
I'm using ctypes to call a fortran dll from python. I have no problems passing integer and double arryas, but I have an error with str arrys. For example: ..... StringVector = c_char_p *...
6
Megadeus
by: Megadeus | last post by:
Okay, I've been programming for awhile in many different languages, but my current obsession is Python. Whenever I get into a new language, I usually write a small program, usually in the form of a...
5
by: goldtech | last post by:
Hi, I'm passing what I think is a string parameter to another Python program (spawn.py) - see the code snip below. But only the counter part gets printed to a log file via spawn.py. Yet the...
2
by: neeebs | last post by:
Hi, I'm not sure if this is a javascript problem per se, but here goes. I have an xsl document with a python function defined within a <script> block. Elsewhere in the xsl file, within a python...
6
by: Rafe | last post by:
Forgive me if I mangle any terminology here, but please correct me if I do... I have an object which acts exactly like a string as long as I stay in Python land. However, I am using the object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.