I am experimenting with Python, and want to convert some of my PHP scripts
to python cgi scripts. In PHP I use PHP_SELF for the action target. This
way I can "reuse" data in fields (i.e. if the user enters data in a field
then submits the form, it comes back already filled in on each subsequent
iteration). I know I can do this in Python, but before I spend a lot of
time, is it very complicated, or can form field values be (re-)populated
easily?
Thanks
Bill 5 2503
"WmGill" <wm****@wmgill.com> writes: I am experimenting with Python, and want to convert some of my PHP scripts to python cgi scripts. In PHP I use PHP_SELF for the action target. This
[...question snipped...]
Which web framework / library are you using?
Or are you just using the standard library cgi module (most Python web
programmers use something more than that)?
John
Like I said, I'm experimenting. I was thinking of using the standard cgi
module. but I'm open to suggestions.
Bill
"John J. Lee" <jj*@pobox.com> wrote in message
news:87************@pobox.com... "WmGill" <wm****@wmgill.com> writes:
I am experimenting with Python, and want to convert some of my PHP
scripts to python cgi scripts. In PHP I use PHP_SELF for the action target.
This [...question snipped...]
Which web framework / library are you using?
Or are you just using the standard library cgi module (most Python web programmers use something more than that)?
John
On Sun, 2 Nov 2003 18:19:06 -0500, "WmGill" <wm****@wmgill.com> wrote: Like I said, I'm experimenting. I was thinking of using the standard cgi module. but I'm open to suggestions.
Look at Spyce framework: http://spyce.sourceforge.net
It is similiar to PHP but uses Python syntax.
--
JZ ICQ:6712522
On Nov 2, 2003, at 4:41 PM, WmGill wrote: I am experimenting with Python, and want to convert some of my PHP scripts to python cgi scripts. In PHP I use PHP_SELF for the action target. This way I can "reuse" data in fields (i.e. if the user enters data in a field then submits the form, it comes back already filled in on each subsequent iteration). I know I can do this in Python, but before I spend a lot of time, is it very complicated, or can form field values be (re-)populated easily?
You probably will be happier if you use something other than CGI, but
for CGI I believe os.environ()['SCRIPT_NAME'] should give you what you
want. (This URL introspection differs considerably between frameworks)
--
Ian Bicking | ia**@colorstudy.com | http://blog.ianbicking.org
> You probably will be happier if you use something other than CGI,...
I thought the cgi interface was the standard for HTML form processing? I believe os.environ()['SCRIPT_NAME'] should give you what you want...
I don't see where knowing the script name helps?
Others have also suggested using other programs. I obviously need to be
more clear in what I thought was a simple question.
Lets say I have a simple html form that asks for: First Name, Last Name,
department, Employee ID, and comments. An emplyee fills out the form,and
clicks submit. My script looks up the employee ID and doesn't find him/her,
so it returns (displays) the form for correction, but leaving all the
submitted information in the original input fields so that the employee
doesn't have to re-enter everything. I know how to do this in PHP, but want
to try it in Python.
Bill
"Ian Bicking" <ia**@colorstudy.com> wrote in message
news:ma************************************@python .org... On Nov 2, 2003, at 4:41 PM, WmGill wrote: I am experimenting with Python, and want to convert some of my PHP scripts to python cgi scripts. In PHP I use PHP_SELF for the action target. This way I can "reuse" data in fields (i.e. if the user enters data in a field then submits the form, it comes back already filled in on each subsequent iteration). I know I can do this in Python, but before I spend a lot of time, is it very complicated, or can form field values be (re-)populated easily?
You probably will be happier if you use something other than CGI, but for CGI I believe os.environ()['SCRIPT_NAME'] should give you what you want. (This URL introspection differs considerably between frameworks)
-- Ian Bicking | ia**@colorstudy.com | http://blog.ianbicking.org
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Danny Anderson |
last post by:
Hola, PHP folk!
I have a php page that contains a self-processing form. The form holds
search results. The search terms originally came from the previous page,
but the user can repeatedly...
|
by: Jack |
last post by:
I'm setting up a form and want to check if some conditions are met when
the form submits. If they aren't, the form displays a missing field
message and the user has to go back to fill in the...
|
by: Adam Smith |
last post by:
Have a lot of data to collect / choices presented, producing a large
form. I am desirous of breaking it up into multiple pages to avoid
detracting users.
Could some one say how best to create...
|
by: Raed Sawalha |
last post by:
I have form with progress bar ,when application begin processing and progress
bar moving if I minimized the form and try to restore it ,it is not showing
until the processing completed ,how can I...
|
by: Ioannis Vranos |
last post by:
Why in this code the form *does not refresh* when it gets the focus/after some time?
#using <mscorlib.dll>
#using <system.windows.forms.dll>
#using <system.dll>
#using <system.drawing.dll>
|
by: eswanson |
last post by:
I have a web page I need to post a file plus some other fields to it. How
can I do this from a asp.net page. I know I can send individual fields to the
other page, but how do I send a file to the...
|
by: gerryLowry::Ability Business Computer Services {KC |
last post by:
"Getting Back Your Visual Basic 6.0 Goodies" by Billy Hollis, 2003-5-14,
states:
"Getting a Forms Collection
Visual Basic 6.0 developers are often fond of looping through the currently
loaded...
|
by: Chris |
last post by:
Hi,
I have a form for uploading documents and inserting the data into a mysql
db. I would like to validate the form. I have tried a couple of Javascript
form validation functions, but it...
|
by: Zytan |
last post by:
I have public methods in a form. The main form calls them, to update
that form's display. This form is like a real-time view of data that
is changing.
But, the form may not exist (it is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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...
|
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...
| |