At last I find and change everything.Now it looks like this:
--MY DTML DOCUMENT-
form action= method=postbr /
pbr KULLANICI ADI br input type=text name=name
pbr SIFREbr input type=text name=sifre
pbr SIFRE YENIDENbr input type=text name=sifret
input type=submit name=formParams:action
Garry Saddington wrote:
I have the following external method to back up a postgres database,
using the following software versions.
Why on earth would you not just do this in a cron job?!
Chris
--
Simplistix - Content Management, Zope Python Consulting
-
Chris Withers wrote:
Garry Saddington wrote:
I have the following external method to back up a postgres database,
using the following software versions.
Why on earth would you not just do this in a cron job?!
Chris
Because I want the backup to be done manually, through the
Garry Saddington wrote:
Because I want the backup to be done manually,
That doesn't seem like such a hot idea. Something that's easilly forgotten.
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
Garry Saddington wrote:
Chris Withers wrote:
Garry Saddington wrote:
Because I want the backup to be done manually,
That doesn't seem like such a hot idea. Something that's easilly
forgotten.
Thanks, I've sorted it. Turns out that pg_dump was being run by SYSTEM
and
Zope is running as user scholarpack who is an administrator on win
server 2008.
/
usar scholarpack have rights to access postgres?
are you see the logs from postgres? new conecctions?
or logs from zope?
___
Zope maillist - Zope@zope.org
--On 7. April 2008 13:15:04 +0530 vaibhav pol [EMAIL PROTECTED] wrote:
hi,
I am using Zope-2.8.1-final and also added zoperl-1.0.beta5 for perl
support . I wrote a Perl module which edit files the file access
permission is only to root and i want to invoking the module as onther
user . by
On Apr 7, 2008, at 11:23 , vaibhav pol wrote:
Thanks alot
but i am not using command but i using perl function to modify the
passwd and shadow file. in my module that's why i want to invoke
that module as root
There's a few things seriously wrong with your plan:
- you want to create a
Thanks alot
but i am not using command but i using perl function to modify the passwd
and shadow file. in my module that's why i want to invoke that module as
root
On Mon, Apr 7, 2008 at 1:19 PM, Andreas Jung [EMAIL PROTECTED] wrote:
--On 7. April 2008 13:15:04 +0530 vaibhav pol [EMAIL
Jens Vagelpohl wrote:
- doing Perl methods or external methods in Zope has been deprecated
years and years ago. You will have a hard time finding anyone to support
that.
I'm guessing you mean perl external methods rather than all external
methods in general? ;-)
Chris
--
Simplistix -
On Apr 7, 2008, at 12:18 , Chris Withers wrote:
Jens Vagelpohl wrote:
- doing Perl methods or external methods in Zope has been
deprecated years and years ago. You will have a hard time finding
anyone to support that.
I'm guessing you mean perl external methods rather than all external
If you absolutely have to, look at Paramiko a python ssh/sftp library which is
easy to use but as mentioned already there are critical security issues.
with paramiko you don't have to directly edit the files but within an ssh
connection run the commands needed that actually make the changes.
--On 12. Februar 2007 07:34:09 -0800 Ridzwan Aminuddin [EMAIL PROTECTED]
wrote:
java -jar
/var/lib/zope2.8/instance/plone-site/Extensions/test.jar
it works perfectly
But using the external method given above just gives me a blank output.
I've also tried popen2:
from
--On 13. Februar 2007 12:53:25 + Alan [EMAIL PROTECTED] wrote:
Dear List,
I have an external method and now I developed I new module in a
separated file and then I am trying to make my external method to
import it but I am failing here. Where should place my module file in
order to be
Thanks Andreas, I am trying with:
if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)
where myPath should be '[Zope installation folder]/instance/import'.
So my question now is: is there a variable inside Zope which can
returns the 'import' path?
Many thanks in advance.
Cheers,
Alan
--On 13. Februar 2007 13:10:17 + Alan [EMAIL PROTECTED] wrote:
Thanks Andreas, I am trying with:
if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)
What's the sense of this code? sys.path is usually *never* empty.
You should really look at the Python docs and learn where Python
- Original Message -
From: Alan [EMAIL PROTECTED]
To: Andreas Jung [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, February 13, 2007 8:10 AM
Subject: Re: [Zope] External Method importing modules
Thanks Andreas, I am trying with:
if sys.path.count(myPath) == 0: sys.path.insert(0
Well, I did it:
from App.config import getConfiguration
extPath = getConfiguration().instancehome+'/Extensions'
if sys.path.count(extPath) == 0: sys.path.insert(0, extPath)
And it worked for what I wanted.
On 13/02/07, Alan [EMAIL PROTECTED] wrote:
On 13/02/07, Andreas Jung [EMAIL PROTECTED]
Alan wrote at 2007-2-13 13:10 +:
if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)
where myPath should be '[Zope installation folder]/instance/import'.
So my question now is: is there a variable inside Zope which can
returns the 'import' path?
Formerly, the ExternalMethod
Sean W. Duffy wrote at 2006-12-27 19:44 -0600:
...
I have upgraded from Zope 2.8.5 to 2.9.4. This currently works in the
2.8.5 instance but not in the 2.9.4.
I have a Module Progress in /usr/lib/python2.4/site-packages/Progress
containing 4 files:
__init__.py __init__.pyc Progress.py
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 27. Dezember 2006 19:44:24 -0600 Sean W. Duffy [EMAIL PROTECTED]
wrote:
Hi,
I have upgraded from Zope 2.8.5 to 2.9.4. This currently works in the
2.8.5 instance but not in the 2.9.4.
I have a Module Progress in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 21. Dezember 2006 20:32:39 +0100 Mihamina Rakotomandimby
[EMAIL PROTECTED] wrote:
Hi,
I have an external method that fetches some web content (POP messages)
then format an HTML output to make it easy to display.
the Id of the external
ZopeProfiler seems to come with no instructions to install. Can you
advise?
I haven't installed it for years, but i seem to remember that it
installed just like a normal product (ie. install in the Products
directory, restart zope, it shows up automagically - in linux that is,
i don't do
On 11/2/06 6:52 AM, Maciej Wisniowski [EMAIL PROTECTED]
wrote:
To install ZopeProfiler product you have to copy it to Products/ folder
of your zope instance, restart your Zope and go to ControlPanel in ZMI.
You should see new link there: Zope Profiler. When you want to start
profiling you hit
+---[ Edward Pollard ]--
|
| I was aware the built-in profiling existed but I've never found it very easy
| to work with. However, when I installed ZopeProfiler it complained the
| built-in profiling was enabled, which was news to me.
|
| I turned it off and my problem
--On 2. November 2006 09:08:13 -0600 Edward Pollard
[EMAIL PROTECTED] wrote:
On 11/2/06 6:52 AM, Maciej Wisniowski
[EMAIL PROTECTED] wrote:
To install ZopeProfiler product you have to copy it to Products/ folder
of your zope instance, restart your Zope and go to ControlPanel in ZMI.
You
- Original Message -
From: Edward Pollard [EMAIL PROTECTED]
To: zope@zope.org
Sent: Wednesday, November 01, 2006 5:58 PM
Subject: [Zope] External Method = Slow; Shell Script = Fast
Hello,
I've got an external method that does some pretty complicated stuff.
Basically it takes two
- Original Message -
From: Edward Pollard [EMAIL PROTECTED]
To: Jonathan [EMAIL PROTECTED]
Sent: Wednesday, November 01, 2006 5:21 PM
Subject: Re: [Zope] External Method = Slow; Shell Script = Fast
Hi Jon,
ZopeProfiler seems to come with no instructions to install. Can you
advise
On Wed, 2006-10-18 at 15:07 -0400, Paul Winkler wrote:
On Wed, Oct 18, 2006 at 06:13:38PM +0100, garry saddington wrote:
Can anyone explain what is happening here. I am using Saxon to transform
an xml file(source) using a stylesheet(style) the result is then written
to Postgres. The
garry saddington wrote at 2006-10-18 18:13 +0100:
...
import psycopg, string, re, subprocess
def scholarpack_xml_transform(source):
f=open('/opt/scholarpack/ancillary/source.xml','w')
f.write(source)
f.close
The line above looks buggy: missing ().
...
+---[ garry saddington ]--
| Can anyone explain what is happening here. I am using Saxon to transform
| an xml file(source) using a stylesheet(style) the result is then written
| to Postgres. The contents of source are uploaded in Zope and passed to
| the external method as
+---[ garry saddington ]--
| On Thu, 2006-10-19 at 03:18 +1000, Andrew Milton wrote:
| +---[ garry saddington ]--
| | Can anyone explain what is happening here. I am using Saxon to transform
| | an xml file(source) using a stylesheet(style) the
On Wed, Oct 18, 2006 at 06:13:38PM +0100, garry saddington wrote:
Can anyone explain what is happening here. I am using Saxon to transform
an xml file(source) using a stylesheet(style) the result is then written
to Postgres. The contents of source are uploaded in Zope and passed to
the
Alan wrote:
Thanks for help. I did what suggested below. We also set a crontab to
restart the zope server every night,
Why?!
Chris
--
Simplistix - Content Management, Zope Python Consulting
- http://www.simplistix.co.uk
___
Zope
Hi List,
crontab is really a bad idea. We quitted that.
Thanks for your commentaries.
Alan
On 05/10/06, Chris Withers [EMAIL PROTECTED] wrote:
Alan wrote:
Thanks for help. I did what suggested below. We also set a crontab to
restart the zope server every night,
Why?!
Chris
--
Simplistix
--On 5. Oktober 2006 10:24:31 +0100 Alan [EMAIL PROTECTED] wrote:
Hi List,
crontab is really a bad idea. We quitted that.
Why is using crontab a bad idea?
It's the most common and most reliable solution to run scripts in Zope
periodically.
-aj
pgpHnQfkHcCKi.pgp
Description: PGP
List zope@zope.org
Objet : Re: [Zope] external method: importing and updating method
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 5 Oct 2006, at 05:24, Alan wrote:
Hi List,
crontab is really a bad idea. We quitted that.
Might make sense to back up blanket nonsensical
]
To: Alan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, October 03, 2006 2:06 PM
Subject: Re: [Zope] external method: importing and updating method
Alan wrote at 2006-10-2 18:48 +0100:
In my external method I have something like this:
...
sys.path.insert(0, CCPNPYTHON)
This is not a good
- Original Message -
From: Alan [EMAIL PROTECTED]
To: Jonathan [EMAIL PROTECTED]
Cc: Dieter Maurer [EMAIL PROTECTED]; zope@zope.org
Sent: Wednesday, October 04, 2006 6:12 AM
Subject: Re: Re: [Zope] external method: importing and updating method
Hi Folks,
Thanks for help. I did what
On 10/4/06, Alan [EMAIL PROTECTED] wrote:
Thanks for help. I did what suggested below. We also set a crontab to
restart the zope server every night, but them I was wondering if it is
a good idea.
Isn't it better to just restart the server when you have updated the software?
Modules loaded from
Alan wrote at 2006-10-2 18:48 +0100:
In my external method I have something like this:
...
sys.path.insert(0, CCPNPYTHON)
This is not a good idea!
The source of an External Method can be read arbitrarily often --
and each time, you extend sys.path...
The imp module allows you to import modules
- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Alan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Tuesday, October 03, 2006 2:06 PM
Subject: Re: [Zope] external method: importing and updating method
Alan wrote at 2006-10-2 18:48 +0100:
In my external method I have
- Original Message -
From: Alan [EMAIL PROTECTED]
To: zope@zope.org
Sent: Monday, October 02, 2006 1:48 PM
Subject: [Zope] external method: importing and updating method
Hi List!
In my external method I have something like this:
...
sys.path.insert(0, CCPNPYTHON)
from
Hi there!
I managed to find the problem and the solution.
First, I've forgot to mention that in my script, oname is an uploaded file.
I just inserted a f.close() and voilá!
def upload_external(self,file,REQUEST):
import os,tarfile
...
f=open(oname,wb)
f.write(file.read())
f.close()
...
Alan wrote:
Hi there!
I managed to find the problem and the solution.
First, I've forgot to mention that in my script, oname is an uploaded file.
I just inserted a f.close() and voilá!
def upload_external(self,file,REQUEST):
import os,tarfile
...
f=open(oname,wb)
--On 18. Juli 2006 16:12:18 +0100 Alan [EMAIL PROTECTED] wrote:
Error Type: IOError
Error Value: CRC check failed
This is unlikely a Zope issue. Either your tar file is broken or the
tarfile module is broken. Check if your code runs without Zope as a
simple PythonScript..there is nothing
jwithers wrote:
Because I need to feed the file to Mailman for evil purposes of my own
(well, fairly mundane purposes of allowing my zope app to manipulate
mailman list memberships, really) that the prototype mailman adapter I
found doesn't meet.
When I've needed to do simple stuff with this
When I've needed to do simple stuff with this is the past, I just
manipulate mailmain by send email from Zope to mailman's admin interface...
Pipes seem easier to me. Responses from the command line scripts seem
much easier to use for confirmation. And there are things you can do
easily
jwithers wrote:
eep, another one, hope we're not related ;-)
Can anyone tell me what the default working directory for an external
method is?
You can't rely on it being anything. If you're working with files, you
need to be very careful...
Further, I need this to create a file temporarily
jwithers wrote at 2005-9-28 15:43 -0700:
...
I have an external method that at this point is made up of nothing but
os.getcwd() and lives in my Extensions directory. When it is run, it
reports the working directory as being one of my Products directories.
Some products are broken (they change
On Thu, 2005-09-29 at 00:20, Chris Withers wrote:
eep, another one, hope we're not related ;-)
When I saw your posts on newsgroups years ago, I almost gave up python
programming altogether Chris, thinking that any given field of endeavor
needs only one Withers, but decided to go ahead and
Products?? That is odd. I thought it was the var/ directory or at
least the zope instance home directory. From the External method you
should have access to INSTANCE_HOME and SOFTWARE_HOME. Try if these
are what you want. I doubt that you'll find your Extensions/ dir in
any of them so you might
jwithers,
a) Is your os.getcwd() (in /Extensions) called from a Product (in
/Products?) Otherwise I have not idea
b) Regarding temporary files ..
I've used stuff like ...
import tempfile
tmpFile2 = tempfile.mktemp()
theFile=open( tmpFile2,'rb')
result = theFile.read()
Marty Stitt wrote:
Is it up to me to write my own security code when using an external
method?
Basically, yes. You can protect access to the "stub" within the ZODB
using the Security tab, but the body of the external method has free
reign.
Shane
If you are talking about dtml you can pass them in the dtml-call tag
dtml-call "my_external_method(_.None, _, param_1=1, param_2=2)"
--
Andy McKay, Developer.
ActiveState.
- Original Message -
From: "Kini Natekar" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 21,
Kini Natekar writes:
How can I pass parameters to an External Method? I
know of one way to do this, is to use dtml-var tag. Is
there any other way?
Anywhere, you can use 'expr=""'. This means almost
all DTML tags: call, var, in, with, let (without 'expr='!) ...
Example:
Eric writes:
To summarize: How do I import modules in an External Method's .py file?
I remember, I read this in some "External Method" related documentation.
You do *NOT* place such modules inside the folder "Extensions"
but put them somewhere else reachable by "PYTHONPATH".
The documentation
Also, you could always import the specific module for your database, and
create a db connection, then execute() and fetch() directly. Although, if
you are putting this in an external method, it would be wiser to use your
existing ZSQL methods ;]
Knight
[EMAIL PROTECTED]
On Fri, 6 Oct 2000,
Andreas Pauley wrote:
For some reason you have to "return" everything that should be available
to zope. You can return a sequence and loop through it with DTML or you
can build a variable with everything you want to display and then return
the variable.
I have no idea why this is so, and
Kelvin Cheong writes:
import cgi
form = cgi.FieldStorage()
This gives you an empty "FieldStorage"
fileitem = form["userTABPIX1"]
In it, "userTABPIX1" is unknown.
fname = tempfile.mktemp()
fp=open(fname,'w')
fp.write(fileitem.file.read())
fp.close()
Give
Jason Lee writes:
... external method access ...
dtml-call genhash
This says, "call the method (for its side effects)
but discard any return value".
This produces nothing. I think I read somewhere that dtml-call returns no data,
so that might explain it. I could be wrong.
You are
Dieter Maurer wrote:
dtml-var genhash
That should work.
What KeyError do you get?
The error message's head should tell you what key has not been
found. The traceback at the foot (especially the last line)
tells you where the KeyError occured.
After I posted, I did some more wild,
62 matches
Mail list logo