Re: [Zope] Zope memory usage / cache

2001-01-31 Thread ender

On Tuesday 30 January 2001 21:21, Ron Bickers wrote:
> > -Original Message-
> > From: ender [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 10:12 AM
> > To: Ron Bickers; [EMAIL PROTECTED]
> > Subject: Re: [Zope] Zope memory usage / cache
> >
> > this sounds like normal operating system behavior. memory isn't
> > being free'd
> > just dealloc and returned to the program heap and marked as available.
>
> Ok.  So you're saying that even though it says it's taking 50MB, much of
> that memory is probably available for other applications?  

warning: i'm on shaky ground here.

this is very os dependent. most os's don't resize a process's heap down on a 
dealloc. instead the heap has more available memory for that process (ie 
Zope), other processes will have to alloc from free memory.

the management of free heap space and disk caching is again os dependent, but 
a good os should try to do some optimization of heaps before thrashing, so 
starting a new process should cause a problem.


>Does this mean
> that if another application actually starts to use that memory that the
> Zope process should start showing a reduction in use? 

no.

> How can I (if I can)
> see how much is really available? 

 i'm not sure how you would do this on linux.


>Also, does the free memory below not
> necessarily reflect the amount of memory that is actually available for
> applications that may need it?

no it does not (again os dependent). free memory is indicator of the os free 
resources for new and current processes. for existing processes it is a 
indicator not a def. answer.

>  total   used   free sharedbuffers cached
> Mem:126312 122936   3376  48424   5820  29952
> -/+ buffers/cache:  87164  39148
> Swap:   530104  21876 508228
>
> Sorry if this is inappropriate for the Zope list.  I have only *noticed*
> this behavior with Zope, but that may not mean anything.

if you're on linux trying starting up a large app (gimp comes to mind as a 
good one) and loading and unloading some large docs, and watch what happens


kapil

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




Re: [Zope] Zope memory usage / cache

2001-01-30 Thread ender

On Tuesday 30 January 2001 10:09, Ron Bickers wrote:
> I have a site that has dozens of 300k+ Photo objects
> (http://www.zope.org/Members/Drew/Photo).  When I start Zope, it uses about
> 10MB.  It will run at around 10-12MB for days as long as I don't access any
> of the photos.  Once I access several of the photos, it jumps up to around
> 50MB.  The debug info says there are over 200 Photo object references.
>
> If I then do a Cache minimize, there are no longer any Photo object
> references, but the memory usage remains 50MB.  It will stay that high
> indefinitely (at least as long as I have tested -- a few days), even if the
> site isn't accessed.  If I restart, it goes back down to 10MB, and it will
> stay there as long as my photos aren't accessed.
>
> Is this normal behavior?  It seems crazy to have Zope sucking up that much
> memory when those photos are hardly ever accessed.

this sounds like normal operating system behavior. memory isn't being free'd 
just dealloc and returned to the program heap and marked as available. 

kapil

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




Re: [Zope] DTML difficulties

2001-01-30 Thread ender







same thing for taskforces

your error from what you tried was because you were trying to treat
the taskforce and job folder objects as lists which they aren't. what you had 
would work, if you changed your  to reference the respective folders 
objectValues method which will return a list of objects which  will 
iterate over.

kapil


On Tuesday 30 January 2001 15:12, Nolan Darilek wrote:
> I'm working on my first zope product and, while everything has gone
> relatively smoothly so far, I'm having some issues.
>
> The product is a folderish object which contains 3 subfolders, each of
> which contains a specific type of object. The structure looks
> something like this:
> work/: Main folder, UI, etc
>jobs/: List of all jobs
>projects/:
>taskforces/:
>
> Each folder contains a job, project or taskforce object, as well as
> the UI to manage them.

> Now, the difficulty. I'm working on the UI for the job add form, which
> is in work/jobs. The form needs to iterate over the contents of
> projects/ and taskforces/, and I can't figure out how. Here's what
> I've tried:

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




Re: [Zope] RESPONSE.redirect

2001-01-29 Thread ender

On Monday 29 January 2001 09:14, Oliver Vecernik wrote:
> Hi all,
>
> I'd like to show a page and after a few seconds I'd like to redirect to
> another page. If I simply add  it is
> done immediately. How can I achieve a delay of a couple of seconds?
>
> Oliver
>


meta refresh in your headers should do it. you can use dtml to dynamically 
insert the redirect page.

standard html (4?)

k

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




Re: [Zope] CacheManagers are cool :)

2001-01-29 Thread ender

On Monday 29 January 2001 10:15, Seb Bacon wrote:
> I've just been experimenting with the RAM Cache manager, and FWIW I thought
> I'd share my findings:
>
> I ran some simple tests using ab against a single, dynamic page which has
> some display logic both in the filesystem product and dtml.  I cached the
> index_html using the default RAM Cache Manager settings.
>
> Without caching, response time appeared to increase in direct proportion to
> the number of simultaneous requests up to 10.  Above 10 connections,
> response time worsened dramatically.  When there were 15 simultaneous
> connections, the response time averaged at approximately 10 seconds.  The
> relationship looked logarithmic, but I didn't really take enough samples to
> be sure.  Plus, the system I tested it on only has 96Mb RAM, and it was
> swapping a bit.
>
> In all cases the cache improved performance.  The average response time was
> improved by up to 70% where more than 10 concurrent users were simulated.
> There was an improvement of 20% - 25% between 5 and 10 concurrent requests.
> There was no significant improvement where there were no concurrent
> requests.  The relationship between the number of simultaneous requests and
> the response time remained linear across all measured levels of
> concurrency.


very cool. although i find the lack of improvement on a non concurrent 
requests a bit strange if its a the dtml is doing real computation vs. 
serving a string from memory.

> Not exactly a real-life usage scenario, but it sounds impressive :)  Not
> sure I understand what the cache keys are for though... is there any more
> documentation forthcoming on this?


so you can cache requests based on dynamic input. 

useful for authentication to present different cache pages to different 
users, and also to present common request dependent information from cache.

as for real documentation, use the source luke

k

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




Re: [Zope] License

2001-01-29 Thread ender

On Monday 29 January 2001 01:41, Chris Withers wrote:
> Olaf Zanger wrote:
> > is the product planned to ship under GPL or an corresponding licence?
>
> Please don't shit it under GPL, it makes it much less useful :-S
> A variant of the Zope License would be much mroe friendly :-)
>
> cheers,
>
> Chris


just what i needed to start the week off right, a flamewar. :(

please allow people to choose their licenses freely. knocking on the gpl, is 
ignoring the reason why its there, to allow people to give their work freely 
to the community without concern of it being subverted.

k

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




Re: [Zope] Calling a DTML Document using a string

2001-01-24 Thread ender

On Wednesday 24 January 2001 12:00, Anderson Ami wrote:
> How can I do a dtml document call using the call dtml tag ?
> e.g.
>
> - I have 3 DTML documents ( bot1, bot2 and bot3)
> - I have in my request a int variable called varX
> - I would like do it, but this one doesn't work :
> ...
> 
> ...

this might work



cheers

kapil

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




Re: [Zope] TCPWatch... and closing sockets..

2001-01-22 Thread ender

i'm guessing this has something to do with the default line terminators that 
medusa is looking for before it senses that a data buffer is ready to be 
processed. it seems like the url encoded ones request seem to have different 
line terminators. you can adjust this the fly by using the set_terminator() 
func on the dispatcher. set_terminator can look for either a set of input 
chars, or you can adjust the data buffers to fire off for processing on 
integer sizes. 

hope that helps

kapil


On Sunday 21 January 2001 14:15, Steve Spicklemire wrote:
> I'm going to try to make a long story short... and the story isn't even
> over... but I'm getting close. One of our clients is a 'multimedia'
> company and we're working with a group there that consists mostly
> of artists and designers who use tools like photoshop and
> macromedia director. They came to us recently with a project
> for which they were *going* to use Macromedia Multiuser Server
> but the complexity of their application is significant..
>
> long story short... I've sold them on the concept of using Zope as the
> 'media/personality server' for this application.  They will use
> Director (which can post stuff to an URL and can also parse
> XML). So.. I'm building a framework that permits them to use their
> favorite tools, but I get to use *my* favorite tool too. ;-) The
> problem: Director is not a browser. There is no 'view source'. But (I
> think to myself) this is a great chance to use tcpwatch, which I've
> never used before. It's a little tricky since my favorite client
> machine is a Macintosh, and well.. lets just say that Tkinter for the
> mac is not perfect... not to mention there is no thread module..  but
> I do have a workaround that's useful (since I run Zope on a FreeBSD
> server, I just use tcpwatch on FreeBSD and either MI/X, or VirtualPC
> with Linux for my X server.. ). I noticed however that when I did a
> 'POST' the URL encoded arguments were lost. I found that the
> proxy_receiver handle_close method was never called.. so that anything
> in a 'last line' that didn't end in '\n' was lost. I added the
> following patch that shows this... but why is handle_close not called?
> I can only guess that the socket is not being properly closed
> somehow. I use lib/python/ZPublisher/Client.py to test calls to Zope
> and it works fine, but the asyncore/asynchat stuff never calls
> handle_close for proxy_receiver.
>
> Anyway... here's the patch: Comments welcome!
>
> *** ./tcpwatch_orig.py Sat Jan 20 16:55:43 2001
> --- ./tcpwatch.py   Sun Jan 21 16:52:11 2001
> ***
> *** 130,135 
> --- 130,137 
>   pos = pos + 1
>   else:
>   # Last line, may be incomplete.
> + line = "Partial line? " + data[oldpos:] + '\r\n'
> + self.watch_output(line, byClient)
>   return data[oldpos:]
>
>   def cleanupRefs(self):
>
> take care,
> -steve
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] ZPoPyDA woes

2001-01-22 Thread ender

the most recent versions of popy are currently hosted on sourceforge.

http://www.sourceforge.net/projects/popy
http://www.sourceforge.net/projects/zpopy

popy wants some includes which are not included in a normal source make
of popy. catalog/fe??h. i generally just copy them over from the source 
directory to the installation directory

also if anyone is curious popy seems to work fine against postgres7.1b3,
which includes massive improvements to postgres. no 8k row limits, outer 
joins, speed improvements, etc.

cheers

kapil


On Monday 22 January 2001 12:11, J B Bell wrote:
> Dear comrades in zopeness:
>
> For some time now I have been struggling trying to get Zope to talk to
> Postgres.  I am now nearly successful and hope that the revolutionary
> spirit of fellow zopatistas will carry the day.
>
> Background:
>
> Debian 2.1r2 on a PII 600 or so (the machine is pretty loaded)
> Postgres 7.0.3
> Python 1.5.2
> PoPy 1.4.1
> ZPoPyDA 0.7
>
> The most recent vexation is simple:  after expanding
> ZPoPyDA.0.7.tar.gz (dl'ed from www.zope.org/Members/tm), there is no
> configure file and no Makefile.  Like many products, it just expands
> out into lib/python/Products/ZPoPyDA/*.  However, the README file says
> to run "./configure; make; make install".  In an acronym, WTF?
>
> Bonus question:  I had a terrible time with installing PoPy itself
> until I modified the makefile to have a second -I argument going back
> to the source (.../postgres-7.0.3/src/include).  One or the other (the
> source or the installed include, that is) would result in various
> missing *.h files.  Did I install postgres incorrectly?  There was no
> .../include/catalog directory at all in the installed directories,
> which PoPy wanted.
>
> I eagerly anticipate any clues, and thank everyone for their
> attention.
>
> --JB
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] HELP: ZPatterns Installation on Linux

2001-01-20 Thread ender

assuming you have a source distro of zope than this 'should'  work

# from zope base dir
cd  lib/python/Products/ZPatterns
# the following is dependent on your python install, assuming
# a stock redhat rpm
cp /usr/lib/python1.5/config/Makefile.pre.in.boot .
make -f Makefile.pre.in boot
make

should do it leaving you with an *so file in your Zpatterns directory.

restart zope and you should be good to go.

kapil




On Friday 19 January 2001 14:11, J. Atwood wrote:
> The instructions in the README.txt and on zope.org are a little vague..
>
> How, indeed, do I " build this extension using the included Setup
> file in the ZPatterns directory" I can see the Setup file but that is
> about it.
>
> I would be more than happy to write up some documentation (on
> Zope.org) if someone sends me the answer.
>
> RH Linux 6.2, Zope 2.2.2, Latest ZPatterns
>
> Thanks,
> J
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] zope, xemacs and efs

2001-01-17 Thread ender

On Wednesday 17 January 2001 18:39, Geoffrey L. Wright wrote:
> [EMAIL PROTECTED] (A.J. Rossini) writes:
> > What version of EFS are you using, and if not recent, have you
> > considered upgrading the EFS package?
>
> 1.21
>
> That's the most recent version listed by the xemacs package manager.
> Is there a known problem with older versions of efs and  zope?

!!i think!! zope in general has problems with active ftp clients. if you can 
make efs work passive only you'll probably have better results.


kapil

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




Re: [Zope] Re:External Methods

2000-11-29 Thread Ender

check out the urlencode function of urllib.

kapil

Kini Natekar wrote:
> 
> Hi,
> 
> I am currently running a external method .This method
> calls a python script using the following line
> 
> href=\"http://localhost/cgi-bin/test.py?%s+%s\">%s"
> %(name,age,gender)
> 
> Instead of calling the python script we want to add
> the script as an external method in zope.The problem
> we are currently facing is in generating the above
> link dynamically.
> 
> How do we solve the above problem ?
> 
> Thanks,
> Kini.
> 
> __
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Python and EJB (J2EE)

2000-11-26 Thread Ender

assuming no errors, in which case you'll get rollback method calls, or
subtransactions.

a call to tpc_begin signals the begin of the two-phase commit. than
comes a call to commit, next tpc_vote, and finally tpc_finish.

kapil


Ender wrote:
> 
> Nitin Borwankar wrote:
> >
> >
> > > I've mentioned two-phase commit to Digicool people. Not sure whether it's
> > > already inside Zope or not, but it seems not. Zope's TM (Transaction
> > > Machinery) does not seem to be two-phase. See the TM.py file itself: it only
> > > has
> > >
> > > def _finish(self):
> > > self.db.commit()
> > >
> > > That is, I don't see the equivalent of prepare_to_commit().
> >
> > I'm not sure Zope source is the place to look for this,
> > perhaps ZEO source may be more appropriate.
> >
> > Nitin.
> 
> this has been enlightening, i'm still coming up to speed on all the ejb
> stuff.
> 
> zope does implement a two-phase commit and it is integrated with the
> transaction machinery. to see a good mix in that shows more of the
> transaction methods take a look at ZPatterns/Transaction.py although its
> not recommended for use (its deprecated in the current ZPatterns to look
> at you'll have to check out an older version).
> 
> you can see how things get called by looking in
> 
> ZopeHOME/lib/python/ZODB/Transaction.py to see the internals of a
> transaction mechanics.
> 
> and you can see how the zodb manages these semantics for objects living
> in the ZODB here.
> 
> zHOME/lib/python/ZODB/Connection.py
> 
> kapil
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Python and EJB (J2EE)

2000-11-26 Thread Ender

Nitin Borwankar wrote:
> 
> 
> > I've mentioned two-phase commit to Digicool people. Not sure whether it's
> > already inside Zope or not, but it seems not. Zope's TM (Transaction
> > Machinery) does not seem to be two-phase. See the TM.py file itself: it only
> > has
> >
> > def _finish(self):
> > self.db.commit()
> >
> > That is, I don't see the equivalent of prepare_to_commit().
> 
> I'm not sure Zope source is the place to look for this,
> perhaps ZEO source may be more appropriate.
> 
> Nitin.


this has been enlightening, i'm still coming up to speed on all the ejb
stuff.

zope does implement a two-phase commit and it is integrated with the
transaction machinery. to see a good mix in that shows more of the
transaction methods take a look at ZPatterns/Transaction.py although its
not recommended for use (its deprecated in the current ZPatterns to look
at you'll have to check out an older version).

you can see how things get called by looking in 

ZopeHOME/lib/python/ZODB/Transaction.py to see the internals of a
transaction mechanics.

and you can see how the zodb manages these semantics for objects living
in the ZODB here.

zHOME/lib/python/ZODB/Connection.py


kapil

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




Re: [Zope] How to checkout PythonMethod from CVS

2000-11-25 Thread Ender

Milos Prudek wrote:
> 
> How can I checkout PythonMethod from cvs? I tried to modify the "Zope2"
> in the following command:
> 
> cvs -z7 -d :pserver:[EMAIL PROTECTED]:/cvs-repository checkout
> Zope2
> 
> (Zope2/PythonMethod, Zope/PythonMethod, Zope/DC/PythonMethod,
> Zope/Products/PythonMethod and countless other combinations)
> 
> --
> Milos Prudek

when in doubt you can always use the cvsweb to find out what directories
you want.

kapil

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




Re: [Zope] j2ee & zope

2000-11-25 Thread Ender

alan runyan wrote:
> 
> Ender pretty much summed everything I could say about J2EE
> and Zope.  but I can tell you why we chose EJB/BEA at our
> company rather than something like
> ZOPE/OpenMerchant/PHP/etc.
> 
> 1. we are consulting firm and we need to be able to leave a
> client.  ZOPE could (at the time, and I believe still can)
> can get pretty hairy and there just are not that many
> people who can grok high brow ZOPE.  There are plenty JAVA
> programmers, with years of experience.  The J2EE standard
> is just a set of API's Sun has set up for java programmers
> to work with.  The underlying implementation of the API
> and brand name is why you chose WBELOGIC over WEBSPHERE, or
> vice versa.

> 2. as others said in the previous posts: MessageQueueing,
> JDBC (this is significant, I still cant get the DCOracle to
> work), Transactions, Documentation (javadoc of j2ee),
> Distributed Objects (EJB's - entity beans have their place,
> but session beans usually most common approach to business
> logic), Persistence (entity beans are rarely used, ASAIS)
> and a Security model (pretty complex and confusing -- but
> acquisition and security can get pretty hairy as well).

zope doesn't have a native message queueing system, but if you after
something along the lines of MOM or JMS, you could interface to
xmlblaster.org (either corba, or xml-rpc). 

regarding db access, this is one of my sour points with zope right now ,
(and no i have gotten a working DCOracle yet either), although the
python dbi interface does mitigate somewhat programming portability
somewhat the implementation of adaptors in zope is limited by zope's
rbms access system to enforce penalties on adaptors and libraries which
are not fully thread-safe. DCOracle is the only maintained level 3
adaptor for zope right now and its a bitch to compile (why? i've never
had any problems compiling perl-oracle, aolserver/tcl->oracle,
java->oracle, where i need to track down all the shared libs in use). 

> 3. ZOPE has quite a lot of flexibility, but as far as
> implementing a exchange or large transaction heavy site, I
> just wouldnt do it.  I am pro-ZOPE all the way, but there
> has been very little (?) experience with building
> distributed systems w/ ZOPE and the community experience (I
> would imagine) leans more to Content heavy - simple
> transaction based websites.

Transactions - Zope's transaction system is pretty good IMO, and it does
support integration of external transaction aware systems. i agree with
chalu kim that whats needed are more examples of this type of
integration. i'm trying to work on some docs to hopefully flesh some of
this out, but i tend to be more productive writing code than docs:). do
you have an example of a large transaction heavy site?

> 4. Integration.  it would be nice to have ZOPE integrate w/
> J2EE (via J2EE connectors?). What I see as ZOPE's huge win
> is content management.  ZOPE is a inclusive system that
> integrates poorly w/ external systems (IMHO). you must hack
> up wget w/ custom scripts of rolling back.  (you can not
> push a button and say 'all marketing information is
> approved' - then it goes to the staging server, then what
> happens if you have created another version, and have
> packed the ZODB?) there is no way of reverting back to a
> historical version if you pack the database.  The PTK works
> fine for ZOPE.ORG, but how many businesses run their shop
> like zope.org?  I havent seen many paradigm except ZOPE.ORG
> or memepool.com that could work like the PTK is targeting
> (autonomous people posting content, how do people share
> documents/content?).

i disagree pretty strongly on integration, i feel the opposite, in fact,
one of zope's strengths is its integration ability. ldap, rdbms,
xml-rpc, smtp, pop, imap and whatever else you might care to roll in.

i think the issue your tackling here is integration with developer
tools, to provide cvs and the standard dev, test, prod environments, and
a real ide. zope's support here is sketchy and its very dependent to how
you develop a site. there is a separation here of where your code lies
and where your data lies. if you have fs code and db data than you can
use whatever traditonal tools that you're used to. if you're using ttw
development, zcvsmixin might provide some of the support you need
(although i don't recall that it did it meanigful diffs since its based
on export/import). the mounted db product can provide some support for
moving data from dev, test, prod environments. there was also a product
(i haven't looked at it) that hooked up two zope servers via xml-rpc
that might be useful for migrating content, esp if you can tie togther a
seamless export/import system. the whole ide issue is up in the air till
(IMO) till Active

Re: [Zope] Python and EJB (J2EE)

2000-11-25 Thread Ender

Hung Jung Lu wrote:
> 
> >From: Ender <[EMAIL PROTECTED]>
> >...
> 
> Thanks for the comments. I'll reply other points in a few more days.

cool, i've been waiting for this discussion:)

> >as for distributed technologies, while xml-rpc is useful and simple its
> >not useful (IMO) for enterprise programming, its too basic.
> 
> This maybe true. However, HTML is also basic and simple, but exactly because
> of its simplicity, it became widely accepted and used. On the opposite end
> is CORBA: because it's so complicated, there is no vendor out there that can
> possibly implement all its features. Trading powerful features for a wider
> acceptance at times does work.

don't forget marketing, behold windows.

CORBA is complicated but its also more widely deployed in the enterprise
because this problem domain needs the additional feature set. 

my comments regarding xml-rpc are targeted towards enterprise
implementations. if all you need is simple rpc, than xml-rpc will
provide 80% functionality of soap at 20% of the complexity (not my
numbers) and i recommend to anyone to use xml-rpc. but if you need
actual cross-platform object access/transport, than it just won't cut it
and then you need the additional functonality of soap.

also back to the marketing hype, if something isn't supported than it
tends to wither away into a niche. while xml-rpc is used in the trenches
for lots of stuff, SOAP is supported by lots of major software
developers (ibm and ms come to mind) and it will become the future
standard supported by interoable products (in many ways it already has). 
 
> SOAP is showing symptoms of becoming complicated. And that's a bad sign. See
> Fredrik Lundh's implementation comment for Python SOAP at
> http://www.pythonware.com/products/soap/profile.htm

> >Profile
> >Posted Jun 08, 2000
> >
> >SOAP 1.1 is a highly modular and rather complicated standard. Supporting
> >every little nook and cranny is huge task, and since the specification is
> >still a moving target, we've decided to do this implementation step by
> >step.
> 
> OK. Even the guru describes SOAP as "rather complicated", what then for the
> novices? 

implementing a standard and using a standard are different things. do
you need to understand how a db works to query it?

do you really need to understand how xmlrpc works when you do something
like this?

(pseudo-code)
xmlrpcServer('http://yourzopeserver.com')
print xmlrpcServer.objectIds()

i think that as long as the library implementors create a clean
interface to the system than the novice should be able to use the system
without as a blackbox.


>I personally went through the SOAP protocol spec today and I had to
> agree it's "rather complicated". SOAP is going down the path of CORBA all
> over again. It's becoming COAP (Complicated Object Access Protocol). If not
> because Microsoft is behind it, I'd dump SOAP right away. Due to its
> simplicity, I'd say XML-RPC is here to stay, SOAP or no SOAP. It's
> unfortunate that the twin brothers have to fare good-bye, but at the same
> time I am glad that XML-RPC split off to remain simple. Future servers will
> have to handle both: more work, but that's fate.


i agree with /F description of SOAP, but i have a different guru.

Dave Winer is the/a writer of the specs for of XML-RPC and SOAP. a bit
dated link. 

http://davenet.userland.com/1999/09/12/anEndToTheUberoperatingSystem

I agree that there is a place for both protocols, (right tool for the
right job), and that zope should support both. although how is another
can of worms, since i don't think people want the same xml-rpc style
automatic opening of your entire site that currently happens with zope. 

incidentally some other useful links

# distributed lightweight protocols
lwprotocols.org

# alternative python soap-rpc lib
http://casbah.org/~kmacleod/orchard/

Cheers

Kapil

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




Re: [Zope] Python and EJB (J2EE)

2000-11-24 Thread Ender

i've been playing around with servlets (tomcat, jserv, orionserver.com)
and generally been pretty happy with them. development cycle is a lot
slower than zope. i did some prelim work on hooking up jserv to zope but
gave up cause the performance generally sucked (jserv is still using
apj1.1 which doesn't have persistent connections) and figured there were
easier ways to get the two talking besides directly ala distributed
protocols or shared backend resource like a rdbms.

j2ee is more than just ejbs, its a whole slew of technologies like
(jdbc, jndi (directories), jms (messaging), jts (client transactions),
jaxl?(xml)...). one advantage of using java for a project thats going to
be talking several of these protocols is the fact that there is a
standard supported library for it as opposed to python's bazaar style of
development and support (not to mention documentation). integration of
this stuff in python generally requires evalutation on a per
protocol/library basis because in some cases the library just isn't
robust enough to handle the work (python's soap support comes to mind).  

as for component technologies, i really feel this comes out more as a
programming paradigm in python rather than a forced technology. 

as for distributed technologies, while xml-rpc is useful and simple its
not useful (IMO) for enterprise programming, its too basic. it requires
alot of custom app programming to transfer meaningful exceptions. some
protocols/libraries that i would like to see in python would be soap,
wddx (bindings for http&soap), uddi. i've never used com/dcom so i've
nothing to say about them. python does have great corba support
(omniorb, fnorb) and some is working on integrating zope as a corba
system (hopefully they'll write up a howto/ release some code), and pyro
can cut it for simple distributed systems.

so what would you like to see in a python component container?

kapil



Hung Jung Lu wrote:
> 
> Python and EJB (J2EE)
> =
> 
> Searching through comp.lang.python newsgroup archive
> ([EMAIL PROTECTED]) and the [EMAIL PROTECTED] mailing list, I have not been
> able to find much about EJB (Enterprise Java Bean) and Python/Zope
> comparisons. (J2EE is Java Two Enterprise Edition, basically another jargon
> for any architecture based on EJBs.)
> 
> I believe this field deserves to be explored a little bit more. If Python is
> going to be more used in the corporate environment, it has to be made
> stronger. This message is kind of unorganized, but I would like to have
> comments/feedback from other people.
> 
> The following message shows that I am not the only one interested:
> 
> >ruben <[EMAIL PROTECTED]> 11/08/2000 in comp.lang.python:
> >
> >Coming from a Java background and recently using Python for application
> >development, I have a question. Is there an equivalent to Enterprise
> >JavaBeans in Python?  If so, please point me to some resources!!!
> 
> Similarly Joe Grace <[EMAIL PROTECTED]> has posted an explanation on J2EE in
> the Zope mailing list:
> 
> 
>http://zope.nipltd.com/public/lists/zope-archive.nsf/0dec1f578f18f116802568ab003585d2/86cffddc1a8a73b980256865006d44a2?OpenDocument
> 
> I am starting to look into Java EJB, and I must say that despite all the
> hype, it is totally horrible. I can understand the goals of EJB, but I
> wonder whether something simpler and cleaner might be better. EJBs,
> especially entity beans, have largely failed and have disappointed many Java
> developers, or so it seems from the comments I have received from other
> people.
> 
> First off: what is an EJB? There are plenty of books out there, there are
> plenty of websites out there, but you'll probably be hard-pressed to find
> someone that has actually worked with EJBs. I've never liked the names "Java
> Beans" and "Enterprise Java Beans". These are marketing names. We need some
> more generic names. "Java Beans" are an attempt by Sun to implement
> component programmming. That is, the idea is to have component classes on a
> single machine (virtual machine in the case of Java) that can be shared/used
> by different programs. In this sense, "Java Beans" are much like DLLs, Unix
> shared libraries, Python modules, or Microsoft's COM, ActiveX stuff. "Java
> Beans" are designed to be shared within one single machine. "Enterprise Java
> Beans" are much more complex than "Java Beans", and they are aimed at
> distributed computing: EJBs are designed as classes/components to be shared
> by multiple machines. In this sense, they are more like CORBA, or
> Microsoft's DCOM. Therefore:
> 
> (1) Java Beans <--- local components, run on the same machine
> (2) Enterprise Java Beans <--- distributed components, distributed
> computing, multiple machines, potentially located in different geographic
> locations. These components often have instance pools running in multiple
> threads, and often are transactional.
> 
> -
> 
> What about Python? Or Zope? Simple distributed computing is not

Re: [Zope] Pseudo E-Mail Address validation

2000-11-22 Thread Ender

Martin Winkler wrote:
> 
> Hi all,
> 
> For a subscription tool of a mailing list I'd like to quick-check the
> e-mail address our users type. Is there a little product/method etc.
> available that does this? I know that you can only be sure whether an
> e-mail address exists or not, when you actually send a mail to the user,
> but a quick-n-dirty check would be nice. Maybe even complete RFC-compliancy
> as implemented in some Perl-Modules? (spaces, "@" sign, dot-notation etc.)
> 
> Hoping for an answer,
> 
> Martin
> 

not feature complete but def. qualifying as a quick-n-dirty-check


valid 


solves most of my concerns with valid email addrs


kapil

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




Re: [Zope] Search and replace

2000-11-22 Thread Ender

tom smith wrote:
> 
> on 21/11/00 3:05 am, Ender at [EMAIL PROTECTED] wrote:
> 
> > Sadly this is a constraint of zope ide's being browser based (or based
> > on current browsers). I would eagerly like to help out with a project
> > that would like to see this changed.  Building such an interface with
> > gnome or kde would be possible, indeed there are already efforts
> > underway to do both
> 
> Surely something written in python and Tk would be better, so that the
> editor could also be run on macs, PCs as well as Linux.

tk on the macs is flaky, i'm not to sure of Tk's widget potential to do
the needed html rendering quickly ( i haven't looked at grail in a while
though). 

mozilla really seems like the only strong option for cross-platform dev
of a zope ide.

good news though,  from 

http://www.python9.org/p9-applications.html

At a minimum, these sessions will cover the following: The Komodo
Integrated Development Environment, a Mozilla-based, cross platform IDE
which is both extensible and network-oriented; The Python-XPCOM
bindings, which allow the Python programmer to build Mozilla-based
applications and script them; Python for .NET, a new port of Python to
Microsoft's .NET platform; and Visual Python, a plugin for Visual Studio
.NET, which allows the Visual Studio programmer to integrate Python into
her  development environment.


kapil

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




Re: [Zope] Search and replace

2000-11-22 Thread Ender

Mario Olimpio de Menezes wrote:
> 
> On Tue, 21 Nov 2000, Lee Hunter wrote:
> 
> > On the other hand I actually *like* the Zope management interface - in fact,
> > so far I've found it to be very easy to understand and a total pleasure to
> > use. It just doesn't offer some things that I must have - features that
> > would probably be hard to incorporate into a browser interface.
> >
> 
> what about a plug-in, written in {Java | TclTk | whatever_language}?
> I don't have skills to do this but I think this could be done.

> just an idea!

sadly...

cross-browser compatibility would be a pain, and performance would bite.

kapil

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




Re: [Zope] DTMLTemplate + PythonMethod == separate code from HTML?

2000-11-22 Thread Ender

Thiebaut CHAMPENIER wrote:

> The DTMLTemplate and PythonMethods products seem to provide this kind of
> separation between code and design, but I did not manage to get them working
> properly together:

they do provide this level of separation. another option to check out
with this kinda of separation are the hiperdom templates (search
hiperdom on zope.org, not quite ready for prime time)

> DTMLTemplate:  when I display a block (using  "my_template.my_block">), the HTML tags in my_block appear quoted, should I
> use a fmt="html" or something like that to avoid the quoting?

when you switch to pythonish dtml ala " " you need to explicitly pass in
the args the method expects for proper rendering.




> PythonMethods: how can I access Zope objects from my method?  Typically I'd
> like to call a template block from my method, but just using
> my_template.my_block doesn't work.

same thing i think,
return my_template.my_block(_.None, _)

> As you can see, I'm not a Zope guru, but I'm willing to learn!  I believe
> that Zope and PTK have a big role to play in the current portal and
> application servers war... ready to use portal-in-a-box products cost around
> $100,000... so for that price you can use zope and afford more consulting
> and coding services!

there are several other quality open source portal solutions. to name a
few
arsdigita.com, java.apache.org/jetspeed, metadot.com

> BTW, currently I'm experiencing a problem: no images (icons, ZopeButton
> etc..) appear on my management pages, images stored in the ZODB are ok
> though. any idea where are those images like
> http://localhost:8080/p_/ZopeButton ?

there some stuff on this in the mailing list archives.

kapil

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




Re: [Zope] Search and replace

2000-11-21 Thread Ender

Daniel Rusch wrote:
> 
> I have been following this thread with mild amusement. Those of you who
> don't think that there is any need for a search and replace are being,
> at the least, disingenuous. Have you never needed to replace a dtml var
> that is on a hundred or more pages with another one, but replace it only
> on some of the pages???
> 
> The lack of a search and replace, a find that actually "finds" a string
> on a page (instead of just the page) and other standard editor features
> are the reasons why Zope is being phased out of this companies (15,000
> person worldwide company, the worlds largest web hosting and fiber optic
> network) web tool set.
> 
> Don't get me wrong, I think Zope is the greatest thing since sliced
> bread. But, if Zope is to become anything other than a bastion for open
> source zealots (myself included), a real editor is a necessity not a
> nicety! Zope had the opportunity to sweep this company ( it could have
> ended up on hundreds if not thousands of servers) but the lack of a
> professional interface doomed it.
> 
> DR

Sadly this is a constraint of zope ide's being browser based (or based
on current browsers). I would eagerly like to help out with a project
that would like to see this changed.  Building such an interface with
gnome or kde would be possible, indeed there are already efforts
underway to do both. But to create a cross-platform solution really
needs... Mozilla. Sadly, the ZopeMoz projects appears to be dead,
hopefully developer interest can be generated in reviving it after
ActiveState releases the python bindings to XPCOM (which should be
soon).

kapil


> 
> 
> Lee Hunter wrote:
> >
> > Martin Winkler wrote
> > > I just wanted to express that this feature may be too hard to
> > > program for
> > > the (IMHO) rare cases that we really need it, but IF there
> >
> > I had understood that Python and Zope excelled at string manipulation.
> > That's why I am surprised that it would be difficult to scan a folder full
> > of documents to find a word and replace it with another (with the option of
> > ignoring anything in pointed brackets). I'm not a programmer so I probably
> > don't appreciate the complexities of the task, however in this case it seems
> > like the object-oriented database is a hindrance rather than a help. If it
> > was just a batch of html files I could search and replace through them with
> > just about any piece of software on my desktop.
> >
> > I wouldn't know whether this is the sort of tool that is generally useful,
> > but in my work I use search and replace all the time (if only to fix my
> > endless confusion over 'its' and 'it's')
> >
> > Cheers
> >
> > Lee Hunter
> > Hum Communications Ltd.
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Search and replace

2000-11-20 Thread Ender

Lee Hunter wrote:
> 
> Martin Winkler wrote
> > I just wanted to express that this feature may be too hard to
> > program for
> > the (IMHO) rare cases that we really need it, but IF there

its not that hard to program,  if you want just want to replace,
previewing is a bit difficult, because your asking for a multi-doc
preview (how?)

ideally two external methods. one recurses through folders collect
objects of a particular meta_type

the second external method calls the first to get a collection of
objects for a particular meta_type and performs string manipulations on
the raw() representation of the method. 

kapil

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




Re: [Zope] How do I form an XML-RPC query to a remote server?

2000-11-16 Thread Ender

Tony McDonald wrote:
> 
> Hi all,
> I'm experimenting with collating data from a remote database that uses
> XML-RPC.
> 
> I can send it messages like;
> >>> import xmlrpclib
> >>> medweb = xmlrpclib.Server("http://bogus.server.com")
> >>> medweb.getImages('scar')
> ' ?>\015\012\011\015\012\011\011Medwebb Images \0
> 
> (lots of stuff snipped)
> 
> But I just can't figure out how to send the XML version of the same query,
> ie
> 
> 
> getimages
> 
> 
> scar
> 
> 
> 
> 
> to the server.
> 
> I've got a nasty feeling that when I get told how to do this, I'm going to
> slap my forehead bloody hard
> 
> As you can see the data is returned in XML format, and whilst I'm fine with
> Python code for XML parsing (usually use sgmlop), I'm a bit lost on where to
> start here. An External Method seems the best way, but I'd like the received
> wisdom on this.

this probably isn't your problem, but in your above example getimages
looks like it should be getImages. 

i'm not sure why you want work by hand on the xml-processing, since
xmlrpclib already exists. if you want to debug your setup you can use
shane hathaway's tcpwatch as a proxy which show you what goes out on
the  wire. 

as for the location of such code, it depends on what you're doing with
the results, i think the choices are between a product and an external
method.

kapil

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




Re: [Zope] Do Zope Haz Templates?

2000-11-15 Thread Ender

Curtis Maloney wrote:
> 
> On Wed, 15 Nov 2000, Padrino wrote:
> > I Was Serching And looking For Templates and I Was Guessing if Zope
> > really Has It?
> >
> 
> DTML.  Document Template Markup Language.
> 
> DTML is Zopes templating language.  Look at DTML Documents and DTML Methods.
> 
> Have a better one,
> Curtis Maloney


alternatively if you want real templates that enforce separate logic and
presentation take a look at hiperdom.

kapil

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




Re: [Zope] Re: DateTime

2000-11-11 Thread Ender

Jerome Alet wrote:
> 
> On Fri, 10 Nov 2000, Chris Withers wrote:
> 
> > mxDateTime is _not_ the DateTime in Zope. If only it was
> 
> It's voting season, so I vote +10 for this one.
> 
> bye,

I'll second that 

+10

kapil

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




Re: [Zope] Bulk Mailing How-To!

2000-11-11 Thread Ender

Wow, this is really cool. nice job.

btw. if anyone's interested i wrote a patch to change the mailhost
behavior to use a persistent connection to the mta. email me if
interested (yes, i submitted a feature/wpatch to the collector).

also its good to note that the mailhost doesn't currently participate in
transactions.

regarding injecting to the mta, this is def. the best way to send bulk
mail, but you might want to do an fsync to make sure it gets written to
disk vs. lingering in a kernel cache. 

kapil


"Stefan H. Holek" wrote:
> 
> For those who care: I have created a bulk mailing How-To at
> 
> http://www.zope.org/Members/shh/BulkMailHack/
> 
> Cheers,
> Stefan
> 
> --
> Things work better when plugged in
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Can Zope use a Different Python?

2000-11-11 Thread Ender


Hi

i'm not sure exactly whats being asked here. zope on linux doesn't
include its own python interpreter. you can choose which one executes
zope and its external methods by specifing the interpreter binary in the
start.py. its quite possible that your installing third party modules
into the distros python in /usr/bin/python, in which case if zope's
using /usr/local/bin/python you won't see them and you'll get import
errors. if this is the case copying the third party modules into
/usr/lib/python1.5/site-packages will solve the import errors, or moving
the modules into the zope_dir/lib/python/ (or perhaps a subdirectory
with an init) might do the trick. if you specifically want to run
something through a custom python interp from zope you might need to use
os.popen2 (or variant) in an external method, or setup sometype of
interprocess communication via xml-rpc or an rdbms or shared file, etc.

hope that helps

kapil


Gary Perez wrote:
> 
> Hi.
> 
> We've got Zope 2.2.2 installed on a Linux box. We want to be able to use
> the full-up python that's on the box instead of the python interpreter
> that comes with Zope for playing with External Methods.
> 
> Is there any way to circumvent Zope's python in this way?
> 
> If not, what's the easiest way to extend Zope to be able to use our
> non-Zope python?
> 
> Alternatively, we're plagued by import and attribute errors when
> accessing the External Methods. Will simply moving (or linking?) all the
> pieces (whatever.py, __init__.py, etc.) into a subdirectory of "Shared"
> fix the problem?
> 
> Thanks in advance for your help.
> -GMP
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Question about dtml-in

2000-11-05 Thread Ender

Sean McGrath wrote:
> 
> Hello all,
> 
> I have a question about the dtml-in tag. When it is iterating over a
> sequence, and the items in the sequence happen to be tuples containing
> exactly two items, then dtml-in places the first item from the sequence in
> sequence-key, and the second item goes in sequence-item. If the items in
> the sequence are not tuples of two items, then sequence-item contains the
> whole item. For example, if I have:
> 
> 
> 
> 
> 
> then I get 2,4,6 when I view this. The 1, 3 and 5 have been assigned to
> sequence-key. Now, if I change the dtml to be this:
> 
> 
> 
> 
> 
> then I get
> (1,2,3)(3,4,5)(5,6,7)
> 
> which is what I would expect. I think the reason for this behaviour is to
> do with iterating over dictionaries, but I'm not sure. The problem I have
> is this: I have code which retrieves data from a database, and the result
> is a list of tuples, with each tuple corresponding to a record, and each
> item in the tuple corresponding to a field. I don't know in advance how
> many fields will be in the record. I want to iterate over the records and
> fields, wrapping them in a html table. If the database I'm talking to
> happens to return a list of records with two fields, ie a tuple of two
> items, I have to handle this differently than any other case, which makes
> for some ugly code. I haven't been able to find any way to avoid this,
> unless I'm missing something. Any information would be greatly appreciated.
> 
> Regards,
> 


in addition to Dieter Maurer's suggestion of fixing this behavior in
dtml-in, another possibility is to do the work in a web python method,
and directly access the Result object from the query to generate the
html. 

Result object api.
/lib/python/Shared/DC/ZRDB/Result.py

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




Re: [Zope] How do I logout?

2000-11-04 Thread Ender

I don't know if there is an elegant way to do this.

if i'm the superuser i just try to find a junk method (The QuickStart
Tutorial does nicely) and change the text to include the following. (if
i'm another user it the same thing applies but i generally create a
logout method._


Log Me out Scotty


when the basic auth box pops up, just change your username and click
enter, next time the pop up happens click cancel. now when you try to
browse around in any place requiring authorization, it will query you
for your password as the new user. 

Kapil

Lee Curtis wrote:
> 
> Hi all,
> 
> How do I logout or switch users when running Zope?
> 
> I've got some DTML code that does it - sometimes, othertimes it produces a
> keyerror.
> 
> This must be a common problem - coz I'm logged in as super user and want to
> switch back to my regular username.
> 
> Contributions of help greatly appreciated...
> 
> Thanks.
> 
> lee
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Upscaling of performance

2000-11-02 Thread Ender

has anyone tried the asyncore.c module from nightmare.com to speed up
zserver?

Kapil

"J. Atwood" wrote:
> 
> 1,000,000 hits is not that much but you can check out the Zope Benchmarks
> 
> http://www.zope.org/Members/BwanaZulia/benchmarks.html
> 
> On some good hardware it can handle about 100 Requests per second (8,640,000
> per day).
> 
> Beyond that you need two things... ZEO and hardware.
> 
> Cheers,
> J
> 
> > From: Petr van Blokland <[EMAIL PROTECTED]>
> > Organization: Buro Petr van Blokland + Claudia Mens
> > Reply-To: [EMAIL PROTECTED]
> > Date: Thu, 02 Nov 2000 18:19:24 +0100
> > To: zope list <[EMAIL PROTECTED]>
> > Subject: [Zope] Upscaling of performance
> >
> > Hi,
> > does have anyone reference on or information about
> > the upscaling of Zope for *very* large hit performance:
> > 1.000.000 per day or so?
> >
> > Petr van Blokland
> > [EMAIL PROTECTED]
> >
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> >
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Help! Zope Crash

2000-11-01 Thread Ender

Edward Muller wrote:
> 
> I am running a Zwiki site at http://www.handhelds.org:8080/wiki. This site has
> become invaluable to our growing handhelds.org community as a place to collect
> information. But, sadly our zope server keeps dyingNo idea why
> 
> Sometimes the zope server can be up for a few days, sometimes only a few
> hours. I am not sure what is causing this or how to go about tracking it
> down. Is there anything I can do?
> 
> Any help would be greatly appreciated.


i recently used the this howto to debug a zope site. 

http://www.zope.org/Members/mcdonc/HowTos/DEBUG-LOG

Its useful to see where your zope site might be hanging, dying.

although its easier to go through the results of the analyzer script if
you make the keys of request dict integers so you can get a sorted view.

hth 

Kapil

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




Re: [Zope] XML-RPC vs External method?

2000-11-01 Thread Ender

if the xml format is simple you could just do it dtml, it would end up
with some extra white space but it would still be valid.

a dtml method akin to 










kapil


Irene Barg wrote:
> 
> Hello all,
> 
> I have setup a query form to query a small MySQL database using
> Zope.  It consists of:
> 
> 1.  ZMySQL Database Connection (ZMySQLDA)
> 2.  ZSQL method
> 3.  A search interface.
> 
> Now, what I want is the user to have the option of viewing the
> results in HTML or raw XML.  I think there can be two approaches
> to this:  1. External method, or 2. XML-RPC.
> 
> 1.  External method:  Replaces the ZMySQL database connection
> with an external Python function called 'mysqldb_XML', pieces
> of which follow:
> 
> def mysqldb_XML(self,query):
> """
> Use a MySQL SAX driver to map relational data to XML.
> Hacked from PyXML saxdemo.py.  The MySQL driver is a modified
> version of Sean McGrath's drv_mysql.py ("XML Processing with
> Python").
> """
> from xml.sax import saxexts, saxlib, saxutils, writer
> import sys,urllib
> 
> #Our MySQLdb XML driver;
> driver="xml.sax.drivers.drv_mysqldb"
> .
> out = sys.stdout;
> p=saxexts.make_parser(driver)
> dh=writer.PrettyPrinter(out,dtdinfo=info)
> try:
> p.setDocumentHandler(dh)
> return p.parse(query)
> except IOError,e:
> return in_sysID+": "+str(e)
> except saxlib.SAXException,e:
> return str(e)
> 
> Inside Zope, I get the ZSQL 'query' and do something like:
> 
> 
> 
>   
> 
> 
> 2.  XML-RPC:  It seems to me XML-RPC could do this too, but
> I don't know how one would print out the raw XML response.
> Could I have a Zope client request the ZSQL method above,
> but instead of sending it to my output DTML method, I just
> print the raw-XML stream?  Examples would be helpful:-)
> 
> It seems to me if XML-RPC already produces an XML formatted
> stream, it would be more efficient to just use it (unless
> there is yet another way in Zope I'm not aware of).  Is it
> possible?  Is there any reason to want to use the external
> method instead?
> 
> Thanks for your comments,
> 
> --irene
> 
> --
> Irene Barg  Email:  [EMAIL PROTECTED]
> Steward Observatory Phone:  520-621-2602
> 933 N. Cherry Ave.
> University of Arizona   FAX:520-621-1891
> Tucson, AZ  85721   http://nickel.as.arizona.edu/~barg
> --
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] MailHost: bcc broken ?

2000-11-01 Thread Ender

"Stefan H. Holek" wrote:
> 
> On Wed, 25 Oct 2000, Gregory Haley wrote:
> 
> > i was one of the participants in the recent discussion of zope bulk
> > mail.  i'm wondering about the mechanics of sending the work of the mail
> > to the actual sendmail server outside of zope.  would i do that by
> > creating an external method which is program/script that accepts the
> > data from zope and then passes them to the mail server?  any suggestions
> > or details would be most appreciated.
> 
> got me ;) I have not done this myself (yet), and I have firtshand
> knowledge of majordomo list management only. but I could think of
> something like this:
> 
> a) very simple
> create a mailing list in your listmanager and have zope send the email to
> the list's address. voila, the rest is taken care of by the listmanager.
> 
> b) a bit more involved
> if your addressee list changes (you create it on the fly with zope
> somehow) you could pass that list to the listmanager before sending email
> to it. in majordomo, a mailing list is simply a textfile containing a line
> for each subscriber's email address. make an external function to create
> that file and proceed like in a).
> 
> HTH,
> Stefan
> 

i've been thinking about bulk mailing in zope recently, one easy thing
to do is to change MailHost to use a persistent mail connection (i've
already submitted this as a patch to the Collector, if you're interested
email me), this should provide some marginal improvements. Another
method that should increase both speed and reliability is to directly
inject the mail into a relay smtp server's mail queue. this is
definitely mail server dependent but offers the greatest performance
gains and is capable of scaling and greater reliabiltiy (dependent on
mailserver). usings lists is a valid solution but it doesn't get at the
core question of how to send more mail messages from zope quickly and
reliably.


cheers 

kapil

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




Re: [Zope] Zope Book Beta

2000-10-31 Thread Ender

Phil Harris wrote:
> 
> Give me a few hours and I'll be knocking out the eBook and PDF versions.
> 
> By the end of the day.
> 
> Phil

Hi Phil,

how do you do that? for the pdf are you dumping stuff into reportlab?

Kapil


> - Original Message -
> From: "Chris Withers" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, October 31, 2000 11:49 AM
> Subject: Re: [Zope] Zope Book Beta
> 
> > There a PDF of it anywhere?
> >
> > cheers,
> >
> > Chris
> >
> > Michel Pelletier wrote:
> > >
> > > Amos and I are gibbering like madmen with excitement to announce the
> > > Zope Book Beta.  This is the complete, technical draft of the book with
> > > all screenshots (but minus illustrations, those are on there way!).
> > > Some other things like a colophon and information about the authors is
> > > missing. The beta includes all completed chapters, the API reference,
> > > and the DTML reference.  We've received over a hundred comments,
> > > corrections, and ideas from you the community and it has made a much
> > > better book.  This is the one to print out and give to your friends as
> > > christmas gifts, folks, so get crackin and start reading at
> > > http://www.zope.org/Members/michel/ZB/.
> > >
> > > Enjoy,
> > >
> > > -Michel
> > >
> > > ___
> > > Zope maillist  -  [EMAIL PROTECTED]
> > > http://lists.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] My Items will not show themself in manage_main (objectItems)

2000-10-30 Thread Ender

Max M wrote:
> 
> I have made a product that inherits:
> "OFS.ObjectManager.ObjectManager"
> and so should be able to contain other object.

In python any object can be a container, the use of the ObjectManager
assists in creating an api and ui for the container's management of
objects.

> I have given the product a manage option:
> {'label':'Contents', 'action':'manage_main'}
> This is inherited from ObjectManager, To make it possible to
> add content to my product.
> 
> But when I add ie. a dtml method to my folderish object, it does it
> allright, and the document gets added. I know because I can see it directly
> when going to it's url. And if I try to add another document with the same
> name I get an error saying that the id is allready used.
> 
> But the Item doesn't show up in Itemlist on the "manage_main" page. So I
> cannot edit the items that I have added.
> 
> I only get the:
> "There are currently no items in XXX"

some more information on what you changed in the container would be
useful.

> Why is this? is there any special methods or something that I need to create
> for the Items to show up in "objectItems".

this pseudo code should give you the result you want?, it works for me
to display objects in the manage_main. 


def manage_addMyContainer:
foo = MyContainer()
bar = MyObject()

foo._setObject(bar, 'bar')

self._setObject(foo, 'foo')

caveat, register your permissions properly on the manage_add, and note
that adding bar in this way will mean it won't have access to
acquisition properties from further up the tree at creation (including
manage_afterAdd).

also for registering manage options this syntax is a little more
inclusive.

manage_options=(
OFS.ObjectManager.ObjectManager.manage_options+
(
{'label':'YourTabHere', 'action':'YourMethodHere'},
)+
AccessControl.Role.RoleManager.manage_options+
OFS.SimpleItem.SimpleItem.manage_options
)

hth

kapil

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




Re: [Zope] Displaying non-start values as the first batch seen in a batchprocessing dtml-inprocessing dtml-in

2000-10-26 Thread Ender

Chris Beaumont wrote:
> 
> Hello,
> 
>   I'm using dtml-in to display a long list of events taken from a SQL
> table, as part of a calendar, using batch processing,
> (basically the example from the DTML reference adapted to use direct
> traversal to fetch the table contents)
> 
> I want my calendar to be basically a timeline, with the current date as
> the default starting point. The idea is that someone can go back in time
> as well as forward. (links for past events as well as future)
> 
> So, basically, I'm looking for a not-too-convoluted (i.e. decent
> performance) way to have the 'default' screen on entry be the batch that
> contains the item whose datetime value is the next one occurring after
> the current time. Dtml-in doesn't seem to have a straightforward way to
> do this, unless I'm overlooking something obvious.
> 
>  Does a solution to this occur to anyone?


do it in sql, this is pretty database dependent, but the ideal way to me
would be just 

where event_date > 

and just adjust your dtml to call the method with a date arguement.

you probably need to use your db's string->date functions to convert the
value for comparisions.

i think this would offer the best performance, and least code.

cheers

kapil

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




Re: [Zope] which python gets used ... ?

2000-10-26 Thread Ender

Jonathan Cheyne wrote:
> 
> Hi, just a quickie idiot question ..
> 
> Does zope use any of the python on my RH6.2 box or does it use its own
> copy exclusively?
> 
> I was trying to install the python xml libraries to try our the hyperdom
> product. I installed an rpm succesfully before remembering that zope has
> its own python.
only on windows...

> I struggled to install a tgz version though and it
> struck me that I was probably not being as efficient as I could be ...
> 
> So the question is: can I run zope using the stock RH6.2 distributions'
> own copy of python?

check if it has threads

try:
import threading
except:
print "this won't work"
import sys;sys.exit()
print "you can use this python"


if not normally a python install is as simple as

./configure --with-threads
make
su
make install

you might need to switch your path if you've got both pythons on your
system as most 
will put /usr/bin before /usr/local/bin

you can check which one your using with:: which python

to fix it in bash :: export PATH=/usr/local/bin:$PATH

cheers

kapil

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




Re: [Zope] Reverse SendMail Question

2000-10-26 Thread Ender

[EMAIL PROTECTED] wrote:
> 
> Has anyone thought of using SendMail (or any other e-mail program) to send
> e-mail to Zope and have that e-mail be loaded directly into a specific folder
> (say, based on the e-mail address or subject line)?
> 
> This would be handy to keep track of e-mail.  All the person would have to do is
> cc the project and all the e-mail could be viewed centrally.
> 
> Any ideas?
> 
> Ron
>  ./.

(IMO) its not to hard to write a cronn'd python client to retrieve
emails sent to an email addr from a pop/imap server and drop them into
zope via xml-rpc. i wrote something like this for my first zope
contract, dropping the emails into a CatalogAware ZClass, and offering
searches of the projects archives via ZCatalog. i believe ZMailin does
something like this. 

kapil

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




Re: [Zope] Not grocking RESQUEST.set syntax

2000-10-25 Thread Ender

Noah wrote:
> 
> I'm still not grocking the syntax for setting REQUEST fields.
> I want to set a REQUEST field "filename" to be the value returned
> by a ZSQL call. I want something like this (pseudo-code of what I want):
> 
> 
> 
> 
> 
> 
> That does not work because FOO gets set to something like:
> 
> I tried sticking this inside  to get
> at the sequence-item, but I just ended up getting confused.

thats because you're working on the results returned by a zsql method
which is a result object, you want access to values within it.

try




this returns the list of dictionaries that represent rows in the table,
with column names as keys and column values as values.

you can reference
lib/python/Shared/DC/ZRDB/Results.py
for more info on the results object


kapil

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




Re: [Zope] Python product - inherittance

2000-10-25 Thread Ender

Petr Knapek wrote:
> 
> Hi Zopists,
> I have a problem with inherittance of my publishable python classes.
> I created in python
> 
> classA and classB(classA)
> 
> classA has functionA and classB has functionB. In __init__.py of my
> product I register only classB.
> 
> My problem is that it is not possible to call functionA of an instance
> of classB. There is 'Error Type: AttributeError'. Does anybody know
> where the problem is? I use Zope 2.1.6


its probably a security error.

you need to either enable subobject access or explicitly register the
method as part of the products permissions.

something like this
allow_access_to_unprotected_subobjects=1

this is not the recommended way to it as you'll open up the entire
product to access.
buts it useful to identify if its a security issue.

kapil



> Thanks, Petr
> --
> Petr Knápek
> NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic
> e-mail: [EMAIL PROTECTED]
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] using a dictionary returned from an external method

2000-10-24 Thread Ender

Matthew Wilbert wrote:
> 
> I have some DTML that needs to call an external method that returns a dictionary.  I 
>don't have any problem referencing the resulting dictionary by doing something like
> 
> 
> 

> .
>  .
> 
> However, I need to do this for several keys, and I don't
> want to call externalMethod several times.  Is there a
> way to assign the method result to another variable, or
> is it possible that DTML is smart enough not to do the
> call multiple times?  Or is there some other approach
> that I am not even thinking of?





i know dtml will cache results on the same method call in a single
request which generally makes it efficient to do stuff like




cheap skate;)


and i'm guessing the same should apply to external methods.

kapil

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




Re: [Zope] Modifiable local variables

2000-10-24 Thread Ender

Sean McGrath wrote:
> 
> Hello all,
> 
> I am trying to use the DTML engine outside of Zope, and would like to be
> able to create local variables in my DTML documents. Because I have no
> access to Zope, I can't do REQUEST.set, nor can I use the method shown on
> http://www.zope.org/Members/Duncan/LocalVars. So, the questions is, what is
> the recommended way to create modifiable variables using DTML, without
> using Zope?
> 
> Thanks in advance


i've used dtml outside of zope, but i tend to pass it most of the
variables it needs and let it do the rendering. 

you should be able to pass an empty dict to the dtml as the mapping
arguement and set variables inside of that, although you might have to
wrap it with attributing setting methods so that it can be used from
dtml. or you can use a dtml-let clause to create the proper variables.






long live the pyxies:)

kapil

> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] One last request

2000-10-23 Thread Ender

Taco Scargo wrote:
> 
> I have one unsolved mystery left. What I am trying to do is print the titles
> from the DTML Documents in the 'artikelen' folder (and actually another
> property called 'inleiding'. I believe the code below should do this, but it
> does not work. It returns 'Zope' instead of the title. If I use the
> 'inleiding' property it reports that it does not exist. If I just use
> sequence-item it returns the complete item ok.
> 
> Any clues ?
> 
> Thanks,
> 
> Taco
> 
> http://www.gezondheidskrant.nl:8080/mainframe :
> 
> 
> 
> 
> 
> 
> 
>
>
>
>
> 
> 
> 


try this instead







kapil

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




Re: [Zope] Looking for short term Zope contractor

2000-10-23 Thread Ender

Doh!,

i've gotten far to use to hitting reply all on my emails:)

kapil

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




Re: [Zope] Looking for short term Zope contractor

2000-10-23 Thread Ender

Hello,

i'm an experienced zope/acs developer in Pasadena,CA. my resume to
follow. 

Cheers

Kapil

Kapil Thangavelu

Contact Information:

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://lostworld.imeme.net
http://sindev.dhs.org


2445 E. Del Mar 
Apartment 238
Pasadena, CA 91107

(626) 405-9877 (home)


Objective:

To obtain a challenging position in which I can use
my experience in creating community based web applications.

Desired Job:
Full-Time Employee

Preferred Site Location:
Pasadena, CA

Education:

College of William & Mary
BS in Computer Science & History
Graduated May 2000

Professional Skills:
Areas of Expertise:
- very skilled in Python, C, HTML, JavaScript
- very skilled in Zope, Open Source Web Application
Server and
  Oracle/ACS4/Aolserver
- skilled in Java, Perl, C++, XML, TCL/TK
- well-versed in underlying Internet Protocols:
 HTTP(S), TCP/IP, DNS/BIND, DHCP, SMTP, IMAP, POP

Areas of Proficiency:   
- Strong Knowledge of Linux Kernel, multi-threaded
programming,
process management
- RDBMS Design and SQL (PostGresSQL, ORACLE)
- Skilled in Systems Adminstration - Redhat, Mandrake,
Suse
- Knowledgable of different Web Application Platforms:
  Enhydra, Servlets, Apache, AOLServer/ACS, Midguard


Work Experience:

OpenSource Developer - July - August 2000

Developing OpenSource Zope/Python Products. Product releases
include
a Mailman (www.list.org) search/archive, and a NewsSyndication
Product
based on RSS/OCS.

BootCamp - ArsDigita.com - June - July 2000

Participated in the ArsDigita bootcamp. Acquired skills in
Aolserver,
Oracle, Tcl scripting and the ACS community system.

Web Application Developer - ASTi February 2000 - May 2000

Hired by ASTi, member of the Python Consortium, to implement
a prototype of their corporate intranet, designed to manage
project workflow and production. Technologies used
Zope/XML/Python/SQL.

I talked with ASTi employees regarding site requirements and
project
management. I designed and implemented a working prototype to
fufill 
those requirements and the workflow guidelines I was given.
After the 
prototype was build, I turned over the project to their web
master, and
educated him regardings its construction and extensibility.

Some of the things that I designed and implemented and
integrated with
the corporate intranet.

* RDBMS schema for ASTi's parts and production components as
well
as installation and setup of RDBMS (PostgreSQL)

* A validating xml-parser/dom interface for ASTi's internal
project parts.
The Product created subvendor orders based on a customer's
product
spec/purchase order.

* A searchable email archive for communications between ASTi's
sales
engineer and clients.

* A flexible user system, to allow for automatic messaging for
various
phases of workflow and presentation of intranet menus based on
user
roles.



Director of Development - Information Technology @ College of William &
Mary
Fall 1999 - May 2000

www.sin.wm.edu

Selected to be the architect of the next generation Student
Information 
Network at the College, an information portal for students. I
investigated
various Web Application Platforms, before settling on Zope,
Python , and
PostgreSQL, to replace an aging code-base of mod_perl scripts.
Taught
the developers about Zope Architecture and Python and lead them
in
designing and implementing a new functionality and
reimplementation.
Designed and Implemented Session Management(cookie-less), IMAP 
authentication, Team Web Site for Distrvuted Development, 
Online Rideboard, Message Board, Housing Market, Local Jobs.
Choice
of tools, technology, and design/implementation focused on easy
maintenance,
rapid development, and extensibility.


Skills Acquired

- Management of the Software Life Cycle
- Object Oriented esign
- Team Managment

Field Consultant - Technology Support Center @ College of William & mary
Summer 1999 - Spring 2000

Assisted in training of on-call support specialist. Made field
visits 
to various problem sites doing network troubleshooting (DHCP,
SMB, TCP/IP),
operating systems troubleshooting (Linux, WIN98), and
application 
troubleshooting (Email Clients, MS Office).

HTML -PERL/CGI Developer - Information Technology @ College of William &
Mary
Spring 1998- Spring 1999

Designed and Implemented Entertainment Sectio

Re: [Zope] HELP! Permissions problem, ZClass

2000-10-22 Thread Ender

trying giving anonymous proxy roles on the actual add method.



Eric Walstad wrote:
> 
> Help, pls! I have a ZClass that is functioning beautifully if I am logged
> in, but the anonymous user keeps getting prompted for a password.  The
> problem occurs when my DTML method trys to  create a new instance of the
> ZClass.  I tried giving that DTML method a Proxy of "Manager" but that isn't
> helping.
> 
> Any pointers?
> 
> Thanks,
> 
> Eric.
> 
> Here's the traceback:
> Zope Error
> 
>  Zope has encountered an error while publishing this resource.
> 
>  Unauthorized
> 
>  You are not authorized to access CNewsItem.
> 
>  Traceback (innermost last):
>File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
> 222, in publish_module
>File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
> 187, in publish
>File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
> 171, in publish
>File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
>  (Object: buildNews)
>File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line
> 112, in call_object
>  (Object: buildNews)
>File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 172,
> in __call__
>  (Object: buildNews)
>File
> /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
> __call__
>  (Object: buildNews)
>File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
> line 146, in render
>  (Object: manage_addProduct['NewsItem'])
>File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
> line 337, in eval
>  (Object: CNewsItem_add(_.None, _, NoRedir=1))
>  (Info: _)
>File , line 0, in ?
>File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 168,
> in __call__
>  (Object: CNewsItem_add)
>File
> /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 528, in
> __call__
>  (Object: CNewsItem_add)
>File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py,
> line 133, in render
>  (Object: CNewsItem.createInObjectManager(REQUEST['id'],
> REQUEST))
>File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py,
> line 331, in eval
>  (Object: CNewsItem.createInObjectManager(REQUEST['id'],
> REQUEST))
>  (Info: CNewsItem)
>File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 194,
> in validate
>  (Object: buildNews)
>File
> /usr/local/Zope/lib/python/AccessControl/SecurityManager.py, line 139, in
> validate
>File
> /usr/local/Zope/lib/python/AccessControl/ZopeSecurityPolicy.py, line 209, in
> validate
>  Unauthorized: (see above)
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Problems with sequence-item

2000-10-22 Thread Ender

I thought at first this might be a permission problem, but after
browsing around the site. i'm pretty sure its a calling issue. its hard
to say for sure given the lack of details.

Taco, i'm pretty sure your objectValues on the addressen folder to fill
in to fill in the addresses of the artiklen document. zope renders these
subtemplates slightly differently than a template called directly by the
browser, when you're calling the addressen subobject from the document
call it like this



or in a 






if that doesn't solve it for you, than it would be helpful to have the
relevant src of the document. i tried without success to duplicate the
exact same error, but i'm pretty sure that the problem has something to
do with this.


Kapil



Taco Scargo wrote:
> 
> Please feel free to look at it at
> 
> http://www.gezondheidskrant.nl:8080/mainframe
> 
> Taco
> - Original Message -
> From: "Curtis Maloney" <[EMAIL PROTECTED]>
> To: "Taco Scargo" <[EMAIL PROTECTED]>; "Mark N. Gibson" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Sunday, October 22, 2000 6:57 PM
> Subject: Re: [Zope] Problems with sequence-item
> > Any chance you could post the WHOLE traceback, so we might be able to see
> > which object it's choking on?
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Creating Object

2000-10-22 Thread Ender

Salvatore DIDIO wrote:
> 
> Hello,
> 
> I am new to Zope
> I've just installed Zope on Linux. I just can't create any object !.
> I receive the following message :
> the object can not be owned by the superuser
> (line 217 in file Owned.py)
> Could someone help me ?
> 
> Thank you very much

i feel for you, in zope 2.2 and above the initial account, the
superuser, isn't allowed to create/own objects. 

what you're supposed to do is create a new user in the acl_users of the
root directory which will be your first working account.

after you create a user in acl_users, logout by shutting down the
browser and than try logging into the system with a new browser.

you can escape shutting down the browser by editing one of the existing
methods to have this section of code. when asked to reauthenticate type
in the name of the new user. than click cancel and reload the /manage
page, you should be able to login as the new user.


Log out


Cheers 

Kapil

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




Re: [Zope] Multiple queries in a ZSQL method?

2000-10-22 Thread Ender

multiple non-select statements (max 1 select) are done through the use
of



kapil

Noah wrote:
> 
> Hi,
> 
> I'm using MySQL.  I need to have a ZSQL Method that does an insert and a select in 
>one call.
> After I do an insert I need to check the LAST_INSERT_ID to get the primary key of the
> record that I just inserted. Something like this:
> 
> insert into author
> (id, name, sort_name, email, bio, initials)
> values
> (null,
> ,
> ,
> ,
> ,
> );
> 
> select LAST_INSERT_ID();
> 
> If I put this into two different methods then I'm afraid that I will have some
> threading problems due to the fact that another client might come in and
> do an insert using the database connection I was using. LAST_INSERT_ID
> is safe as long as you have an unshared connection. Zope does
> connection pooling, so I worry that using two separate ZSQL Methods
> may not always work. And WILL NOT work if Zope gives me a different connection
> for the second ZSQL call.
> 
> Is there a better way to do this?
> 
> Yours,
> Noah
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Strings, Names and dtml-var

2000-10-21 Thread Ender

[EMAIL PROTECTED] wrote:

tested






> 
> Ok, Being fairly new at Zope, I am really confused, I think I have
> looked through all the FAQs, How to's, examples, and what ever, but
> I still can not get the right combination to get this to work (many
> combinations tried :-)...). The basic intent is to easily change a
> property "color_source" in a directory that will cause the "color1"
> property to be looked up from a different directory. The directory
> name "default" could be one of many that holds different color
> themes. Thanks in advance.
> ***Code
> This does not work: get_color method
> 
>
> 
> This works:
>  which renders #FF
> ***Key
> get_color = a method, /Business/Base/get_color
> color_selection = a property in the current directory containing
> the string "default" without quotes
> Colors = a folder, /Business/Colors
> default = a folder, /Business/Colors/default
> color1 = is a property under default containing the string
> "#FF" without quotes
> Zope = 2.2.2
> OS = Win98
> ***Error Message
> Error Type: KeyError
> Error Value: Colors.default.color1
> 
> Troubleshooting Suggestions
> This resource may be trying to reference a nonexistent object
> or variable Colors.default.color1.
> The URL may be incorrect.
> The parameters passed to this resource may be incorrect.
> A resource that this resource relies on may be encountering
> an error.
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Want to access ZClass Instance from external program

2000-10-18 Thread Ender

Sorry Jon, i've lead you down a slippery slope...

unlike ttw dtml-methods and the rest of zope which relies on the
security context soley, for a filesys python method to be exposed
through the web via xml-rpc it must have a doc string as well as have
proper credentials.

looking through propertysheets there is no 'proper' way to do this...
but i lead you down the path, so here is a way back out... 

there are a couple of options.

the easiest is to have dtml_method for this zclass that functions as a
helper method, 
like

dtml method -- external_helper



and in the client

x = root.subfolder.zclass.external_helper()
meta_info=eval(x)
print meta_info
({'id': 'vvv', 'type': 'int', 'meta': {}, 'mode': 'w'}, {'id': 'aaa',
'type': 'lines', 'meta': {}, 'mode': 'w'}, {'id': '', 'type':
'tokens', 'meta': {}, 'mode': 'w'}, {'id': '122', 'type': 'date',
'meta': {}, 'mode': 'w'}, {'id': 'ff', 'type': 'float', 'meta': {},
'mode': 'w'}, {'id': '>>', 'type': 'text', 'meta': {}, 'mode': 'w'})

or if external_helper returned propertyItems()

[('vvv', 1), ('aaa', ['']), ('', ['ss', 'aa1113', '3', '4']),
('122', DateTime('1900/01/01')), ('ff', 455.0), ('>>', '')]


if you're working with DateTime values in your propertysheets this will
be trickier as you'll need to either retrieve the property you want
independently or import Zope's DateTime module. also remember to set the
security on the helper method so its not helping somebody hack your
site.

the rest of the ways are exercises in wasting time... IMO

hope that helps out

Cheers

Kapil

Jon Prettyman wrote:
> 
> Adding:
> try:
> for k in
> server.EBQ.id_company_apply_html.propertysheets.propertyIds():
> print "%-15s:" % (k)
> except Error, v:
> print server
> print "ERROR", v
> 
> Gives me output, although I'm pretty shure it's not the right thing.
> Output:
>title
>base
> 
> Both of these are properties of server.EBQ.
> 
> -jon
> 
> Ender <[EMAIL PROTECTED]> writes:
> 
> > Jon Prettyman wrote:
> > >
> > > Well, I've gotten xmlprclib and fixed it up so I can talk to my
> > > server.  So far I can retrieve objectIds and retrieve objects via an
> > > objectid, but I can't figure out how to get to the property sheets.
> > >
> > > Here's what I've got:
> > >
> > > server = Server( "http://jonprettyman.com" )
> > >
> > > print server
> > >
> > > for k,v in
> > > server.EBQ.id_company_apply_html.propertysheets.common.propertyItems():
> > > print "%-15s: %s" % (k, v)
> > > -jon
> >
> > hmmm...
> >
> > try and take it a step back and query the propertysheet container for
> >  names of propertysheets it contains. you'll need to check out the ZQR
> > for the syntax, i think its propertyIds().
> >
> >
> > you might also want to check that your authenticating with a user
> > that has the proper security roles to query this info.
> >
> >
> > if you're still having problems tell me and i'll play with it once i get
> > back from work.
> >
> > Cheers
> >
> > Kapil
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Want to access ZClass Instance from external program

2000-10-18 Thread Ender

Jon Prettyman wrote:
> 
> Well, I've gotten xmlprclib and fixed it up so I can talk to my
> server.  So far I can retrieve objectIds and retrieve objects via an
> objectid, but I can't figure out how to get to the property sheets.
> 
> Here's what I've got:
> 
> server = Server( "http://jonprettyman.com" )
> 
> print server
> 
> for k,v in
> server.EBQ.id_company_apply_html.propertysheets.common.propertyItems():
> print "%-15s: %s" % (k, v)
> 
> My ZClass has a propertysheet named ``common''
> 
> The error I get is:
>   -2 Unexpected Zope Error Value
> 
> and a bunch of HTML which boils down to:
> 
>Resource not found
> 
> -jon

hmmm...

try and take it a step back and query the propertysheet container for
 names of propertysheets it contains. you'll need to check out the ZQR 
for the syntax, i think its propertyIds().


you might also want to check that your authenticating with a user
that has the proper security roles to query this info. 


if you're still having problems tell me and i'll play with it once i get
back from work.

Cheers

Kapil

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