Re: [Zope] urllib.urlopen inside a python-script? alternatives?

2010-11-15 Thread David Bear
urlopen is restricted python. You will need to create file system script (a
product) (or external script) in order to use it.

On Mon, Nov 15, 2010 at 8:43 AM, stepha...@gmx.net wrote:

 Hello,

 I'm trying to use facebook's single-sign-on mechanism with zope and
 querying account information for logged in facebook-users from within zope.

 For this I need to send url-requests from my zope-server to the
 facebook-servers and read the response. I tried to test the concept with
 a python-script:

 ##
 import urllib

 cookie= request[fbs_ + the application id]

 args=dict(map(lambda x:x.split('='),cookie.split('')))

 url=https://graph.facebook.com/me?access_token=+args['access_token']

 file = urllib.urlopen(url)
 resp=file.read()
 file.close()

 return args,url,resp
 ##

 When running this an authentication-window pops up - and subsequently
 tells me:

 ---
 Error Type: Unauthorized
 Error Value: You are not allowed to access 'urlopen' in this context
 ---

 So the problem is with opening the external-url I suppose ...

 What's the Zope-way of doing this? - how can I tell it to get read
 information of another URL?

 thanks,
 stephan
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-494-0424
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] preventing form submission

2010-02-02 Thread David Bear
Is there a step by step guide to document how to do this?

On Tue, Feb 2, 2010 at 6:03 PM, Shane Hathaway sh...@hathawaymix.orgwrote:

 Tres Seaver wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Garry Saddington wrote:
  Has anyone any suggestions as to how to prevent form submission by the
  using pressing the refresh or back buttons?
 
  Issue a redirect from the POST handler:  the browser won't land again
  on the original POST target URL, but only only on the redirected page,
  or the original form.

 +1, I've been happy with this technique.

 Shane
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-494-0424
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Session bugs around CAS4PAS integration in Plone

2009-12-18 Thread David Bear
since this presents 2 questions -- I would like to ask more about the first
--

of all the CAS pluggins for zope and plone -- which one works best;-)
Actually, since we serve content both directly from Zope AND from plone, I
need one that works with 'both'... in other words, I need something that
works for zope authentication -- as well as plone. Any pointers on which
'single' prooduct package will allow that?

On Fri, Dec 18, 2009 at 7:28 AM, Encolpe Degoute 
encolpe.dego...@quadra-informatique.fr wrote:

 Hello,

 These last months we have a random bug around CAS authentication.

 Preamble:
 CAS plugins are multiple but all are based on CAS4PAS :
  - CAS4PAS
  - Products.CAS4PAS
  - collective.castle
  - collective.cas4plone

 They all doing more or less the same job with different maintainers...
 They are all in the collective but outside
 http://svn.plone.org/svn/collective/PASPlugins/

 Guys, can we try to work together ?
 If you only need rights to upload a release on pypi just ask them, don't
 start a fork.


 Our problem is user can obtain another session opened with CAS when the
 server is overloaded. It happens only one the first page loaded for a
 session and once the user get the session he keeps it  until is logout.

 There is no web cache and Zope serve pages directly to them.
 There is 4 threads and 5000 objects in session cache.

 We suspect a session cache bug but we don't know how to debug it as the
 bug comes randomly when the server is overloaded (more than 5 concurrent
 users).

 Any tips to build a test environment for this ?

 Regards,
 --
 int i;main(){for(;i[]i;++i){--i;}];read('-'-'-',i+++hell\
 o, world!\\n,'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);}
-+- Dishonorable mention, Obfuscated C Code Contest, 1984
Author requested anonymity -+-

 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-494-0424
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope and wxPython interface

2009-08-12 Thread David Bear
What do you gain by doing this?

On Wed, Aug 12, 2009 at 2:50 PM, Lumir Jasiok lumir.jas...@vsb.cz wrote:

 Hi,

 I need to write an application which will be based on MVC design and
 will have both web interface and desktop GUI based on wxPython. It is
 possible to write such an application as standard Zope app and use
 zope.interfaces package for defining wxPython GUI as other view (I hope
 that it's called view, I am not sure - I am new in Zope programming)? Or
 am I totally wrong?

 Best Regards

 Lumir Jasiok

 --
 Lumír Jasiok
 VSB-TU Ostrava - Computer centre
 Tel: +420 59 732 3189
 E-mail: lumir.jas...@vsb.cz
 http://www.vsb.cz


 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Cheap Zope hosting

2009-07-31 Thread David Bear
Check out aclark.net . I have been very pleased with the service and quick
responses to my requests.

On Fri, Jul 31, 2009 at 7:55 AM, Allen Schmidt Sr. 
aschm...@fredericksburg.com wrote:

 Now that HighSpeedRails is closing down at midnight tonight, does anyone
 have any low-cost suggestions for hosting a handful of low-traffic
 domains in a single Zope??
 Thanks
 -Allen

 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] SSL/https

2009-04-13 Thread David Bear
So you are not using apache or IIS to front end zope in order to provide the
ssl/tls transport.

I know there was a project to provide native tls for zope -- but I don't
think you will find that it is wide spread.

You might take a look at http://www.zope.org/Members/lerouxa/zopehttps/infoand
http://sandbox.rulemaker.net/ngps/zope/zssl/

search zope.org basically returns info about m2crypt and using apache to
front end zope.

I think the best supported option will be to front end zope with apache or
iis.

On Mon, Apr 13, 2009 at 7:57 AM, Catherine E. Reinehr 
crein...@huntingdon.edu wrote:

  Right, sorry.  Here you go:



 Zope Version  (Zope 2.6.2 (binary release, python 2.1,
 win32-x86), python 2.1.3, win32)

 Python Version 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32
 bit (Intel)]

 System Platform   win32



 -



 Catherine E. Reinehr

 Webmaster  Director of Publications

 Huntingdon College

 1500 E. Fairview Ave.

 Montgomery, AL 36106

 (334) 833-4429 / Flowers 218B



 *From:* David Bear [mailto:david.b...@asu.edu]
 *Sent:* Thursday, April 09, 2009 7:44 PM
 *To:* crein...@huntingdon.edu
 *Cc:* zope@zope.org
 *Subject:* Re: [Zope] SSL/https



 memories are short. you need to remind us the exact configuration. Are you
 using apache to front end zope?

 On Tue, Apr 7, 2009 at 7:54 AM, Catherine E. Reinehr 
 crein...@huntingdon.edu wrote:

 Good morning,

 You might remember my asking for help last month with generating a CSR and
 installing an SSL certificate.  I did get that done, and now I have a new
 problem.  If I replace http://; with https://; in the address, I get a
 file not found error.  What do I need to do to make sure our application
 for
 admission is secure?  I'm sort of out of my league here.


 Thanks for whatever help you can give me :)
 Cat

 -

 Catherine E. Reinehr
 Webmaster  Director of Publications
 Huntingdon College
 1500 E. Fairview Ave.
 Montgomery, AL 36106
 (334) 833-4429 / Flowers 218B



 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




 --
 David Bear
 College of Public Programs at ASU
 602-464-0424

 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] SSL/https

2009-04-09 Thread David Bear
memories are short. you need to remind us the exact configuration. Are you
using apache to front end zope?

On Tue, Apr 7, 2009 at 7:54 AM, Catherine E. Reinehr 
crein...@huntingdon.edu wrote:

 Good morning,

 You might remember my asking for help last month with generating a CSR and
 installing an SSL certificate.  I did get that done, and now I have a new
 problem.  If I replace http://; with https://; in the address, I get a
 file not found error.  What do I need to do to make sure our application
 for
 admission is secure?  I'm sort of out of my league here.


 Thanks for whatever help you can give me :)
 Cat

 -

 Catherine E. Reinehr
 Webmaster  Director of Publications
 Huntingdon College
 1500 E. Fairview Ave.
 Montgomery, AL 36106
 (334) 833-4429 / Flowers 218B



 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope2 + Twisted

2009-03-05 Thread David Bear
could this be satisficed by putting an apache proxy in front of both zope
and twisted?

On Thu, Mar 5, 2009 at 6:17 AM, Peter Sabaini pe...@sabaini.at wrote:

 I'd like to run a Twisted client in Zope 2.10 (for a legacy app).

 How do I do that? Simply loading twisted.internet is probably not a good
 idea
 since Twisted would not work well with ZServer threads, right?

 One thing I tried was enabling Twisted in zope.conf but that gives me the
 following stacktrace (abbr):

  ...
  File /usr/local/zope/2.10/src/Zope-2.10.7-
 final/lib/python/ZConfig/matcher.py, line 188, in constuct
s = st.datatype(s)
  File /usr/local/zope/2.10/src/Zope-2.10.7-
 final/lib/python/Zope2/Startup/datatypes.py, line 349, in __init__
raise ImportError(You do not have twisted installed.)
 ImportError: You do not have twisted installed.


 I've got Twisted on my Pythonpath though.

 TIA,
 peter.


 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] writing repozo messaging output to a file....

2009-02-05 Thread David Bear
Actuall, std-- redirection does.. mostly.

C:echo this is a test   test.txt

C:type test.txt
this is a test 

C:\echo testing 2   test.txt 21

C:\type test.txt
this is a test 
testing 2 



On Thu, Feb 5, 2009 at 12:00 PM, michael.mi...@gmail.com wrote:

 Hi / Thanks for this. We're on Windows so unix commands won't work...

 On 2/5/09, Thierry Florac thierry.flo...@onf.fr wrote:
  Le jeudi 05 février 2009 à 07:45 -0800, Stephan Richter a écrit :
  On Thursday 05 February 2009, michael nt milne wrote:
   Ran the task and nothing was written to any of the files?
 
  Just specify an absolute path then. You do not have to create the file;
 it
  is
  created for you. Mmh, maybe the output is written stderr, in which case
  this
  would not work, but I am pretty sure that unix shell has an answer for
  that
  too; just read up on it.
 
 
  If messages are written to stderr instead of stdout, then you should
  do :
 
repozo.py [your params] /var/log/repozo.log 21
 
  to have all outputs into specified file.
 
  If you only want to log errors, then :
 
repozo.py [your params]2 /var/log/repozo.log
 
  With hope this helps,
 
Thierry Florac
  --
Chef de projet intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 PARIS Cedex 12
Mél : thierry.flo...@onf.fr
Tél. : +33 01.40.19.59.64
Fax. : +33 01.40.19.59.85
 
  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
 


 --
 michael
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] concerns with nfs

2008-09-30 Thread David Bear
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Since I have started using vmware ESX as a hosting platform for zope,
I've been mostly happy. However, I am wondering if I should have any
concerns with storing the zodb on nfs. All our file systems on ESX are
nfs mounted and lately we have had some interesting issues with the LAN
that nfs runs on. So I'm am wondering if I should be concerned about
storing the zodb on nfs mounted filesystems.

- --
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFI4lSfcjLlygO2EbARAne3AJ9qQg6SZQ9yMQOKnPu38Yg6B/NbggCggnVi
5P0tQ/wxNg7wBZBhAyiuVKQ=
=SD8c
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] script calling template

2008-09-11 Thread David Bear
Thanks to both Paul and AJ -- both suggestions were helpful. The extended
description Paul gave me below was particularly use.

Here's what I learned:
1) the form object is automagically handed to the template when you do a
'return context.mytemplate(item='something')
2) I assumed that I would have to pass the form object to the template --
but this is not needed. More usefull is that when 'item' is given to the
template as parameter, shown above, that the template gets a NEW? namespace
called 'options'.  I think this is new to me.
3) then, within the template the tales expression options/item gives me
'something'.

This really helps me understand better how script and templates work
together. A year from now, I'll need to relearn this again and may google my
answer above...

Thanks to all on the plone list.

On 9/10/08, Paul Winkler [EMAIL PROTECTED] wrote:

 On Wed, Sep 10, 2008 at 07:57:29PM -0700, David Bear wrote:
  I have a script that calls a template.
 
  The template has a tal expressions like this
 
  p tal:content=structure here/ploneDoc/getText /p
 
  I want my script to call the template in such a way that the string
  'ploneDoc' is replaced by a different string.
 

  I'm not sure how to go about parameterizing a tales expressions like
  this.

 It is possible, by sticking a question mark in front of ploneDoc; but
 afaict you can only use a variable already in the namespace,
 i.e. you'd have to define it first.  Like so:

   p tal:define=docname options/ploneDoc
 tal:content=structure here/?docname/getText /p

 But I have literally never seen this obscure feature in real use,
 because nobody seems to know about it (I had forgotten it myself), and
 because it's not necessary. I'd prefer to have the script just pass in
 the object you want, as per this document:
 http://plope.com/Books/2_7Edition/BasicScripting.stx#1-3

 So, in your script, something like:

 doc = context.restrictedTraverse(some_path)
 return context.mytemplate(mydoc=doc)

 Then, in your template just do:

 p tal:content=structure options/mydoc/getText/p



 --

 Paul Winkler
 http://www.slinkp.com
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TAL conditional expression

2008-09-08 Thread David Bear
many thanks. I suppose I did not understand that a request.form object is
given all objects 'requested' even if they are a macro in a template that is
called by another template, or a fill-slot that is satisfied by another
template.

On 9/5/08, Andreas Jung [EMAIL PROTECTED] wrote:



 --On 5. September 2008 13:05:23 -0700 David Bear [EMAIL PROTECTED]
 wrote:

 I would like to test the value of a field entered on a form in a zpt, but
 I'm don't know the syntax

 basically I would like to do something like this

 div tal:condition=request/form/fieldA=1 do this
p metal:use-macro=here/atemplate/macros/may /
 /div


 but this doesn't seem to want to work.


 See

 http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-19


 Also, I would like to be able to use the same request object in both my
 template and the macro, but my macro doesn's seem to have access to the
 same request object.


 This statement is likely wrong since the 'request' is always available -
 and of course there is only 'request' object over the lifetime of a HTTP
 request.

 -aj



 -aj
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )





-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] TAL conditional expression

2008-09-05 Thread David Bear
I would like to test the value of a field entered on a form in a zpt, but
I'm don't know the syntax

basically I would like to do something like this

div tal:condition=request/form/fieldA=1 do this
p metal:use-macro=here/atemplate/macros/may /
/div

but this doesn't seem to want to work.

Also, I would like to be able to use the same request object in both my
template and the macro, but my macro doesn's seem to have access to the same
request object.

-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] pickle passing over a socket

2008-08-22 Thread David Bear
It seems to me that it could be usefull to have a zope method for passing
python pickles to external processes through a unix domain socket. My
thinking was to use this as a means to abstract a data base connection. Yes,
I know there are zsql methods, sqlalchemy and other products to do this. But
my thought was to have a generilzed method for just passing a pickle to an
external process that could do anything with it. Perhaps it could pass a
pickle to a queue that would handle the pickle if the site need
some high volume handling of data.

Then one could have another python process listening on the socket -- ready
to receive pickles for zope.

Does this sound like something that could be usefull -- or is it reduntant
with some other feature that zope may have for sending data to external
processes?

-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] pickle passing over a socket

2008-08-22 Thread David Bear
On 8/22/08, Andreas Jung [EMAIL PROTECTED] wrote:



 --On 22. August 2008 09:33:21 -0700 David Bear [EMAIL PROTECTED] wrote:

 It seems to me that it could be usefull to have a zope method for passing
 python pickles to external processes through a unix domain socket. My
 thinking was to use this as a means to abstract a data base connection.
 Yes, I know there are zsql methods, sqlalchemy and other products to do
 this. But my thought was to have a generilzed method for just passing a
 pickle to an external process that could do anything with it. Perhaps it
 could pass a pickle to a queue that would handle the pickle if the site
 need
 some high volume handling of data.


 Ever heard of XMLRPC? Sorry, your idea sounds like a bit like
 broken-by-design or like I-have-never-heard--anything-of-higher-protocols.


You are correct, there are higher level protocols. However, since I was only
thinking of using python processes, I thought I could simplify the whole
design by just passing pickles. No need to parse an xml object, use fast
cpickle module.


-aj




-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] products in client instances

2008-08-19 Thread David Bear
If I have zeo and 3 clients (client1, client2, client2) its seems that it
would be convenient to have the Products directory be a symlink to a master
products directory.

Is there any reason not to do this?

Or, is there a 'super directory' where all products can be installed for all
zeo clients already?

-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] first attempt to use RELSTORAGE

2008-05-09 Thread David Bear
, TemplateDict,
render_blocks, str
 File /servers/webenv1/lib/python/DocumentTemplate/DT_Util.py, line 67, in
?
   from ZPublisher.TaintedString import TaintedString
 File /servers/webenv1/lib/python/ZPublisher/__init__.py, line 24, in ?
   from Publish import publish_module, Retry
 File /servers/webenv1/lib/python/ZPublisher/Publish.py, line 24, in ?
   from zope.app.publication.browser import setDefaultSkin
 File /servers/webenv1/lib/python/zope/app/publication/browser.py, line
33, in ?
   from zope.app.publication.http import BaseHTTPPublication
 File /servers/webenv1/lib/python/zope/app/publication/http.py, line 27,
in ?
   from zope.app.publication.zopepublication import ZopePublication
 File /servers/webenv1/lib/python/zope/app/publication/zopepublication.py,
line 46, in ?
   from zope.app.security.principalregistry import principalRegistry as
prin_reg
 File /servers/webenv1/lib/python/zope/app/security/principalregistry.py,
line 20, in ?
   from zope.app.authentication.interfaces import IPasswordManager
 File /servers/webenv1/lib/python/zope/app/authentication/__init__.py,
line 20, in ?
   from zope.app.authentication.authentication import
PluggableAuthentication
 File
/servers/webenv1/lib/python/zope/app/authentication/authentication.py,
line 25, in ?
   from zope.app.component.site import SiteManagementFolder
 File /servers/webenv1/lib/python/zope/app/component/site.py, line 35, in
?
   from zope.app.component import adapter
 File /servers/webenv1/lib/python/zope/app/component/adapter.py, line 28,
in ?
   class LocalSurrogate(zope.interface.adapter.Surrogate):
AttributeError: 'module' object has no attribute 'Surrogate'


for more information, there is another zope instance running on this machine
however there is only 1 zope_home. Furthermore, what I couldn't discern from
the install instructions for relstorage was configuration for postgresql.
Since the instructions were silent, I assumed I at least needed a pg user
for zope to connect as, and a database to contain the zodb. So I created
these in pg so the dsn in zope.conf would at least have something valid to
connect to.

Any adivce?

I think I will need to back out of what easy_install did to my pythonhome --
is there an easy way to undo what easy_install did ?


-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zeo configuration HOWTO

2008-04-22 Thread David Bear
I'm trying to find more documentation about all the configuration parameters
for a zeo.conf

Namely, I have a zope with multiple zodb's and mount points. I am trying to
learn how to migration a single zope instance with multiple mounts into zeo.
One thing I don't understand is temporary storage. If I have

zodb_db temporary
# Temporary storage database (for sessions)
temporarystorage
  name temporary storage for sessioning
/temporarystorage
mount-point /temp_folder
container-class Products.TemporaryFolder.TemporaryContainer
/zodb_db

in zope.conf -- how do and transfer that into zeo.conf and modify the
zope.conf to properly understand.

specifically, do I put 'container-class' in zeo.conf ?

Also, in zope.conf what do 'server', 'storage', 'name', and 'client' map to
in zeo.conf? There must be a more detail descriptions of how to configure
zeo somewhere.

-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] simple use case for rotating images

2008-04-16 Thread David Bear
We are finding that flash is used to generate simple slide shows. I'm
thinking it would be 'better' to use an ajax like method and zope to serve
up a set of standard images. Anyone know of examples? I completely new to
ajax and have looked at a few ajax libraries. So far they all see overkill
for what I want.

-- 
David Bear
College of Public Programs at ASU
602-464-0424
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] merging zodb's

2008-04-01 Thread David Bear
I have a zodb from a dead zope instance that I wanted to merge in to another 
running zope. I thought I could use a mount point to do this and just specify 
the old zodb for the storage in my mount point. 

alas, this did not work as expect. After making the modification in my 
zope.conf like this:

zodb_db support 
# ssw file store
filestorage
  path $INSTANCE/var/srvx-Data.fs
/filestorage
mount-point /support
/zodb_db

And then restarting zope and adding the mount point -- I see nothing 
underneath it.

So, I assume this is NOT a valid way to merge to zodb's together? 

Does anyone have an suggestions on a way I might combine 2 zodb's?


-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] step by step going from single zope to zeo

2008-04-01 Thread David Bear
Are there any step by step guidelines for how to modify a current single 
instance zope into a zeo configuration? I have a single zope instance. That 
zope.conf define two mount points for multiple zodb's. I would like to take 
that single instance and turn it in to a zeo server, with to zeo clients.

Are they any recent howto's on this?

-- 
David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] running in debug mode

2008-03-26 Thread David Bear
Is it possible to have one zeo client running in debug mode while another is 
not? It seems that it should be the way most people would make a development 
environment. One zeo is running in standard mode so you could see how the 
site performs -- while the other zeo is running in debug mode so you can do 
file system development.


-- 
David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] running in debug mode

2008-03-26 Thread David Bear
On Wednesday 26 March 2008 08:16, Tino Wildenhain wrote:
 David Bear wrote:
  Is it possible to have one zeo client running in debug mode while another
  is not? It seems that it should be the way most people would make a
  development environment. One zeo is running in standard mode so you could
  see how the site performs -- while the other zeo is running in debug mode
  so you can do file system development.

 Yes of course it is. And why didn't you just try it out?


because I don't know what I don't know. I could try it yes. But there are a 
lot more have already have and could have commented upon use cases that 
introduce problems that I would not have considered.

yes, we can always try things out and relearn what hundreds of others have 
already learned. But then, the collective wisdom of hundreds will always be 
better than my own experience.. Thanks for all the comments.

 T.

-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] catching exceptions in zpt

2008-03-10 Thread David Bear
I'm trying to do something like this in a zpt

meta tal:define=global target python:here.mysript(request.target) | 
nothing /

however, if my request did not have ?target=blah I get an attributeError 
because of course the request has not parameter called target. I assumed that 
the pipe 'or nothing' would handle an equivalent except AttributeError block 
but it doesnt.

how can I put in my zpt a way to catch if request has no attribute?

-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] getting at url parameters in zpt

2008-03-07 Thread David Bear
If I have a zpt called 'stuff' and I call it from a web browser with a url 
like this 

http://myzopeserver.com/stuff?item1=x?item2=y

how do I get at the item1 and item2 parameters?
-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] python script returning a 'rendered' zpt

2008-03-06 Thread David Bear
I need to right a script that will return a zpt. However, I need the script to 
feed the zpt some values and then have zope returned the rendered zpt.

I hope this is possible.

For example, lets say I have something like this in a zpt

div tal:contents=somevariable blah /div

My python script with have something like this:

somevariable = this is a test

How can I get the script to returned the 'rendered' zpt?

-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python script returning a 'rendered' zpt

2008-03-06 Thread David Bear
On Thursday 06 March 2008 18:04, Peter Bengtsson wrote:
 rendered_html = context.some_page_template(context, somevariable='foobar')
 But then you need to write the page template as:
 div tal:contents=options/somevariable blah /div

This is almost what I need. However, I can't use 'context.somepage' in the 
script becuase I don't know what somepage will be. I was hoping to be able to 
call the script on any arbitrary zpt like this:

/zope/somepagetemplate/myscript?target=something

Then 'myscript' will grab the value of target and returned 'somepagetemplate' 
where the value of somevariable was replaced with 'something'


 On 07/03/2008, David Bear [EMAIL PROTECTED] wrote:
  I need to right a script that will return a zpt. However, I need the
  script to feed the zpt some values and then have zope returned the
  rendered zpt.
 
   I hope this is possible.
 
   For example, lets say I have something like this in a zpt
 
   div tal:contents=somevariable blah /div
 
   My python script with have something like this:
 
   somevariable = this is a test
 
   How can I get the script to returned the 'rendered' zpt?
 
   --
 
   David Bear
   College of Public Programs/ASU
   411 N Central, Phoenix, AZ 85004
   ___
   Zope maillist  -  Zope@zope.org
   http://mail.zope.org/mailman/listinfo/zope
   **   No cross posts or HTML encoding!  **
   (Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

-- 

David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] suddenly confused

2008-01-22 Thread David Bear
On Fri, Jan 18, 2008 at 08:06:13PM -0500, Jim Washington wrote:
 David Bear wrote:
  I'm doing my first zeo setup, and suddenly I'm not sure about my
  products directory. Do I put all products in a products directory of
  the zeo server or in each zope instance?
 

 IIRC, Products go in each zope instance.  The zeo instance gets the ZODB.

okay. This is the way I thought it worked. Thanks.

 
 -Jim Washington

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] suddenly confused

2008-01-18 Thread David Bear
I'm doing my first zeo setup, and suddenly I'm not sure about my
products directory. Do I put all products in a products directory of
the zeo server or in each zope instance?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] compile time optimizations for python

2008-01-18 Thread David Bear
are there any compile time optimizations for python that would also
help optimize zope? shared libraries? threads? 


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] compile time optimizations for python

2008-01-18 Thread David Bear
On Fri, Jan 18, 2008 at 06:25:29PM +0100, Andreas Jung wrote:
 
 
 --On 18. Januar 2008 10:21:33 -0700 David Bear [EMAIL PROTECTED] wrote:
 
 are there any compile time optimizations for python that would also
 help optimize zope?
 
 Not really. Why do you ask? What is slow? What appears as slow?

I'm putting zope/plone on a virtual machine and I would like to
optimize for memory consumption if possible. I don't know how rapidly
the hosting service I'm using could add ram to the vm. 

 
 -aj



-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] lambda's in external methods

2008-01-15 Thread David Bear
In the zope 2.7 book it mentions that an optimization technique for
external methods is to compile regular expressions in global scope to
the module. The re's will then be compiled at zope load time.

I am wondering if the same holds for lambdas. I created some simple
filters using lambdas. I defined them in the functions where I use
them. Is there any advantage to defining them globally to the module?

Are there any gottcha's with globally scope objects?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Defining a Variable

2008-01-04 Thread David Bear
On Wed, Jan 02, 2008 at 02:44:24PM -0400, Victor Subervi wrote:
 Hi;
 I have this in a page template:
 
 html
 body
 table
  tr
   td tal:define=num python:here.scripts.getQuote
span metal:use-macro=here/en-us/quotes/?num/macros/quote /br /
div align=center
 span class=text
  a href=quotes.pt target=_topbThe quotes/b/a
 /span
/div
   /td
  /tr
 /table
 /body
 html
 
 Now, I thought that was the correct way to call the variable num (that is,
 with the question mark: ?num). Apparently, I'm mistaken. I've even tried
 defining it this way:

I didn't see a followup on this post, so I thought I would add my
ignorance to the discussion.

first, I don't think you can assign a variable name to a python
function using tal and then have tal 'call' the function.

second, I think what you do want is the get the results of calling
getQuote into the variable called 'num', and then use those results
elsewhere.

I think tal variables can all be first class python objects. If not,
any standard python object works -- in other words, a list, tupple,
string, dictionary, etc. If you have your own object, it will need to
have an iterator method defined for it -- but then, I wouldn't know
how to make the new class known to zope.


 
   td tal:define=num python:str(11)
 to make sure that num was properly assigned. What am I missing? Also, if I
 have a dir called scripts in which getQuote exists, and scirpts is in
 the path, shouldn't that notation work okay?

acquisition will find many things. What does getQuote return though?

 TIA,
 Victor

 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] looking for an easier way

2008-01-02 Thread David Bear
I'm writing an exteranl method to store data into a sql data base. In my
first attempts to do this I just had an external method dump whatever
zope gave it to a text file, then looked. I came up with the following
to split up the data the zope handed the external method and store it
an sql. This works. However, I'm thinking there must be an easier way
to capture what zope hands and external method.

Here's what I'm using now:

def ddmapper(data):
''' maps dictionary keys and vals handed from zope to
dictionary keys and vals which are attribute names of the table use to 
store the data
puts a pickle of all data into a zo -- zopeobject
nonce is a uniquifier
'''
now = DT.now()
pbuf = sio.StringIO()
pickle.dump(data, pbuf)
nonce = '%s:%s:%s:%s' % (now.year, now.month, now.day, now.second)
attribs = dict(fname=data['first-name'],
   lname=data['last-name'],
   email=data['email-address'],
   studentid=data['student-id-number'],
   accomodations=data['will-special-assistance-be-required'],
   describe=data['describe-special-accomodations-needed'],
   degree=data['degree'][0],
   number=data['number-attending'],
   key=nonce,
   zo=pbuf.getvalue()
   )
del(pbuf)
del(now)
return attribs


There must be an easier way to 'know' what zope is giving me and grab
the correct dictionary that has the form data in it. anyone have any
pointers?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] urlparse equivalent

2007-12-14 Thread David Bear
I wanted to use urlparse to handle manage some url rewrites but it's
not importable.. Is there any zope functional equivelent that I can
use to parse urls?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] urlparse equivalent

2007-12-14 Thread David Bear
On Fri, Dec 14, 2007 at 09:16:54PM +, [EMAIL PROTECTED] wrote:
 there isn't but you can write an External Method in pure python.
 
 On 14/12/2007, David Bear [EMAIL PROTECTED] wrote:
  I wanted to use urlparse to handle manage some url rewrites but it's
  not importable.. Is there any zope functional equivelent that I can
  use to parse urls?

Thanks for all the responses.

I'm a little suprised that there isn't anything like urlparse
functionaly in zope. I would think parsing urls would be a fairly
common chore. Which leads me to think that I may be thinking
completely wrong about what I want to accomplish.

Perhaps I can get closer to what I want if I better understand the
names 'here' and 'context'.  I am writing a python script and I want
to get the path to where the script lives -- not from where it was
called. But I don't see that 'here' is a name available to script.
Yet, 'context' doesn't seem to do what I want.

what is the easiest way to get the path to where a script lives?


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] storing python objects

2007-10-25 Thread David Bear
I need to run an external method to use some python functions that are
restricted within zope. I'm thinking an easy way to get the data back
would be to just store basic python objects within zodb; tupples,
lists, dictionaries.

but I've never seen this documented anywhere. Is it possible to store
basic python objects directly in zodb? AND then use a zpt to read the
data?

I'm thinking a simple thing would be to create an external method that
returns a dictionary.

Then I could have script call the method, and stored the dictionary on
zodb.

Then have a zpt publish the dictionary.

Is this even easily possible, or are there alternatives to doing
something similar?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] cas for zope and plone

2007-10-08 Thread David Bear
I am interesting in integrating cas into my zope and plone sites.

I am assuming that cas authentication works fine when zope is proxied
behind apache. I thought I better verify that it did though before
going to much farther.

Is cas for zope working? Does it work when zope is proxied by apache?
Are there additional issues for getting cas to work with plone?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] tunneling via ...

2007-09-28 Thread David Bear
I am in a situation will I may soon need to outsource the running of
my apache server. This may be a good thing. However, I cannot
outsource the running of my zope server. So I have the situation where
apache will be running on a separate box from my zope server and I am
wondering how to make sure I have a secure connection between the
apache server that I don't control that will be using modproxy/rewrite
rules to get content out of my zope server.

Currently, zope only binds to 127.0.0.1 and apacy proxy connects.

Using a remote apache server implies that I will need to have zope
listen on a public interface. However, I will still need to secure it
so I was considering openssl or something like that.

in short I have 

APACHE HOST  -- ZOPE HOST

I need to secure the connection between these two hosts.

Any recommendations?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] handling exceptions for external methods

2007-07-06 Thread David Bear
I've begun using external methods and am trying to better understand the
context they run and and how to handle exceptions. I have concluded
the following (and I don't recall reading some of these in any documentation)
(please correct me if I'm wrong)

1 external methods run in the same interpreter as zope

2 external methods have access to a larger namespace and therefor more
functionality

3 external methods inherit the same namespace available to scripts
running inside zope 

4 external methods are not launched as forked or spawned child
processes

5 external methods do not have access to stdin/stdout 

6 external methods must return only strings, but they may be unicode
string as long as they are valid xml string data

Something that I don't understand is how to handle an exception. For
example, if I have an external method that appends data to the end of
a file, if there is an IOException how to I capture it and send a
message back to zope with something informative?


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] getting a unique object id

2007-03-29 Thread David Bear
I am needing to write an external cache mechanism for rss feeds from
zope/plone.

My thinking was to use feedparser, then grab the set of object
attributes for the item from zope. Then, grab the actual document the
feed pointed to and save it. When naming the document that I store
locally, I was looking for a simple way to map the zope objectId to
the file name hoping it would be unique. However, if this is not
unique, is there another attribute from a zope object that I can get
that would be? If so, how would I get it?


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ColdFusion, ASP, etc with Zope/Plone

2007-01-25 Thread David Bear
On Thu, Jan 25, 2007 at 05:31:28AM -0800, Murdock wrote:
 
 Thanks for the suggestion, I went to that site and I see that it only works
 on Unix-Like servers. I don't have any of those available in my environment.

you could run vmware and put a linux instance there.

 
 
 
 Jaroslav Lukesh wrote:
  
  - Original Message - 
  From: Murdock [EMAIL PROTECTED]
  I am implementing a new site using Zope/Plone. This site replaces an old 
  one
  built in ColdFusion. The problem that I am having is that a portion of
  our
  site (Our customer login area) will need to remain on ColdFusion for a
  while.
 
  Is their a method to get most things to Zope/Plone but certain folders to 
  go
  to ColdFusion.
 
  Example:
  http://www.domain.com/Customer should go to ColdFusion and actual files
  on
  the server
  everything else at http://www.domain.com should feed into Zope
  
  Use reverse proxy www.apsis.ch/pound
  
  Use directive
  
  UrlGroup Customer.*
  HeadRequire Host www.domain.com.*
  BackEnd IP#_addr_coldfusion,port#_coldfusion,1
  EndGroup
  
  
  ___
  Zope maillist  -  Zope@zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/ColdFusion%2C-ASP%2C-etc-with-Zope-Plone-tf3084565.html#a8614876
 Sent from the Zope - General mailing list archive at Nabble.com.
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] tal conditional help

2006-12-12 Thread David Bear
I have a page template that div tag to insert another template.
currently I do

div content=structure here/form.pt
  form template
 /div

I rely on the form.pt object to exist in the folder where the template
is called from. This works okay. However, I think it would be wise to
put some kind of error checking in the tal to avoid sending some kind
of exception to the browser.

what I think would be the correct thing is to test if form.pt exists,
if not do insert nothing, otherwise insert it as above.

However I can't seem to locate any tal syntax that lets me do this.

I found tal:condition but haven't found any examples of using a
'exists' type of condition.

Any pointers?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] if object does not exist in python

2006-12-12 Thread David Bear
Can anyone show me code examples of a script that checks for the
existences of a named object?


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: adding a python library

2006-11-14 Thread David Bear
On Mon, Nov 13, 2006 at 08:32:11PM -0500, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 David Bear wrote:
  I would like to add Mark Pilgrims feedparser to the available modules
  that I can use in zope. I have installed the feedparser into the
  python instance that zope uses. However, when I attempt to import it,
  I get an error that I'm not authorized. How might I make the
  feedparser available to zope?
 
 Check the examples in
 $SOFTWARE_HOME/lib/python/Products/PythonScripts/module_access_examples.py
 

Thanks. This seems straightforward. However, I am now rethinking this.

What if I created a zope script and just pasted the feedparser.py
modules contents into it. Do python scripts that live inside zodb
become importatable?

 
 Tres.
 - --
 ===
 Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
 Palladion Software   Excellence by Designhttp://palladion.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.2.2 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFFWRyb+gerLs4ltQ4RAkJYAKCOkGX3CKz+aNTvhtRTHdk8FAzPlgCgkk29
 xt7g8f92Lo6zOjLG4w/yYH4=
 =71Qs
 -END PGP SIGNATURE-
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: adding a python library

2006-11-14 Thread David Bear
On Tue, Nov 14, 2006 at 05:50:36PM +0100, Andreas Jung wrote:
 
 
 --On 14. November 2006 09:32:38 -0700 David Bear [EMAIL PROTECTED] wrote:
 
 
 What if I created a zope script and just pasted the feedparser.py
 modules contents into it.
 
 That would be a stupid idea.
 
 Do python scripts that live inside zodb
 become importatable?
 
 Zope PythonScripts are *objects* that are callable through acquisition.

thanks for all the replies.

I am now looking at the modules feedparser imports. These include

sgmllib
re
sys
copy
urlparse
time
rfc822
types
cgi
urllib
urllib2
cStringIO
xml.sax

It seems that sys would be a bad one to allow zope to import.

Are there others in this list that I should not allow?


 
 -aj



 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope replacement for sys module

2006-11-14 Thread David Bear
I wonder if there is a zope replacement for the sys module?

It would be wonderfully easy if I could

import zopesys as sys

Then, the zopesys module could mape stderr, stdin, stdout to safe zope
equivelents.

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: adding a python library

2006-11-14 Thread David Bear
On Tue, Nov 14, 2006 at 07:12:51PM +0100, Andreas Jung wrote:
 
 
 --On 14. November 2006 10:52:31 -0700 David Bear [EMAIL PROTECTED] wrote:
 
 I am now looking at the modules feedparser imports. These include
 
 sgmllib
 re
 sys
 copy
 urlparse
 time
 rfc822
 types
 cgi
 urllib
 urllib2
 cStringIO
 xml.sax
 
 
 
 What are you trying to accomplish? Put your code into an external method 
 which is unrestricted (*hint*: look at the Zope Book 2.7 edition).

excellent. I think this is really what I wanted to do.

 
 -aj



 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] adding a python library

2006-11-13 Thread David Bear
I would like to add Mark Pilgrims feedparser to the available modules
that I can use in zope. I have installed the feedparser into the
python instance that zope uses. However, when I attempt to import it,
I get an error that I'm not authorized. How might I make the
feedparser available to zope?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] which operating system quandry

2006-09-29 Thread David Bear
I know it has been asked many times which os is best for zope, I have
yet to see a 'system administration perspective' in the discussion. By
this I mean which os seems to have the most worry free administration
of a zope instances. I have installed zope on both FreeBSD and various
linucies and here is what I have observed:

1) Freebsd ports collection is an easy way to install zope -- the
ports maintainer takes care of making the build files to handle all the
zope dependencies including python versions, libraries, etc. However,
I have yet to use portupgrade to apply security patches to zope
instances running on freebsd. Does anyone know of using cvsupdate for
getting security patches works over the ports collection of zope
smoothly?

2) I've run zope on Red Hat and Suse linux. In both cases I found that
I needed to install a different version of python than the one
packaged with the distro becuase Zope had specific dependencies for
new versions python. Applying patches to zope is manual. It has always been very
inconvenient to build python and PIL in a separate run instances for
zope. This seems like a major pain in the ...

3) I have never run zope on windows except for test versions of
plone that were loaded through binary installers -- completely 
packaged with python and zope. While this is convenient, I don't
know if I want to run a windows server for any publicly accessible site. 

4) I am very interested to know how others manage zope sites. Are
there any best practices? Are there any linux distributions that are
more kind to zope than others -- meaning they don't have dependencies
on old python versions, or they have a very good patch system (debian
apt updates for zope??)


-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] idiotic dreamweaver question

2006-09-20 Thread David Bear
Sorry to bug this list with a dw question. However, I was using DAV
in dw and found that dw is unable to handle file extensions like .pt,
.zpt, _html , etc.

Does anyone else use dreamweaver to edit zope/plone files? If so, how
do you make dreamweaver edit this types of files? I know _html, .pt,
.zpt etc are well formed xhtml -- but I don't know how to tell stupid
dw to edit them since it uses the extension to recognize file type.

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] easier way with zpt

2006-09-19 Thread David Bear
I wanted to randomly pick a an image from an images folder and insert
it into my page. So I created a python script the return a random
selection from the images folder. 

Then, in my zpt I did

span tal:define=global slot1 container/getimageR1  
  !-- slot one item --
/span

Later in in the img tag I wanted to to do

img tal:attributes=src slot1 

however I found that slot1 was not giving me the full path to the
images folder. So I went back and did this:

span tal:define=slot1 container/getimageR1  
  !-- slot one item --
  span tal:define=global s1 python:'random1/'+slot1.getId()/span
/span

in order to get the object to have the full url. 

It just seems there should be a better way. Anyone have a suggestion?

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope and sakai comparison

2006-09-11 Thread David Bear
On Sun, Sep 10, 2006 at 10:06:33AM +0930, David Lloyd wrote:
 
 Sacscha,
 
 Our university has dump a lot of money into sakai. I don't know
 anything about it but I wonder if someone has compared sakai with
 zope?
 
 I don't know Sakai either, but a 30 seconds look at http://sakaiproject.org
 makes me belive that you are compaing apples and oranges. Nowhere does
 that website say that Sakai is an application server - which is what
 Zope is.
 
 Sakai is a tool supported by many academic institutions (generally of 
 the University Level) to manage course, participants, teaches and 
 resources required to support that [eg. assessment tools, collaboration 
 tools].
 
 As you say, it is -not- an application server and in fact runs inside a 
 Java application server itself (its demo runs against tomcat but I'm led 
 to believe any Java compliant servlet container will run it).
 
 A better question for David to answer might be: why do you want to 
 compare Sakai with anything else, what is the actual reason for the 
 question?

yes. there is an agenda.

Our university dumps a lot of money and resources in to sakai.  I
wanted to understand why.

I think the reason is that there is a general terror of doing
something other than something based on java. So, I wanted to know if
there was a comparison of things provided by sakai and things provided
by zope.

It seems that terminology is the problem. I the alphabet soup of
termonology used to describe things really says very little about the
environment. What is an application server? What does it mean to
'support java'? What does it mean to say this is xml based? 

These are the kinds of things that really hide important operational
details about the environments they describe. 

sorry if this is not very clear. 


 
 If we know that, we might be able to find a comparable apple running 
 on Zope, or for that matter using any of the various web-based 
 frameworks that abound.

so, sakai might be said to be a bundle of java products, much like
plone might be said to be a bundle of zope products (not being strict
as the what 'product' means; ie plone is cmf and zope and  etc. )?


 
 DSL

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope and sakai comparison

2006-09-08 Thread David Bear
Our university has dump a lot of money into sakai. I don't know
anything about it but I wonder if someone has compared sakai with
zope?



-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] tal assignment

2006-09-07 Thread David Bear
I wanted to assign a list object to a tal global variable but I can't
seem to find the correct syntax. I tried:

div tal:define=global mylist=['item1', 'item2'] 
 tal:content=
 blah
/div

but it doesn't like that syntax. Googling turns up thousands of items
that deal with tal but I can't see a simple example of assigning a
list object to a variable name.

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] multiple rewrite rules in apache

2006-08-15 Thread David Bear
On Tue, Aug 15, 2006 at 08:56:39PM +0200, Dieter Maurer wrote:
 David Bear wrote at 2006-8-14 14:06 -0700:
 I have apache serving multiple ip based virtual hosts. When I went
 into one of the virtual hosts to put the rewrite rule, they failed. I
 used the zope witch at betabug to generate them. However, I am
 wondering if the rewrite rules need to appear elsewhere in the apache
 config file.
 
 The rewrite rule is well in the virtual host sections.

ok.

 
 You have there the RewriteEngine on as well?
 

yes. I assume RewriteEngine is a global setting. I already have a set
of rewrite rules working that reach the top level of my zope site. I
wanted a set of rules that would redirect requests further down the
hierarchy. For example, I have two ip based vhosts called
site1.asu.edu and site2.asu.edu. 

I have an existing rule that works for rewriting site1.asu.edu/zi1
into the root of my zope site. I want another rule that would work for
site2.asu.edu/portal that would go to a folder in my zope server
called site2.asu.edu.

 In what way did the rewrite rule fail?

It never seemed to 'fire'.. When accessing the url that should have
been rewritten zope returned a 404 error.

 You know about the possibility to log rewrite rule activity?
 

I've looked in the rewrite log. I'm not sure how to read the messages
there. Should I post some of them?

 
 
 -- 
 Dieter
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] multiple rewrite rules in apache

2006-08-14 Thread David Bear
I have apache serving multiple ip based virtual hosts. When I went
into one of the virtual hosts to put the rewrite rule, they failed. I
used the zope witch at betabug to generate them. However, I am
wondering if the rewrite rules need to appear elsewhere in the apache
config file. I recall reading somewhere that the order of the rewrite
rules is important.

Does anyone know of any documentation on debuging apache rewrite
rules?
-- 
David Bear
phone:  602-496-0424
fax:602-496-0955
College of Public Programs/ASU
University Center Rm 622
411 N Central
Phoenix, AZ 85007-0685
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] apache rewrite rules redux

2006-05-25 Thread David Bear
I went back to betabug and reran the rule generator. I was able to use
the rules for http connections... but not for https connection.

I thought the two rules might be conflicting some how so I commented
out the rules for http connections and the https connections still
don't work, ie I still get the 404 error.

Here is what I have now.

# see http://betabug.ch/zope/witch
# RewriteRule ^/z2$ \
# http://127.0.0.1:9080/VirtualHostBase/\
# http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

# RewriteRule ^/z2/(.*) \
# http://127.0.0.1:9080/VirtualHostBase/\
# http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]

#
RewriteRule ^/z2$ \
http://127.0.0.1:9080/VirtualHostBase/\
https/%{SERVER_NAME}:443/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) \
http://127.0.0.1:9080/VirtualHostBase/\
https/%{SERVER_NAME}:443/VirtualHostRoot/_vh_z2/$1 [L,P]

I can uncomment the http rules and they work. But whats the point
of using apache if I can get it to do https? (aside from legacy files
and other apps that depend on it...)

There must be a better way..
On 5/25/06, Sascha Welter [EMAIL PROTECTED] wrote:
(Wed, May 24, 2006 at 12:00:09PM -0400) [EMAIL PROTECTED] wrote/schrieb/egrapse: From: David Bear [EMAIL PROTECTED]
 # see http://betabug.ch/zope/witch RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\
 https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P] RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\ https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]

^^Just telling the witch to use https isn't enough, you have to tell itthe port too (usually 443).This isn't the most obvious thing from th form, but it should be a clueethat the port doesn't change when you select https.
 I also found the following rule from scanning through zope-list postings, to force any logon authentication requests to go over https. However, since the above rules fail, the following does nothing.
 RewriteRule ^/login_form(.*) https://%{SERVER_NAME}/login_form$1 [NE,L]This is a redirect and once your https-rewriterule works, it should too. From: Chris Withers 
[EMAIL PROTECTED] In both cases, I see no need for two rules, just the one should suffice: RewriteRule ^/z2(.*) http://127.0.0.1:9080/VirtualHostBase/\
 http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2$1 [L,P]Yes, that will work too, unless of course you happen to have a URL thatgoes something like 
http://www.host.tld/z2thisisnotzope/index.html and apachewill happily rewrite it for you, resulting in a 404.The two rules of the witch could likely be rewritten to one, but tworules cover the two possibilities easy in a form that humans can grasp:
Either the URL ends there, or else it has a slash and then as much asthere is.Regards,Sascha___Zope maillist-
Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding!**(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- 
David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] apache rewrite rules redux

2006-05-23 Thread David Bear
the more I try to get this to work, the less I understand. Sorry to bug these groups again, but I still need a little help.

I would like my zope content (and plone) available to both http adn
https urls. I went to betabug/zope/witch and was able to generate the
following rule sets.

# see http://betabug.ch/zope/witch
RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\
https/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\
https/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]

RewriteRule ^/z2$ http://127.0.0.1:9080/VirtualHostBase/\
http/%SERVER_NAME}:80/VirtualHostRoot/_vh_z2/ [L,P]

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/\
http/%{SERVER_NAME}:80/VirtualHostRoot/_vh_z2/$1 [L,P]

The rules listed above only work to serve content from
http://servername/z2 .. They refuse to work for https://servername/z2
(that generates a not found error)

Any other advice on make both urls work?

I also found the following rule from scanning through zope-list
postings, to force any logon authentication requests to go over https.
However, since the above rules fail, the following does nothing.

RewriteRule ^/login_form(.*) https://%{SERVER_NAME}/login_form$1 [NE,L]
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] versioning application

2006-05-11 Thread David Bear
I am wondering if anyone is using zope as versioning repository. We
have a group of researchers that need some kind of version control
system. The need to control versions of data sets, and office documents.

I was wondering if anyone had implemented some a version control system
in zope, cmf, or plone -- and was using webDAV to access the files. -- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] cooked body??

2006-05-10 Thread David Bear
I'm attempting to use a zpt to read/render an html file. Just using something like 

div tal:content=here/htmlfolder/file.html stufff /div

puts the 'escaped' contents of the file.html in the div section. I seem
to remember something about cooked body or uncooked to get the
non-rendered contents of the html file.

any pointers?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] rss aggregator

2006-05-10 Thread David Bear
I would like to have an rss aggretator in zope. My thinking is to have
a plone site be a feed to an rss aggregator. Plone would run on a
separate box so I can control it better. Does this sound wierd? If not,
anyone know of an rss aggregator zope product?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] apache rewrite rules brake plone/zope

2006-05-02 Thread David Bear
I have the following rewrite rules for apache. The intent is all urls
that have http://myhost/z2 in them will be redirected/rewritten by
apache to the zope instance running on local host.

RewriteRule ^/z2/(.*) http://127.0.0.1:9080/VirtualHostBase/http/%{HTTP_HOST}:80
/VirtualHostRoot/$1 [L,P]

RewriteRule ^/z2dav/(.*) http://127.0.0.1:9081/VirtualHostBase/https/%{HTTP_HOST
}:443/VirtualHostRoot/$1 [L,P]

RewriteRule ^/login_form(.*) https://%{HTTP_HOST}/login_form$1 [NE,L]
There is something that I've left out becuase any
attempts to view the plone site through apache are 'messed up', ie the
graphics, fonts, style sheets, etc, are not included in the web page.
Only some of the content in rendered in the browser. However, when I
open the url http://127.0.0.1:9080/ the zope and plone site all works.

any hints on a rule I've left out?
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] rss republishing

2006-04-17 Thread David Bear
I have a plone intranet site running on box A. I have a public web
server, running apache on box B. I would like to have a plone topic
published as an rss feed, which Box B republishes for clients. I don't
want the clients to know the pages originate on box A. I would like
them to appear from box b -- and even cached for a period of time. Are
there any zope products that might help with these? or an apache module
if there apache experts here. I might even entertain an mod-python
module if something like it existed.
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] python 2.4.3

2006-04-03 Thread David Bear
Since python 2.4.3 has just been released, are there any
comments/recommendatiosn about running zope 2.9.2 with that version?
The zope site and installed docs recommend python 2.4.2, but it appears
the 2.4.3 is a nice bug fix release. it would be nice to be able to use
it.
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] errors building zope 3

2006-03-16 Thread David Bear
I have python 2.4.2 installed on freebsd. It is located at /home/webenv/bin/python2.4.

I set my pythonpath to /home/webenv/lib/python2.4

Python works.

Then I downloaded and built zope 3 with make sure to use -with-python and -prefix /home/z3.

I run make then make test and get a lot of :

Error in test testNOK (ZEO.tests.testAuth.PlainTextAuth)
Traceback (most recent call last):
 File /home/webenv/lib/python2.4/unittest.py, line 270, in run
 self.tearDown()
 File
/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/testAuth.py,
line 54, in tearDown
 self.__super_tearDown()
 File
/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/ConnectionTests.py,
line 118, in tearDown
 forker.shutdown_zeo_server(adminaddr)
 File
/home/iddwb/installs/Zope-3.2.0/build/lib.freebsd-4.10-RELEASE-p2-i386-2.4/ZEO/tests/forker.py,
line 180, in shutdown_zeo_server
 s.connect(adminaddr)
 File string, line 1, in connect
error: (60, 'Operation timed out')


The errors are all 'operation timed out'.

this happens when I run make test as root as well.

any pointers?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] import error

2006-01-11 Thread David Bear
Will attempting to import a zexp file (and exported plone site) I get the following error:

2006-01-11T09:44:03 ERROR(200) SiteError http://127.0.0.1:8180/do2/manage_importObject
Traceback (most recent call last):
 File /home/webenv/zope/lib/python/ZPublisher/Publish.py, line 101, in publish
 request, bind=1)
 File /home/webenv/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
 if debug is not None: return debug(object,args,context)
 File /home/webenv/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
 result=apply(object,args) # Type scr to step into published object.
 File /home/webenv/zope/lib/python/OFS/ObjectManager.py, line 532, in manage_importObject
 raise BadRequest, 'Invalid file name %s' % escape(file)
BadRequest: Invalid file name InfoTechnical.zexp
Either I'm missing something very simple, or something is very wrong. Any idea what the problem might be?
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] migrating a zodb

2006-01-05 Thread David Bear
I installed zope 2.7.4 from FreeBSD packages. Trouble is that I already
had python 2.4 installed. It appears the package just used that version
of python since zope says it is using python 2.4.

I've run in to a few wierd things and would like to get a zope instance
a little more reliable. I was thinking of just making a copy of my zodb
file, removing the zope pkgs, then do a source install with python 2.3.

Is the zodb file plug and play transferrable? Can I just copy the zodb into the a new zope instance and go?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] python build errors

2005-12-28 Thread David Bear
I installed python 2.3.5 in order to keep my zope happy. However, make test yeilded some unexpected errors:

1 test failed:
 test_zipimport
35 tests skipped:
 test_aepack test_al test_audioop test_bsddb test_bsddb185
 test_bsddb3 test_cd test_cl test_crypt test_curses test_dbm
 test_dl test_email_codecs test_gdbm test_gl test_imageop
 test_imgfile test_linuxaudiodev test_macfs test_macostools
 test_mpz test_nis test_normalization test_ossaudiodev test_pep277
 test_plistlib test_rgbimg test_scriptpackages test_socket_ssl
 test_socketserver test_sunaudiodev test_timeout test_urllibnet
 test_winreg test_winsound
8 skips unexpected on linux2:
 test_dbm test_crypt test_gdbm test_rgbimg test_bsddb test_mpz
 test_audioop test_imageop
make: *** [test] Error 1


I don't know why these would have failed. Would these failures be a problem for zope?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] oddity with zope and webdav

2005-12-05 Thread David Bear
I have a zope instance listening on localhost. I use apache and fastcgi
to reach zope. Now I would like to provide webdav. Since my apache is
already doing ssl, I wanted webdav connections to also go through
apache.

when I use cadaver and connect to my zope zope through apache, all
works well even though I have specified in my zope.conf file that
webdav listen on localhost:8088 (it seems that cadaver is smart enough
working through the fastcgi interface to just work).

When attempting to using dreamweaver mx or windows webfolders to connect to zope I get an error.

So I attempted to use an apache proxy pass directive to campture all
urls at myzopeserver.edu:8088/webdav back to localhost:8088. This had
no effect. cadaver was still able to work. Dreamweaver (using webdav
site setup) and windows webfolders still failed.

What deep magic do I need to make dav work through apache? ( would
prefer to have all things go through fastcgi but I understand the trend
is to use proxy-pass )
-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ssh tunnelling webdave

2005-11-14 Thread David Bear
I am having trouble getting webdav to work through ssh tunnels. I hope someone may be able to offer a suggestion.

running zope 2.7.4
on FreeBSD 4.9
python 2.4.

my zope.cnf file has the following under webdav-source
 webdav-source-server
 # valid keys are address and force-connection-close
 address 8088
 force-connection-close off
 /webdav-source-server

the server address is set as follows:

 ip-address 127.0.0.1

To clarify things, I front this with apache and connect to it using fastcgi connecting to localhost:8089.
This works fine and has been for 2 years. I only want to add webdav capability. Since I haven't seen any documentation 
passing webdav through apache, I thought I would have to resort to
stunnel or tunneling through ssh. So, on my ssh client, I do the
follwoing

ssh -L 8088:localhost:8088 zopeserver.asu.edu

I connect and properly authenticate. However, when I attempt to load cadaver on the client, I get a connection timeout.

Partial output from netstat -an indicates that all zservers are listening where they should:

tcp4
0 0
127.0.0.1.8089
*.*
LISTEN
tcp4
0 0
127.0.0.1.8088
*.*
LISTEN
tcp4
0 0
127.0.0.1.8080
*.*
LISTEN

(this done on the zopeserver)

Any advice would be greatly appreciated.

-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] filesystem directory view

2005-09-23 Thread David Bear
I have cmf1.4.7 installed on zope 2.7.4.
I also have plone installed. All seems to work well.

I'm trying to use the file system directory view product to build a
simple graphics library. My thinking was to store all images on the
unix file system, then let some store some meta data on each image.
Trouble is, I'm not finding any 'beginning' documentation on using file
system directory view. seach zope.org yeilds hundreds of hits.

I've looked through the install tree for zope and cmf and am not finding any usefull README's there either.

so my first question is where is a good HOWTO on using filesystem
directory view (I've got both the fdv that came with cmfcore and one
that came with plone).

my second question is, .. is file system directory view what I want.
Again, I want to store files in the unix file system, expose those to
zope, then store meta data on each of those image in zodb.-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] securing webdav

2005-09-23 Thread David Bear
I run zope in back of apache, and let apache handle tls/ssl.

In all the searching on zope.org though I haven't found any documents
on how to let apache handle securing webdav for zope as well.

Anyone see/written such?-- David BearWhat's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] rendering the contents of ..

2005-08-02 Thread David Bear
On 8/1/05, J Cameron Cooper [EMAIL PROTECTED] wrote:
 David Bear wrote:
  I am looking at a couple way of producing a qotd solution.
 
  one way is to put quotes in a folder. Then use objectvalues on the
  folder  and randomly select one of the items. I get get the objectid.
  but I don't know what I use to get the 'content' of the object.. what
  is the method to get the 'rendered' and unrendered content of an
  object.
 
  In this case I'm using objects of type file (setting content type to
  text/plain) (ofcourse the content is plain text)
 
  I may find the using a zpt, html, or stx object will work better. I'm
  hoping there is a method to get either a rendered view of the file,
  (if zope knows how to render it) or unrendered, and I'll worry about
  rendering it elsewhere.
 
 The contents of a File object can be gotten at simply by calling it. You

sorry to be dense here. Its been a long time since I read the zope
book. I have the following code:
=
from Products.PythonScripts.standard import html_quote
import random
request = container.REQUEST
RESPONSE =  request.RESPONSE
# Return a string identifying this script.
q = container.quotes.objectIds()
print random.choice(q)()
return printed
=

But this returns an TypeError, str is not callable. How do I get this
code to return a random object from the quotes container?

 can also get at the underlying data with the 'data' attribute, which is
 useful if the contents are large (since it provides a 'Pdata' object
 rather than a string.) This is just as it says in
 http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixB.stx
 
 Other object types, like those that have to do rendering, you can just
 call for the rendered content. Methods 'document_src' or 'read' will
 usually work for the source.
 
 --jcc
 --
 Building Websites with Plone
 http://plonebook.packtpub.com
 


-- 
David Bear
What's the difference between private knowledge and public knowledge?
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] mod_zope development

2005-05-17 Thread David Bear
a quick google on mod_zope yeilded http://codespeak.net/z3/modzope/
and some other very old stuff.

Anyone know the status of this project? It is a new page... I'm
interested in how Zope Corp views this project and what Zope corp may
have in the future regarding apache style pluggins.

-- 
David Bear
phone:  480-965-8257
fax:480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 Beware the IP portfolio, everyone will be suspect of trespassing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )