On Mon, 07 Mar 2005 04:02:10 +0100, Henk Jansen <burley@zonnet.nl> wrote:
I have two problems when I want for pass <FORM ...> information into a Python Script:
1) Besides passing the FORM data, I also need to pass an extra argument into the Python script that was passed (as <URL>?arg=argval) by the URL. A thing like:
<FORM action=my_py_script(arg=<dtml-var argval>)
doesn't work. Neither does:
<FORM action="my_py_script(arg=<dtml-var argval>")
What's the proper syntax for passing extra arguments to a Python script in a FORM action?
Use an <input type="hidden"> field.
2) How do I access the FORM data in a Python script? I've tried "import cgi" but a call to cgi.FieldStorage() was met by a message that I wasn't authorized to make this call ...
REQUEST.form['var'] iirc. -- Phillip Hutchings http://www.sitharus.com/ sitharus@gmail.com / sitharus@sitharus.com
Hi Zope List, Some months ago I installed Plone 2.05 and kicked it around a bit. I then went back to my normal Zope installs because of work requirements. Anyway, I decide to install the latest Zope (windows version) and installed it. But when I go into the ZMI and click the control panel the SOFTWARE_HOME and ZOPE_HOME point to my old plone paths. This is odd because the Plone instance is disabled as a service. I then disabled *all* my zope instances and resinstalled Zope 2.7.5b yet got the same results. I've checked: a) the registry: nothing b) enviromental vars nothing c) the instance-home bin files: no problems there. Has anyone seen this? Im stumped! My question is (again this is windows xp) where in the carnation could Zope be picking this old paths up from and assuming them for ZOPE_HOME and SOFTWARE_HOME? Thanks, David
David Hassalevris wrote:
Has anyone seen this? Im stumped! My question is (again this is windows xp) where in the carnation could Zope be picking this old paths up from and assuming them for ZOPE_HOME and SOFTWARE_HOME?
Somewhere in theregistry no doubt. It's for this reason that I never run zope as a service on windows, always use runzope.bat from a dos box. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
David Hassalevris wrote at 2005-3-6 18:21 -0800:
... But when I go into the ZMI and click the control panel the SOFTWARE_HOME and ZOPE_HOME point to my old plone paths. This is odd because the Plone instance is disabled as a service.
"SOFTWARE_HOME" and friends are determined in Zope's configuration file (from Zope 2.7 on). -- Dieter
Dieter Maurer wrote:
David Hassalevris wrote at 2005-3-6 18:21 -0800:
... But when I go into the ZMI and click the control panel the SOFTWARE_HOME and ZOPE_HOME point to my old plone paths. This is odd because the Plone instance is disabled as a service.
"SOFTWARE_HOME" and friends are determined in Zope's configuration file (from Zope 2.7 on).
Dieter, Thanks very much for answering. It turns out that the installer was somehow picking up "legacy" paths maybe because I have a separate Python 2.3 already installed. When I started cleaning up my registry of instances of "pythonpath" (and all other old python entries) then python ... sys.path was shrinking ... I first edited \zope-instance\etc\zope.conf and corrected all occurances of the "wrong" zope directories. Re-ran c:\zope-instance\bin\zopeservice but that didnt do the trick. I finally got it to install correctly by editing ZopeService.Py, hard-coding the correct zope_home and software_home and running: "c:\program files\zope-2.7.4-0\bin\python zopeservice.py" --startup auto install. Note: notice the full path to the zope python.exe. Using my "other python 2.3" which in the system path was giving different results. Seems that *anyone* that has prior 2.7x versions installed and is using windows and who has python 2.3 "outside" of Zope\bin will run into this. But then i'm cursed so it could just be me! Thanks again, David
participants (4)
-
Chris Withers -
David Hassalevris -
Dieter Maurer -
Phillip Hutchings