Re: [Zope] Logo Guidelines for Grok and Bluebream

2011-02-02 Thread Jan Ulrich Hasecke
Am 02.02.11 15:10, schrieb Andreas Jung:
> I suggest to ask Baju or ask on the Bluebream list.

I cannot find the bluebream list on gmane. I'll try the nabble gateway.
But it would be nice to have it on gmane too.

juh

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


Re: [Zope] Logo Guidelines for Grok and Bluebream

2011-02-02 Thread Jan Ulrich Hasecke
Am 02.02.11 15:03, schrieb Andreas Jung:

> There is no trademark on Grok or Bluebream owned by the ZF afaik.

ok.

>
> The creators of the logos may have rights on the graphics.

While I know the creator of the Grok logo, I don't know the creator of
the Bluebream-Logo. Any objections to use it in a Zope related brochure
edited by the german zope user group?

It would be nice to have guidelines on the websites.

-- 
Jan Ulrich Hasecke
DZUG e.V. (Deutschsprachige Zope User Group)

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


[Zope] Logo Guidelines for Grok and Bluebream

2011-02-02 Thread Jan Ulrich Hasecke
Hi all,

preparing a brochure about Zope and friends I would like to know whether
there are any guidelines for using the Grok- and Bluebream-Logo.

Am I right that neither Grok nor Bluebream are trademarks owned by the
Zope Foundation?

TIA

-- 
Jan Ulrich Hasecke
DZUG e.V. (Deutschsprachige Zope User Group)

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


[Zope] Zope FTP - OverflowError: requested number of bytes is more than a Python string can hold

2009-12-04 Thread Jan Schulze
Hi all,

I am are using ZServer/Medusa for FTP-Uploads to our ZODB. This works for 
smaller files, but the above error appears in instance.log, when using a ~5 GB 
file.

There's probably nothing I can do about it, as it's an internal python 
marshalling limit. Or would there be a way to make uploading big files work?


This is the complete error message from instance.log:

2009-12-04T12:34:49 ERROR Zope.SiteErrorLog 
http://0.0.0.0/Zope2/sara/data/RudSoil_vs_lssu_160807.rma/PUT
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module webdav.NullResource, line 167, in PUT
  Module Products.Archetypes.WebDAVSupport, line 116, in PUT
  Module Products.Archetypes.utils, line 160, in mapply
  Module Products.Marshall.marshaller, line 99, in demarshall
OverflowError: requested number of bytes is more than a Python string can hold
--
2009-12-04T12:34:57 ERROR ZServer uncaptured python exception, closing channel 
 
(socket.error:(9, 'Bad file descriptor') 
[/raid/opt/Python-2.4.6/lib/python2.4/asynchat.py|initiate_send|219] 
[/raid/opt/Python-2.4.6/lib/python2.4/asyncore.py|send|332] 
[/raid/opt/Python-2.4.6/lib/python2.4/socket.py|_dummy|136])



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


[Zope] Local File System Product

2009-10-22 Thread Jan Schulze
Hi all,

I have to upgrade a very old Zope/Plone site, that is using the "Local File 
System" Product (http://sourceforge.net/projects/localfs/). This Product has 
not seen any new release since 2002. Is there any successor Product or is it 
possible to use default Plone mechanisms to do what localfs does?

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


[Zope] Zotero Group about Zope

2009-07-22 Thread Jan Ulrich Hasecke

Hi there,

I just created a Zotero Group for Zope.
http://www.zotero.org/groups/zope

There is one about Plone as well
http://www.zotero.org/groups/plone

What is Zotero?


Zotero is a plugin for Firefox to automatically create bibliographies.

What is a Zotero Group?
===

If you join a Zotero Group you can collectively create and use a  
bibliography.


Why you should join and help
===

When you write an article or a paper about Zope or if you create a  
presentation about it, you often want to insert citations to prove  
your arguments or to give your reader further information.


Creating a bibliography all by yourself sucks. So let us crowdsource it!

If you want to try out Zotero, download it here:
http://www.zotero.org

I am using 2.0beta. I am not sure if you can share bibliographies with  
the stable version 1.0. Just try it.


Cheers!
juh

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


Re: [Zope] Installing Zope 3

2009-05-26 Thread Jan Ulrich Hasecke
I think that http://www.zope.org/Products/ should be updated. No  
chance for a newbie to find http://wiki.zope.org/zope3/Zope3Wiki


juh




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


[Zope] Installing Zope 3

2009-05-26 Thread Jan Ulrich Hasecke

Hi all!

What if I want to read Philipps book about Zope 3 – shall I download  
the Zope 3 tarball from zope.org 3.3.1 from 2007-01-14?


This looks pretty old and outdated.

Zopeproject does not install all packages that are needed for the  
examples in the book. Any hint how to install Zope, if you want to  
follow the book?


juh

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


Re: [Zope] I would like to join your group; my membership is pending approval

2008-03-25 Thread Herr Jan Ulrich Hasecke


Am 25.03.2008 um 10:07 schrieb Jan Ulrich Hasecke:

Hi there!



Ups sorry. This was a more or less automatic mail from linkedin.  
There is a zope community group and if you contact the group owner  
the mail goes to this list. I think this is not intended. Perhaps  
someone can change this in linkedin.


Soory again
juh

--
Business: hasecke.com
Private: hasecke.eu
Blog: www.sudelbuch.de
History: www.generationenprojekt.de
Europe: www.wikitution.org



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


[Zope] I would like to join your group; my membership is pending approval

2008-03-25 Thread Jan Ulrich Hasecke

Hi there!

--
DZUG e.V. (Deutschsprachige Zope User Group)
http://www.zope.de




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


Re: [Zope] Re: Zope Persistence (was: XML-RPC within ZOPE)

2005-12-18 Thread Jan-Ole Esleben
> Little bit tricky to try out as testers need to guess what all the
> missing code is.

Any standard persistent ZOPE product wrapped around this will do.
These are the only methods in a ZOPE product that inherits from Item,
Persistent, RoleManager and Implicit.

> Also, for this kind of code demonstration, rather
> than directions for commenting/uncommenting and relying on the tester
> to restart the server between trails, provide different methods or
> even different classes.

If I did that, people would say "somethings wrong with your testing"
and they would have to do a line-by-line comparison and still have
room to doubt my statement.

> But there is no extra transactional framework for XML-RPC clients
> (which your example has). Or for that matter acting as an XML-RPC
> server nested within some external transaction (which your example
> has).

I was initially talking about a more complex situation that has been
gradually simplified. ZOPE should be able to act as an XML-RPC client
to the outside world.

As to me not understanding what you all are saying: I believe I
understand, I know that theoretically - from a merely "technical"
viewpoint, it works, I just look at it from a different angle. Of
course you have to know a framework and its limitations, but this
error I stumbled upon strikes me as really complex (even though you
keep repeating it's very simple if you just acknowledge xyz), for
instance because the docs "aren't perfect" and say that
"You must explicitly signal any changes made to mutable attributes
(such as instances, lists, and dictionaries) or use persistent
versions of mutable objects, like ZODB.PersistentMapping (see below
for more information on PersistentMapping.)" - the _first_ option
being mutable attributes! Also, there is no "below".
I believe you when you say that it is really very simple and I
shouldn't have to worry if I follow the right principles, that you
then go on to state (principles that aren't really that explicit
anywhere - such as "don't use XML-RPC to talk to ZOPE from ZOPE" and
"don't use mutable subobjects at all"). However, this is a further bit
of distance between a ZOPE user and the Python he knows, and it also
isn't as true for complex situations with complex requirements that I
could probably just jot down in "dumber" frameworks such as RoR or
Django or TurboGears. Because I know without having to check myself
where I am designing Data, I explicitly _make_ changes (to the DB) and
am thus very aware of where complex interactions might occur etc. This
is probably one of those cases where no one is really "right" because
a mixture of viewpoints is involved, I feel a bit as if we were
talking about wether Lisp is better than Smalltalk. However, even if
it is only the docs that are lacking I think it would be sensible to
acknowledge that as a problem. It obviously was a problem for me, as
of course was the complexity of my setup and several other factors. I
am not an inexperienced programmer, so I would think that just because
other people rarely stumble upon it it is not an insignificant
problem. Imagine designing a large system based on some only
marginally false assumptions about ZOPE transactions, persistence and
XML-RPC interaction, and then running into this in a key component.

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


Re: [Zope] Re: Zope Persistence (was: XML-RPC within ZOPE)

2005-12-18 Thread Jan-Ole Esleben
> > 1. In the example, just setting _p_changed=1 does _not_ lead to a
> > conflict error. With the ineffectual code above it (that never gets
> > executed) it _does_. So there _is_ some implicit magical stuff going
> > on and ZOPE tries to take care that only subobjects change (but
> > incompletely)!
> I strongly doubt it. Zope does not "inspect code". There must be a
> problem in your testing. Note that if self.a is a standard list, the
> self.a.append(1) doesn't have any impact on the persistence mechanism or
> transactions either.

Please, try it out. Delete the if clause and the append in it.

> > 3. It is especially confusing that ZOPE behaves differently when using
> > XML-RPC calls. From what you say, it should be the same within the
> > ZOPE system as when using XML-RPC. It gets more complicated with
> > XML-RPC though!
> The successive XML-RPC call you describe provoke new transactions,
> surely you're aware of that? Whereas just calling a function of course
> doesn't.

I'm aware of that. But ZOPE offers XML-RPC and as there is nothing in
the documentation about such complex interactions. Also, I was
directly responding to what the previous poster had written.

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-18 Thread Jan-Ole Esleben
What you say is all perfectly true except:

1. In the example, just setting _p_changed=1 does _not_ lead to a
conflict error. With the ineffectual code above it (that never gets
executed) it _does_. So there _is_ some implicit magical stuff going
on and ZOPE tries to take care that only subobjects change (but
incompletely)!

2. You shouldn't use lists and dicts - it should say this "on the
front page". It is never really mentioned in any way that intuitively
leads to such problems as we are now talking about. It isn't very
obvious that things work like this when you look at the documentation,
and

3. It is especially confusing that ZOPE behaves differently when using
XML-RPC calls. From what you say, it should be the same within the
ZOPE system as when using XML-RPC. It gets more complicated with
XML-RPC though! All the stuff that you claim as being obvious really
isn't all that obvious. And of course, once you've been burned by
something like this and the confusion it engenders, you will only use
PersistentMapping etc., but I still don't know what _exactly_ to
expect from ZOPE in terms of behaviour with mutable objects that
aren't Persistent (because of the XML-RPC inconsistency and the
self._p_changed inconsistency both mentioned above).

Ole


2005/12/18, Lennart Regebro <[EMAIL PROTECTED]>:
> On 12/18/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > I know. This is just example code. Just imagine that both methods
> > change completely unrelated sets of data in addition to not changing
> > self.a.
>
> Well, yes, but since both a and also b is non-persistence aware lists,
> that means that you in fact change neither a or b, but self.
>
> If however, you do change unrelated sets of data, such as the
> persistence aware object self.a, and the persistance aware object
> self.b, then you do NOT get a conflict error.
>
> > Actually, I don't think we're getting anywhere with this same
> > dataset/different dataset distinction. It wouldn't happen in a
> > database using application because there would be no transaction for
> > "self.a". You see, nothing happens to it, so why would there be one?
>
> There isn't one in this case either, unless you set self._p_changed =
> 1, which you of course do...
>
> > This only happens when you mix your data with your code and have
> > implicit transactions handled by the server.
>
> There is no mixing of data and code going on, so we are definitely not
> going anywhere with TAHT distinction. ;-)
>
> > > Yes, sorry, having non-persistent aware dictionaries or arrays, and
> > > then complaining that you have problems with persitency...
> >
> > But that's part of my point: I need to go out of my way to circumvent
> > Python, and I need to be really careful, because using dicts and lists
> > might still work. Nothing is enforced, and where it breaks is hard to
> > predict.
>
> No, it's dead easy to predict, as soon as you understand that you
> should not modify non-persistent aware attributes, and expect that to
> work optimally. You may be right that doing that should raise an
> error, but I also don't exactly see how to make that happen.
>
> > > > See the example for some major implicitness.
>
> > > What is implicit with it?
> >
> > I explained this above. Transaction handling in Zope (someone else
> > pointed that out in this thread), Zope looking at the code to
> > determine that self.a has changed (which isn't really documented
> > anywhere obvious).
>
> I'm sorry, I still don't understand what implicitness you are talking about.
>
> > > It is obvious to me that you have misunderstood something. I don't
> > > know what yet, though.
> >
> > I think we might be misunderstanding each other because we both place
> > different value on implicitness and explicit design of data inside
> > code. I am mostly talking about what is, pragmatically, good
> > programming and a supportive environment.
>
> No, I think the misunderstanding is that you are overcomplicating
> something that is really quite simple. But I'm not sure.
>
> --
> Lennart Regebro, Nuxeo http://www.nuxeo.com/
> CPS Content Management http://www.cps-project.org/
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-18 Thread Jan-Ole Esleben
> > but it happens under rather magical circumstances.

That's my problem. Can you, from the ZOPE documentation, predict that
the example below will cause a ConflictError? It doesn't if you alter
it only slightly! Please try!

> >   security.declareProtected("Use TestPChanged", "test_internal")
> >   def test_internal(self, args=None, args2=None):
> > "Called by test via XML-RPC"
> > if args2:
> > self.a.append(1)
> > self._p_changed = 1
> > if not args:
> > import xmlrpclib
> > s = xmlrpclib.ServerProxy("http://USER:[EMAIL PROTECTED]:8080/",
> > allow_none=True)
> > s.TestPChanged.test_internal(1)
> > return self.a
> >
> >   security.declareProtected("Use TestPChanged", "test")
> >   def test(self, args2=None):
> > "Called directly via ZOPE"
> > if args2:
> > self.a.append(1)
> > self._p_changed = 1
> > import xmlrpclib
> > s = xmlrpclib.ServerProxy("http://USER:[EMAIL PROTECTED]:8080/",
> > allow_none=True)
> > return s.TPCDest.test_internal()

> I don't understand the question. I would like to point out that you
> set self._p_changed even when you don't change anything. :-)

I know. This is just example code. Just imagine that both methods
change completely unrelated sets of data in addition to not changing
self.a.

> It seems to me that you say that if you process calls test and another
> calls test_internal, you get a conflict error.

It doesn't really in most cases. And of course I can see now where it
does in this instance, but this is based on Zope looking at the code,
determining that self.a is changed before the _p_changed, and marking
the object tainted because of that.

> This is correct, and as
> noted before, that code would create a conflict in any type of
> environment. If you have two processes trying to modify the same
> dataset, which is what your example seems to do, then you get a
> conflict.
> What you claim, is that if you have two processes in Zope change two
> different datasets, you get a conflict. That statement is still false.

Actually, I don't think we're getting anywhere with this same
dataset/different dataset distinction. It wouldn't happen in a
database using application because there would be no transaction for
"self.a". You see, nothing happens to it, so why would there be one?
This only happens when you mix your data with your code and have
implicit transactions handled by the server.

> Yes, sorry, having non-persistent aware dictionaries or arrays, and
> then complaining that you have problems with persitency...

But that's part of my point: I need to go out of my way to circumvent
Python, and I need to be really careful, because using dicts and lists
might still work. Nothing is enforced, and where it breaks is hard to
predict.

> > See the example for some major implicitness.
> What is implicit with it?

I explained this above. Transaction handling in Zope (someone else
pointed that out in this thread), Zope looking at the code to
determine that self.a has changed (which isn't really documented
anywhere obvious).

> > > You claim that things get locked that shouldn't be locked in Zope. It
> > > is not clear to me why you say that.
> > See the example.
> I don't see how the example examplifies this.

I have tried to make it a little clearer in this message.

> It is obvious to me that you have misunderstood something. I don't
> know what yet, though.

I think we might be misunderstanding each other because we both place
different value on implicitness and explicit design of data inside
code. I am mostly talking about what is, pragmatically, good
programming and a supportive environment.

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-18 Thread Jan-Ole Esleben
> > To simplify, in ZOPE, for any given product, during a
> > transaction the product is effectively locked.
> This statement is incorrect.

You're right. It should be "during any transaction where there are
potential changes to the object". And I agree, it's actually a lot
more complicated than I'd thouht at first. What I describe can happen,
but it happens under rather magical circumstances. I have an example
where it actually happens; this is code from a product that is
instantiated twice, one of those instances called TPCDest, the other
TestPChanged; the method called directly is "TestPChanged.test()":

  security.declareProtected("Use TestPChanged", "test_internal")
  def test_internal(self, args=None, args2=None):
"Called by test via XML-RPC"
if args2:
self.a.append(1)
self._p_changed = 1
if not args:
import xmlrpclib
s = xmlrpclib.ServerProxy("http://USER:[EMAIL PROTECTED]:8080/",
allow_none=True)
s.TestPChanged.test_internal(1)
return self.a

  security.declareProtected("Use TestPChanged", "test")
  def test(self, args2=None):
"Called directly via ZOPE"
if args2:
self.a.append(1)
self._p_changed = 1
import xmlrpclib
s = xmlrpclib.ServerProxy("http://USER:[EMAIL PROTECTED]:8080/",
allow_none=True)
return s.TPCDest.test_internal()

Zope obviously looks at the code, because if you remove the "if args2"
(which is _never_ true), then a ConflictError happens.

Maybe I'm stupid, but could someone point out _where_ exactly I am?

> > No. It does happen, and it _did_ happen in my original problem. Zope
> > doesn't even care if anything actually changes, it just considers an
> > object changed that set self._p_changed=1.
> No, se above.

You're right that it doesn't always, but see my example.

> Yes. You said "different sets of data". That reasonably means
> different objects. If it doesn't, yuo need to take a long hard look at
> your object hierarchy.

Simply not true. What if I have a field titles (that is a hash of
titles to Book objects)
and a field comments (that is an array of comments on the library)? Is
that so obviously
not a sane example?

> > > > That's my whole point. I think it is a very
> > > > significant point nonetheless, because this is just an extreme case of
> > > > what happens when you couple data and programs, and persistent classes
> > > > are just that: application data inside program code.
> > > Eh, no they aren't.
> > Please don't just claim stuff.
> You do.

I don't. I at least try to give reasons wherever I make a statement
that could be challenged.

> > In ordinary systems, you would have to find a way to store the
> > data and retrieve it, thus having a model that isn't implicit and
> > entangled with your code.
> What is implicit with it?

See the example for some major implicitness. It's also implicit
because you have no control over what a transaction considers a
tainted object. (You have no real control over the transaction).

> If you have two different processes changing the same set of data, you
> will get confllict errors. You claim that you will not, but this is
> false.

I am explicitly talking about changing different sets of data within
the same object. You noted that above yourself.

> You claim that you can't control what a persistent class store. That is false.

I don't. I say that if I want to avoid such problems as I describe
altogether, I cannot store anything in a persistent class and thus
lose most of what makes ZOPE so interesting.

> You claim that the whole Zope product gets locked, that is false. It's
> on a object-basis, not a product basis.

I never said that, or at least I didn't mean it. If it sounded like
that, I apologize (maybe I used Product metonymically for instance
somewhere, which would not be a good idea, I agree).

> You claim that things get locked that shouldn't be locked in Zope. It
> is not clear to me why you say that.

See the example.

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-17 Thread Jan-Ole Esleben
> > > > That ZOPE raises an error is fine. That I _might_ run into such
> > > > situations with other tools is true.
> > > You *will* run into these problems in exactly the same cases in any other 
> > > tool.
> > I'm sorry, but that's just wrong, and I have given examples of such
> > situations. To simplify, in ZOPE, for any given product, during a
> > transaction the product is effectively locked. So if I have, say, a
> > list field that contains some data and a dictionary field that
> > contains some other data, and the "internal" call changes the dict
> > while the original call changes the list, that breaks the transaction,
> > while in usual situation in a database, nothing would break.
> This is wrong IMHO. dict and list are just columns of the same tuple
> if you speak RDBMS. And there are very few (if any?) databases
> which do locks only per column. In RDBMS you distribute in different
> tables to avoid such (e.g. normalize) in ZODB, you just make
> subclasses of Persistent for your subobjects. (Attributes)

I'm not saying that it absolutely can't be done, it is just very
difficult to do it right from the start because most of time you are
not even aware you are fiddling with the data model. This of course
isn't - I stressed that before - a problem for small scale
development. But if you do more complex stuff with ZOPE it's a bit
like going back to C - most of the mistakes in your design don't come
back to you until much later. However, unlike C, ZOPE is very high
level, and the problems stem from too much implicitness and too little
separation of said data and code. When you design your model, you know
that you are designing data and you handle those data as data
explicitly. When you add a field to your class, you have to explicitly
check yourself. And of course you could now answer "You should be
doing that anyway" and that nothing hppens in perfectly designed code
etc., but that's just not how it really works. You should be able to
design stuff incrementally with a little experimentation along the way
without constantly impending danger of it all crashing down on you.
That's how Python works, and RoR etc. In ZOPE, we're back to the
temptation to "just stuff a bunch of data into my object". And it's
not even obvious that this is a problem, because everything is so
tightly interdependent. It's exactly what Python usually avoids
("explicit is better than implicit").

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-17 Thread Jan-Ole Esleben
> > That ZOPE raises an error is fine. That I _might_ run into such
> > situations with other tools is true.
> You *will* run into these problems in exactly the same cases in any other 
> tool.

I'm sorry, but that's just wrong, and I have given examples of such
situations. To simplify, in ZOPE, for any given product, during a
transaction the product is effectively locked. So if I have, say, a
list field that contains some data and a dictionary field that
contains some other data, and the "internal" call changes the dict
while the original call changes the list, that breaks the transaction,
while in usual situation in a database, nothing would break.

> > But in ZOPE, it is definitely the
> > case that data and program are coupled in an implicit way that makes
> > these cases much harder to debug and avoid, because if the two methods
> > in my example operate on different sets of data, which they probably
> > would, or if one of them did a read before calling the external method
> > and then afterwards a write (on an SQL database maybe), nothing would
> > happen if I used explicit data storage!
> It will not happen i Zope in this case either.

No. It does happen, and it _did_ happen in my original problem. Zope
doesn't even care if anything actually changes, it just considers an
object changed that set self._p_changed=1.

> > In Zope, it's just the whole object that's tainted.
> You just said "different sets of data". That reasonably must mean
> different objects, unless you envision having huge objects with only
> marginally connected sets of data all stored as attributes. And then
> you have other problems. :-)

No. An object usually binds together different sets of data (as in the
above example - it has several fields, and that is true for almost any
given object). What you are saying is "don't program the ZOPE way",
and it would eventually lead to the conclusion that your product
classes should not have any persistent data, which is the conclusion I
have come to.

> > That's my whole point. I think it is a very
> > significant point nonetheless, because this is just an extreme case of
> > what happens when you couple data and programs, and persistent classes
> > are just that: application data inside program code.
> Eh, no they aren't.

Please don't just claim stuff. ZOPE has persistent classes. Persistent
classes store data that in ordinary programs would not survive as
long. In ordinary systems, you would have to find a way to store the
data and retrieve it, thus having a model that isn't implicit and
entangled with your code. Of course, you could do the same in ZOPE,
but I addressed that above, and you could mess up ordinary code, but I
think we're agreed that it is not something you should aim for (and I
think I have made it clear why I do not believe it's as easy to mess
up generic Python code in this way).

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-17 Thread Jan-Ole Esleben
That ZOPE raises an error is fine. That I _might_ run into such
situations with other tools is true. But in ZOPE, it is definitely the
case that data and program are coupled in an implicit way that makes
these cases much harder to debug and avoid, because if the two methods
in my example operate on different sets of data, which they probably
would, or if one of them did a read before calling the external method
and then afterwards a write (on an SQL database maybe), nothing would
happen if I used explicit data storage! In Zope, it's just the whole
object that's tainted. That's my whole point. I think it is a very
significant point nonetheless, because this is just an extreme case of
what happens when you couple data and programs, and persistent classes
are just that: application data inside program code. This had never
occured to me as a _real_ problem before. Of course, if you just
create self contained code on a small scale that doesn't talk to other
programs on the web, you'll likely not run into any great problems
because of this.

Ole


2005/12/17, Lennart Regebro <[EMAIL PROTECTED]>:
> On 12/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > It's not about the threads or processes being tied up and waiting,
> > it's about the transaction breaking: because the internal call (the
> > one from the second server back to the first) changes the object on
> > the first server, and thus when the first server checks wether the
> > object has changed after the transaction should close (during the last
> > return), it finds that indeed it has, and before it could write to it,
> > so it raises a conflict error invariably.
>
> This is still not a problem that has anything to do with Zope or
> persistenace, but it is quite simply just a conflict error. It will
> happen anywhere you do things like this.
>
> It will also only happen when you, in the processor of modifying an
> object, calls a method on another server, which, before that call
> finishes, makes a call back and modifies the *same* object.
>
> I can't currently dream up any scenario where this happens, but I'm
> happy that Zope raises an error when it does. A system that does NOT
> raise an error in this situation is broken. If you get problems like
> this, you need to make changes to the software so that this does not
> happen. The right way to do that depends on your application.
>
> --
> Lennart Regebro, Nuxeo http://www.nuxeo.com/
> CPS Content Management http://www.cps-project.org/
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-16 Thread Jan-Ole Esleben
It's not about the threads or processes being tied up and waiting,
it's about the transaction breaking: because the internal call (the
one from the second server back to the first) changes the object on
the first server, and thus when the first server checks wether the
object has changed after the transaction should close (during the last
return), it finds that indeed it has, and before it could write to it,
so it raises a conflict error invariably.

Ole


2005/12/17, Chris McDonough <[EMAIL PROTECTED]>:
> > The problem setup is this; I explained it above, but it this has
> > become a long thread:
> >
> > I write a ZOPE product. I want to make use of other software on the
> > internet and the services that software provides. So I use the methods
> > exposed by that software via SOAP, XML-RPC, whatever.
> >
> > One of those methods actually calls my product back, maybe because the
> > developer has learned that my product itself exposes some (or all) of
> > its functionality via XML-RPC. If this is all inside one call, which I
> > can't avoid explicitly as the developer of just my product, I have a
> > broken transaction on my hands that isn't easy to fix (and maybe
> > impossible). This holds true for the whole product, even if the method
> > called by the second server changed some completely unrelated data.
>
> I see what you're saying, but how is this specific to Zope?  If you
> write a Perl program and expose it via mod_perl on Apache, and the
> program calls out to a service that calls back in to the mod_perl
> program (no matter how broken of a pattern this was), wouldn't the
> Apache process that was waiting on data be tied up in the same way?
>
> - C
>
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-16 Thread Jan-Ole Esleben
> >> I don't understand the problem.  How is using XML-RPC incompatible
> >> with persistence?  What are you trying to exclude?
> > I'm sorry, but I don't understand _that_ question. What am I trying to
> > _exclude_?
> You said:
> """ it would most certainly be extremely hard to foresee the exact
> setup of such situations and impossible to exclude them """

That's probably an idiomatic error on my part, sorry. I meant "avoid"
(in German, it's the same word).

> AFAICT, people have told you to not use XML-RPC here and when you
> said it was not possible to avoid the use of XML-RPC, they provided
> suggestion about how to accomplish what you wanted anyway.  So I'm
> not sure what the exact problem is.

The problem is a different one now, and I was referring to the
_reasons_ people had for telling me not to use XML-RPC. Part of the
problem I have now is that no application on the web is isolated from
others, and that ZOPE specifically _comes_ with XML-RPC capabilities
on the server's part.

> > My point is: this doesn't happen _within_ single "programs", but
> > everywhere there is even the slightest bit of communication there is a
> > chance of it happening.
> The chance of what happening, sorry?  I'm still trying to understand
> the problem.  The only problem that was noted so far was a deadlock
> potential by Dieter which presumed you were doing XML-RPC requests to
> the same system which accepts them.  This is an unusual thing to do;
> it wouldn't happen under "normal" circumstances.

The problem setup is this; I explained it above, but it this has
become a long thread:

I write a ZOPE product. I want to make use of other software on the
internet and the services that software provides. So I use the methods
exposed by that software via SOAP, XML-RPC, whatever.

One of those methods actually calls my product back, maybe because the
developer has learned that my product itself exposes some (or all) of
its functionality via XML-RPC. If this is all inside one call, which I
can't avoid explicitly as the developer of just my product, I have a
broken transaction on my hands that isn't easy to fix (and maybe
impossible). This holds true for the whole product, even if the method
called by the second server changed some completely unrelated data.

I hope that clears it up a little.

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


Re: [Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-16 Thread Jan-Ole Esleben
> I don't understand the problem.  How is using XML-RPC incompatible
> with persistence?  What are you trying to exclude?

I'm sorry, but I don't understand _that_ question. What am I trying to
_exclude_?

XML-RPC and (the concept of) persistence aren't incompatible. XML-RPC
(on a ZOPE server) and ZOPE persistence are, to the extent described
by others in this thread, not by me. I just described a couple more
cases (and specifically one case) where it is bad that things are this
way (and cannot be solved by better design).

My point is: this doesn't happen _within_ single "programs", but
everywhere there is even the slightest bit of communication there is a
chance of it happening.

Ole



>
> - C
>
>
> On Dec 16, 2005, at 6:40 AM, Jan-Ole Esleben wrote:
>
> > Thanks; this is a problem we are well aware of. Our solution is to
> > increase the amount of workers, obviously.
> >
> > However, I'm increasingly getting a feeling that for a rather big
> > range of unlikely situations that are nonetheless to be expected, Zope
> > doesn't work _at all_. In a WebServices setting, situations like the
> > one I described, with one server calling back to another server within
> > a call from that latter server and both not knowing anything about the
> > implementation of the other, it would most certainly be extremely hard
> > to foresee the exact setup of such situations and impossible to
> > exclude them for persistent objects that actually _do_ change state
> > (unlike mine). The solution is to not have state in your objects, and
> > thus lose instantly most of what Zope is.
> >
> > However, as I see it, the problem is that what Zope actually _is_
> > (i.e. mostly the ZODB) is an unhealthy way of coupling data and
> > implementation (which is _exactly_ why my implementation didn't work
> > immediately). This of course comes from its origins in TTW development
> > where there wouldn't actually have been many user made products.
> >
> > Please tell me if I'm wrong with my assumption above, and why. I'm not
> > trying to be inflamatory, this just has me really worried.
> >
> > Ole
> >
> >
> > 2005/12/15, Dieter Maurer <[EMAIL PROTECTED]>:
> >> Jan-Ole Esleben wrote at 2005-12-11 19:10 +0100:
> >>> Is it at all impossible to use XML-RPC _within_ a ZOPE architecture?
> >>
> >> In principle yes.
> >>
> >> Be careful however: it is easy to introduce deadlocks!
> >>
> >>   When during request processing you call back into the same
> >>   Zope via XML-RPC, the calling out request will not complete
> >>   until the XML-RPC returns a result (this always holds for
> >>   calls, XML-RPC or other, to an external or internal server).
> >>
> >>   Zope has a limited amount of workers (the default is 4) able
> >>   to execute requests. If there are no free workers, requests
> >>   have to wait for one.
> >>
> >>   Now imagine that as many requests arrive as there are workers
> >>   and each of them wants to perform an XML-RPC against the
> >>   same Zope. Then you have a deadlock: none of the XML-RPC requests
> >>   will finish, because there are no free workers. An no worker
> >>   will ever become free again, because each of them waits for
> >>   its XML-RPC to finish.
> >>
> >> Therefore, you should directly call internal resources (rather
> >> than use XML-RPC).
> >>
> >>
> >> --
> >> Dieter
> >>
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
>
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Zope Persistence (was: XML-RPC within ZOPE)

2005-12-16 Thread Jan-Ole Esleben
Thanks, I will definitely look into that for my immediate problems.

Ole

2005/12/16, Michael Haubenwallner <[EMAIL PROTECTED]>:
> Jan-Ole Esleben wrote:
>
> > Thanks; this is a problem we are well aware of. Our solution is to
> > increase the amount of workers, obviously.
> >
> > However, I'm increasingly getting a feeling that for a rather big
> > range of unlikely situations that are nonetheless to be expected, Zope
> > doesn't work _at all_. In a WebServices setting, situations like the
> > one I described, with one server calling back to another server within
> > a call from that latter server and both not knowing anything about the
> > implementation of the other, it would most certainly be extremely hard
> > to foresee the exact setup of such situations and impossible to
> > exclude them for persistent objects that actually _do_ change state
> > (unlike mine). The solution is to not have state in your objects, and
> > thus lose instantly most of what Zope is.
> >
> > However, as I see it, the problem is that what Zope actually _is_
> > (i.e. mostly the ZODB) is an unhealthy way of coupling data and
> > implementation (which is _exactly_ why my implementation didn't work
> > immediately). This of course comes from its origins in TTW development
> > where there wouldn't actually have been many user made products.
> >
> > Please tell me if I'm wrong with my assumption above, and why. I'm not
> > trying to be inflamatory, this just has me really worried.
> >
> > Ole
> >
>
> You could try XMLRPCMethod.
> It creates its own worker thread and has a configurable timeout.
>
> Michael
>
> [1] http://www.zope.org/Members/EIONET/XMLRPC
>
> --
> http://zope.org/Members/d2m
> http://planetzope.org
>
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope Persistence (was: XML-RPC within ZOPE)

2005-12-16 Thread Jan-Ole Esleben
Thanks; this is a problem we are well aware of. Our solution is to
increase the amount of workers, obviously.

However, I'm increasingly getting a feeling that for a rather big
range of unlikely situations that are nonetheless to be expected, Zope
doesn't work _at all_. In a WebServices setting, situations like the
one I described, with one server calling back to another server within
a call from that latter server and both not knowing anything about the
implementation of the other, it would most certainly be extremely hard
to foresee the exact setup of such situations and impossible to
exclude them for persistent objects that actually _do_ change state
(unlike mine). The solution is to not have state in your objects, and
thus lose instantly most of what Zope is.

However, as I see it, the problem is that what Zope actually _is_
(i.e. mostly the ZODB) is an unhealthy way of coupling data and
implementation (which is _exactly_ why my implementation didn't work
immediately). This of course comes from its origins in TTW development
where there wouldn't actually have been many user made products.

Please tell me if I'm wrong with my assumption above, and why. I'm not
trying to be inflamatory, this just has me really worried.

Ole


2005/12/15, Dieter Maurer <[EMAIL PROTECTED]>:
> Jan-Ole Esleben wrote at 2005-12-11 19:10 +0100:
> >Is it at all impossible to use XML-RPC _within_ a ZOPE architecture?
>
> In principle yes.
>
> Be careful however: it is easy to introduce deadlocks!
>
>   When during request processing you call back into the same
>   Zope via XML-RPC, the calling out request will not complete
>   until the XML-RPC returns a result (this always holds for
>   calls, XML-RPC or other, to an external or internal server).
>
>   Zope has a limited amount of workers (the default is 4) able
>   to execute requests. If there are no free workers, requests
>   have to wait for one.
>
>   Now imagine that as many requests arrive as there are workers
>   and each of them wants to perform an XML-RPC against the
>   same Zope. Then you have a deadlock: none of the XML-RPC requests
>   will finish, because there are no free workers. An no worker
>   will ever become free again, because each of them waits for
>   its XML-RPC to finish.
>
> Therefore, you should directly call internal resources (rather
> than use XML-RPC).
>
>
> --
> Dieter
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [ZOPE] XML-RPC within ZOPE

2005-12-12 Thread Jan-Ole Esleben
Sorry, it was my mistake. My design actually works (surprise!), but I
missed a very obscure non-indented self._p_changed = 1 in a base class
for my product. I know, I'm an idiot. But I'm glad it works now.

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


Re: [ZOPE] XML-RPC within ZOPE

2005-12-12 Thread Jan-Ole Esleben
Chris: the errors I get are always ConflictErrors without any usable
tracebacks. I would like to give more information, but it really is
very complex when you go a little deeper and would probably not be
useful. I'll try to describe it a little better anyway:

I have an Object that offers an interface for dispatching methods. It
does so by deciding wether the method's object is on the local server
or not, and depending on that, calls it via XML-RPC or via the ZOPE
context (self). A remote ZOPE server cannot be part of a ZEO backend
because there need to be several (hundred) self sustained servers that
can act on their own when the connection to the others fails (which is
likely rather than possible).

But, as I just realised - in an internet context, isn't it possible
that something like this could happen without even being part of a
design?

One ZOPE server's object, say, "LibraryManager", calls an object in
another ZOPE server, say "UniversityLibrary", via XML-RPC (because it
doesn't even know it's ZOPE). It asks it for a book. The University
Library doesn't have it, but it has a service that looks in all the
libraries it knows and returns any found occurences. Thus, at some
point during that call, it asks the first server's LibraryManager
about the book - again, not even knowing that it is a ZOPE server, via
XML-RPC.

Should this work, and where does it differ from what I'm doing?

> > The problem is that it isn't my design, and the design is part of a
> > contract. I can't really do anything about that (the major problem is
> > that there will be SOAP components that might even need to be
> > transparently integrated - which completely excludes ZEO).
> Why do you think that?  ZEO is simply a single point of persistence for
> a group of Zope Application Servers.

But what if I don't know which components are ZOPE, and components can
be transparently exchanged?

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


Re: [Zope] XML-RPC within ZOPE

2005-12-12 Thread Jan-Ole Esleben
The problem is that it isn't my design, and the design is part of a
contract. I can't really do anything about that (the major problem is
that there will be SOAP components that might even need to be
transparently integrated - which completely excludes ZEO). I tried
doing my own commits, but it doesn't work, it just bombs earlier (no
matter where I do them). I really don't know why, my only guess is
that something about the transaction management breaks terribly when
you go back and forth between objects without them being able to track
it. Only I cannot figure out what.

It is not possible to do _really_ explicit transaction management with
ZODB, is it?

Ole

2005/12/12, Alan Milligan <[EMAIL PROTECTED]>:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jan-Ole Esleben wrote:
> > OK, the following is the case:
> >
> > The setup is for functions dispatching either locally or via XML-RPC.
> > At the moment, the mechanism I use is to detect locality is flawed and
> > thus doesn't work well. So I have local XML-RPC calls where I could
> > have global ones. But.
> >
> > 1. I need that possibility for testing the XML-RPC setup. I cannot set
> > up multiple instances for every cheap test. At least I shouldn't have
> > to. The very important reason, however, is:
> > 2. This is a generic call dispatcher. It is used, for example, for
> > object name resolution in a widely deployed system. So, what could
> > happen and couldn't happen locally is this:
>
> Zope isn't CORBA.  ZEO is the correct way to scale/cluster Zope's.
>
> >
> > 1. Server1 dispatcher calls, via XML-RPC, Server2.
> > 2. Server2 dispatcher calls Server1, which does something locally
> > (same communication management object as the dispatcher, maybe another
> > local call) and then returns
> >
> > This is the same problem spread out over two servers, where locality
> > isn't possible anymore. The call from Server1 to Server2 must be made
> > via XML-RPC and I cannot exclude Server2 calling Server1 back.
>
> If you really must architect your solution this way, then you are going
> to have to do your own transaction management.  Your 'local' calls need
> to do explicit commit() calls and you're going to have to reread
> 'tainted' objects.
>
> Again, it will take you half an hour to modify your design instead of
> half a year to get all the bugs out of your implementation.
>
> Alan
>
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.6 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFDnN2ACfroLk4EZpkRAkQ7AJ4rTWpmldRq1GoPGIV8r0CT7+VPJwCZAbKB
> 5PBuLd5sJgh7QZe1ey8lZ9g=
> =3TrG
> -END PGP SIGNATURE-
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
OK, the following is the case:

The setup is for functions dispatching either locally or via XML-RPC.
At the moment, the mechanism I use is to detect locality is flawed and
thus doesn't work well. So I have local XML-RPC calls where I could
have global ones. But.

1. I need that possibility for testing the XML-RPC setup. I cannot set
up multiple instances for every cheap test. At least I shouldn't have
to. The very important reason, however, is:
2. This is a generic call dispatcher. It is used, for example, for
object name resolution in a widely deployed system. So, what could
happen and couldn't happen locally is this:

1. Server1 dispatcher calls, via XML-RPC, Server2.
2. Server2 dispatcher calls Server1, which does something locally
(same communication management object as the dispatcher, maybe another
local call) and then returns

This is the same problem spread out over two servers, where locality
isn't possible anymore. The call from Server1 to Server2 must be made
via XML-RPC and I cannot exclude Server2 calling Server1 back.

Does this make it a little more of a real problem?

Ole


2005/12/12, Alan Milligan <[EMAIL PROTECTED]>:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jan-Ole Esleben wrote:
> >>It really *is* in your interests to ensure a single request completes
> >>all your functional requirements ;)
> >
> >
> > That's not possible unfortunately. The design of the system is rather
> > complex, and unalterable in this respect. However, it is not true that
> > it is usually possible to fulfil this requirement. What of programs
> > running on an operating system that call other programs via that
> > operating system?
> >
>
> I don't believe you.
>
> You have a client application calling your Zope server's  bla()
> function.  It can do this either by HTTP or XML-RPC by choosing the
> appropriate Content-Type.
>
> You've chosen to implement this interface by making other XML-RPC calls
> to the same server to complete the task.  This is both unnecessary and
> bad.  Unnecessary because you're doing an RPC when you've got all you
> need in local memory.  This is bad because you're introducing the
> additional overhead of setting up said RPC.  Worse, you're now
> responsible for your own transaction management because you've split the
> task across multiple ZODB connections.
>
> You need to think about the *correct* way to write your bla() function.
>  In doing this, you want to be able to take advantage of the automatic
> rollback facilities of Zope by keeping all of this in one transaction,
> which will also avoid your initial problem of conflict errors.
>
> Alan
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.6 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFDnNZcCfroLk4EZpkRArTDAJ96TGwDy047D09jkmRNbGyD7e+3QgCg0aNZ
> lLo0znXi4qvXr5j4SseH2k8=
> =hu4V
> -END PGP SIGNATURE-
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
> It really *is* in your interests to ensure a single request completes
> all your functional requirements ;)

That's not possible unfortunately. The design of the system is rather
complex, and unalterable in this respect. However, it is not true that
it is usually possible to fulfil this requirement. What of programs
running on an operating system that call other programs via that
operating system?

Given that that is a requirement that needs to be met, do I have any options?

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


[Zope] XML-RPC within ZOPE

2005-12-11 Thread Jan-Ole Esleben
Hi!

Is it at all impossible to use XML-RPC _within_ a ZOPE architecture?

What I mean is:
I have a nested call structure:

1. Python script calls a method from a ZODB object
2. That method calls a Python module function
3. That module function dispatches an XML-RPC call to the same ZODB
object called in step 1
4. This last call, which is rather complex, returns, and all the calls
leading up to it return, sometimes doing some minor work

When I use the same code _without_ any XML-RPC (the Zope server's self
instead of the XML-RPC server object for that server), it works just
fine. When I use XML-RPC, I get a ConflictError during the final
return (from step 1), and I get it if I commit manually beforehand, so
it must be the commit triggering it.

The tricky thing is: nothing in my ZODB changes. I have several
mutable _arguments_ that are passed on, but they are not default
arguments and they don't get written to the ZODB.

Is what I'm trying to do impossible for some reason? Or can I just
make the whole call take place outside any transactions?

Thanks in advance for any pointers, I'm really a little desparate at this point.
Ole
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZASync method calls

2005-08-27 Thread Jan-Ole Esleben
Thanks for the suggestion; it helped in part:
I can now get it to work basically (the asynchronous job hadn't run at
all in the background, while now - from my own debugging output - I
can see that it does).

However, the instance variable doesn't change until the caller of the
asynchronous method has finished - it _is_ different afterwards
though, it seems like the caller doesn't check for a change; is there
a way to force that?

Ole


2005/8/23, Jonathan <[EMAIL PROTECTED]>:
> 
> - Original Message -
> From: "Jan-Ole Esleben" <[EMAIL PROTECTED]>
> >
> > I'm having a really complicated problem that I don't know how to put into
> > words properly, because I'm really vague on what's causing it and the
> > setup is highly involved; I would be _really_ glad if someone could help
> > me
> > out with this:
> >
> > I have a ZOPE instance (connected to a ZEO server) running a custom
> > method call wrapper that decides (based on the method's arguments) to
> > run a method asynchronously using zasync (as well as some other stuff that
> > I think isn't important in the context of my problem). All this has
> > been tested. For various
> > reasons, the method call's path is approximately as follows:
> >
> > 0. Method call using a generic Python method
> > 1. Python code - resolves the method's location and name using ZOPE
> > methods
> > 2. Method dispatcher (called via ZOPE): dispatches synchronously or
> > asynchronously, using zasync, zope_exec and putSessionCall; the method
> > called is again a ZOPE method that calls the final method as another
> > ZOPE method
> >
> > The apparent massive indirection cannot be avoided (for rather complicated
> > reasons). Everything is supposed to be highly generic.
> >
> > My problem is this: if I use a test method that dispatches such an
> > asynchronous
> > method that is supposed to change an instance variable (the class is
> > persistent) and run for ten seconds, then wait for fourteen seconds and
> > see
> > if the method has run (check the instance variable) synchronously (while
> > the
> > asynchronous method is supposed to work in the background), I find the
> > variable unchanged; further checks (using print statements) confirm that
> > the
> > asynchronous method indeed doesn't run until my assertion fails, even if I
> > give
> > it a lot of time.
> >
> > If I disconnect both - run the long running method asynchronously, then
> > run
> > (via ZOPE directly, not from within the same method call) a synchronous
> > method
> > that waits for fourteen seconds and checks the variable, the asynchronous
> > call
> > works just fine (even though both run alongsinde for a time).
> >
> > It isn't the number of threads available to the zserver, I've increased
> > that
> > and nothing has changed. Manual tests of asynchronous methods also don't
> > show
> > anything wrong with my zasync setup. I can only assume that the
> > asynchronous
> > method is _started_ only _after_ the caller has finished. Is there a
> > reason for
> > that, and can I circumvent it? Or am I completely wrong and something else
> > isn't working?
> >
> > I'm on Windows XP SP2, ZOPE 2.7.6, Python 2.3.5 with Twisted installed.
> >
> 
> Is it possible that your asynchronous routine is not committing the
> transaction? ie. If zope considers the async routine to be part of the
> current 'session' then the variable the async routine is updating will not
> be changed until the current session is completed and zope commits the
> transaction (so any checks of the variable during the current session will
> not see any changes to the variable).
> 
> To see if this is the case you could add a "get_transaction().commit()"
> statement in your code after you change the variable's contents.
> 
> hth
> 
> Jonathan
> 
> 
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZASync method calls

2005-08-22 Thread Jan-Ole Esleben
Hi!

I'm having a really complicated problem that I don't know how to put into
words properly, because I'm really vague on what's causing it and the
setup is highly involved; I would be _really_ glad if someone could help me
out with this:

I have a ZOPE instance (connected to a ZEO server) running a custom
method call wrapper that decides (based on the method's arguments) to
run a method asynchronously using zasync (as well as some other stuff that
I think isn't important in the context of my problem). All this has
been tested. For various
reasons, the method call's path is approximately as follows:

0. Method call using a generic Python method
1. Python code - resolves the method's location and name using ZOPE methods
2. Method dispatcher (called via ZOPE): dispatches synchronously or
 asynchronously, using zasync, zope_exec and putSessionCall; the method
 called is again a ZOPE method that calls the final method as another
 ZOPE method

The apparent massive indirection cannot be avoided (for rather complicated
reasons). Everything is supposed to be highly generic.

My problem is this: if I use a test method that dispatches such an asynchronous
method that is supposed to change an instance variable (the class is 
persistent) and run for ten seconds, then wait for fourteen seconds and see
if the method has run (check the instance variable) synchronously (while the
asynchronous method is supposed to work in the background), I find the
variable unchanged; further checks (using print statements) confirm that the
asynchronous method indeed doesn't run until my assertion fails, even if I give
it a lot of time.

If I disconnect both - run the long running method asynchronously, then run
(via ZOPE directly, not from within the same method call) a synchronous method
that waits for fourteen seconds and checks the variable, the asynchronous call
works just fine (even though both run alongsinde for a time).

It isn't the number of threads available to the zserver, I've increased that 
and nothing has changed. Manual tests of asynchronous methods also don't show
anything wrong with my zasync setup. I can only assume that the asynchronous
method is _started_ only _after_ the caller has finished. Is there a reason for
that, and can I circumvent it? Or am I completely wrong and something else
isn't working?

I'm on Windows XP SP2, ZOPE 2.7.6, Python 2.3.5 with Twisted installed.

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


[Zope] Metaclasses in ZOPE Products

2005-08-07 Thread Jan-Ole Esleben
Hi!

What do I need to do to derive a new base class for my products from
item that defines its own meta class? There's a whole mess of code in
the Zope source code that deals with meta classes, but nothing I can
actually identify as the thing to do.

I am deriving from SimpleItem at the moment. Currently, I use a meta
class derived from type, but this doesn't work:

  File "E:\Python23\lib\fliwas\ccitem.py", line 54, in ?
class CCItem(SimpleItem):
  File "E:\Python23\lib\fliwas\ccmethods.py", line 38, in __new__
return type.__new__(cls, name, bases, classdict)
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-s
trict) subclass of the metaclasses of all its bases

I'm guessing that using a certain base class for my meta class should
work, but the documentation doesn't say (as far as I can find out).

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


[Zope] Follow-up to aq_parent(aq_inner(self))-question

2005-07-24 Thread Jan-Ole Esleben
Hi!

How can I get the product's path while instantiating it? Shouldn't
this information exist somewhere? aq_parent(aq_inner(self)) returns
None, which isn't totally unexpected since __init__ isn't strictly a
Zope method and thus doesn't necessarily have a Zope method's context.

(I need, from the __init__ method of a product, to find out its
instantiation path in the ZODB.)

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


Re: [Zope] Getting a methods parent (in a product)

2005-07-22 Thread Jan-Ole Esleben
Thanks a lot, I'll try that.

Ole


2005/7/22, Jens Vagelpohl <[EMAIL PROTECTED]>:
> 
> On 22 Jul 2005, at 18:48, Jan-Ole Esleben wrote:
> 
> > Hi!
> >
> > How can I get a Product instance's _actual_ parent when one of its
> > methods is called? (In other ways: how can I find out, from an
> > instance, where that instance is located without falling prey to
> > acquisition in Zope 2?)
> 
> from Acquisition import aq_inner, aq_parent
> 
> parent = aq_parent(aq_inner(self))
> 
> This will return the true container the instance is set in, not just
> the acquisition parent.
> 
> jens
> 
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Getting a methods parent (in a product)

2005-07-22 Thread Jan-Ole Esleben
Hi!

How can I get a Product instance's _actual_ parent when one of its
methods is called? (In other ways: how can I find out, from an
instance, where that instance is located without falling prey to
acquisition in Zope 2?)

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


[Zope] Change user (pythonic)

2005-07-16 Thread Jan-Ole Esleben
Hi!

I can't seem to figure out from the documentation or through web
research how it is possible to change the currently logged in user
pythonically (e.g. in an fs product or extension method).

Can anybody give me a hint?

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


[Zope] Timeout?

2005-06-26 Thread Jan-Ole Esleben
Hi!

Is there a way to have a ZOPE method (called, for example, via a TALES
expression) time out after a specific (changeable!) amount of time?

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


[Zope] Softwarepatents: European Parliament will decide in 11 days

2005-06-19 Thread Jan Ulrich Hasecke

Hi all!

Please excuse this slightly offtopic posting:

In 11 to 13 days the EP will decide about softwarepatents.

So in the next days the members of the EP will make up their minds  
and read the guideline for the first time. Many MEPs do not  
understand what they read. There are 260 requests for modification,  
which they must read and understand too. There are some MEPs which  
will give recommendations to the members of their party, but these  
MEPs are lobbied by the big players, who want to have software  
patents in the EU.


But you can change their minds. The FFII (www.ffii.org) read all  
requests of modification and made a recommendation "How to vote".


Please phone your MEP, try to talk with him, but it is also ok to  
talk to his assistant, and ask him to follow the recommendations of  
the FFII.


You will find more information here:
http://noepatents.eu.org/index.php/NO_Software_Patents

A list of all MEPs sorted by zip code:
http://www.ffii.org/%7Eblasum/tmp/meps.txt

The recommendations:
http://europarl.ffii.org/amendments.en.html

Please act immediately. The MEPs need your help to decide. This is  
not a joke. They do not really understand the issue. Please clarify  
them, how softwarepatents will change the IT-economy in europe. Tell  
them that your business and your employees are in danger when great  
companies sue them.


Spend some hours to save the future of your business!

juh

--
DZUG e.V. Telefon: +49 (0) 
3496/309 49 7
Schalaunische Strasse 6  Telefax: +49 (0)3496 309  
91 18
06366 Köthen http://www.dzug.org http:// 
www.zope.de
>

Re: [Zope] Getting information about current method

2005-06-18 Thread Jan-Ole Esleben
Well, thanks anyway for your suggestions; I hope someone else can
suggest something; my intuition is that it isn't possible (without
going really low level), and that would really be bad...

Ole


2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > It's an application instance wrapped in a list; it seems to be
> > identical to self, actually - self.REQUEST['URL'] and
> > self.REQUEST.PARENTS[0].REQUEST['URL'] are the same. However, the two
> > REQUESTs are not the identical object (== returns False).
> >
> 
> Then I don't know.
> (The application instance is none other than zope itself. )
> I can honestly not think of a way to extract this information. I've
> even tried setting up a simple example method and I couldn't get hold
> of the zodb name of the external method that is called.
> 
> Perhaps Andreas or Dieter can help us here??
> 
> 
> > Ole
> >
> >
> > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > No, I'm sorry; I only get system paths.
> > > >
> > > And what about REQUEST.PARENTS? (or is that just the http request)
> > >
> > >
> > > > Ole
> > > >
> > > >
> > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > > > Unforunately, this just gives me the pythonic path to the method; 
> > > > > > what
> > > > > > I need for a TALES expression is the ZOPE path - i.e. what I get 
> > > > > > from
> > > > > > the stack frame is
> > > > > > ... E:\zope\Extensions\req.py ...
> > > > > > but what I need is
> > > > > > ... http://localhost:8080/ReqTest ...
> > > > > >
> > > > >
> > > > > Ok, maybe inspect.stack()[1] was the wrong one. Can't remember nor
> > > > > test it for you but try any of the others in that list. Eg.
> > > > > inspect.stack()[0] or inspect.stack()[2]
> > > > >
> > > > > You can maybe find something by going through REQUEST.PARENTS
> > > > >
> > > > >
> > > > > > Ole
> > > > > >
> > > > > >
> > > > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > > > Then, in your External method, try::
> > > > > > >
> > > > > > >  import inspect
> > > > > > >  print inspect.stack()[1]
> > > > > > >
> > > > > > >
> > > > > > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > > > > > I want to know the name (and path) of the _External Method_ from
> > > > > > > > inside it. What I _can_ get is the name of the DTML method.
> > > > > > > >
> > > > > > > > I want to build generic scaffolding code for functions that
> > > > > > > > conditionally redispatch as asynchronous calls (via ZASync); 
> > > > > > > > that
> > > > > > > > part, however, isn't a problem at all - everything works fine 
> > > > > > > > as long
> > > > > > > > as I use an HTTP request directly and redispatch with 
> > > > > > > > information from
> > > > > > > > the REQUEST. The problem is that I need a TALES expression to 
> > > > > > > > call the
> > > > > > > > function again (asynchronously this time), and for that I need 
> > > > > > > > the
> > > > > > > > ZOPE path to it.
> > > > > > > >
> > > > > > > > Ole
> > > > > > > >
> > > > > > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > > > > > > is there a generic way to find out from Python code which 
> > > > > > > > > > method has
> > > > > > > > > > been called (in other words: find out where the current 
> > > > > > > > > > method is
> > > > > > > > > > located in the ZOPE hierarchy and what its name is)? If I 
> > >

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
It's an application instance wrapped in a list; it seems to be
identical to self, actually - self.REQUEST['URL'] and
self.REQUEST.PARENTS[0].REQUEST['URL'] are the same. However, the two
REQUESTs are not the identical object (== returns False).

Ole


2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > No, I'm sorry; I only get system paths.
> >
> And what about REQUEST.PARENTS? (or is that just the http request)
> 
> 
> > Ole
> >
> >
> > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > Unforunately, this just gives me the pythonic path to the method; what
> > > > I need for a TALES expression is the ZOPE path - i.e. what I get from
> > > > the stack frame is
> > > > ... E:\zope\Extensions\req.py ...
> > > > but what I need is
> > > > ... http://localhost:8080/ReqTest ...
> > > >
> > >
> > > Ok, maybe inspect.stack()[1] was the wrong one. Can't remember nor
> > > test it for you but try any of the others in that list. Eg.
> > > inspect.stack()[0] or inspect.stack()[2]
> > >
> > > You can maybe find something by going through REQUEST.PARENTS
> > >
> > >
> > > > Ole
> > > >
> > > >
> > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > Then, in your External method, try::
> > > > >
> > > > >  import inspect
> > > > >  print inspect.stack()[1]
> > > > >
> > > > >
> > > > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > > > I want to know the name (and path) of the _External Method_ from
> > > > > > inside it. What I _can_ get is the name of the DTML method.
> > > > > >
> > > > > > I want to build generic scaffolding code for functions that
> > > > > > conditionally redispatch as asynchronous calls (via ZASync); that
> > > > > > part, however, isn't a problem at all - everything works fine as 
> > > > > > long
> > > > > > as I use an HTTP request directly and redispatch with information 
> > > > > > from
> > > > > > the REQUEST. The problem is that I need a TALES expression to call 
> > > > > > the
> > > > > > function again (asynchronously this time), and for that I need the
> > > > > > ZOPE path to it.
> > > > > >
> > > > > > Ole
> > > > > >
> > > > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > > > > is there a generic way to find out from Python code which 
> > > > > > > > method has
> > > > > > > > been called (in other words: find out where the current method 
> > > > > > > > is
> > > > > > > > located in the ZOPE hierarchy and what its name is)? If I call 
> > > > > > > > an
> > > > > > > > External Method via a DTML method, of course the REQUEST object
> > > > > > > > contains the path to the DTML method because the External Method
> > > > > > > > hasn't been called via HTTP. I haven't been able to figure out 
> > > > > > > > any
> > > > > > > > other way of getting this information.
> > > > > > > >
> > > > > > > I don't get it. Do you want to know the name of the DTML method 
> > > > > > > from
> > > > > > > inside the External method?
> > > > > > > Perhaps I'll be able to help if you tell us more about the 
> > > > > > > intention
> > > > > > > of this code.
> > > > > > >
> > > > > > > > Thanks in advance,
> > > > > > > > Ole
> > > > > > > > ___
> > > > > > > > Zope maillist  -  Zope@zope.org
> > > > > > > > http://mail.zope.org/mailman/listinfo/zope
> > > > > > > > **   No cross posts or HTML encoding!  **
> > > > > > > > (Related lists -
> > > > > > > >  http://mail.zope.org/mailman/listinfo/zope-announce
&g

Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
No, I'm sorry; I only get system paths.

Ole


2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > Unforunately, this just gives me the pythonic path to the method; what
> > I need for a TALES expression is the ZOPE path - i.e. what I get from
> > the stack frame is
> > ... E:\zope\Extensions\req.py ...
> > but what I need is
> > ... http://localhost:8080/ReqTest ...
> >
> 
> Ok, maybe inspect.stack()[1] was the wrong one. Can't remember nor
> test it for you but try any of the others in that list. Eg.
> inspect.stack()[0] or inspect.stack()[2]
> 
> You can maybe find something by going through REQUEST.PARENTS
> 
> 
> > Ole
> >
> >
> > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > Then, in your External method, try::
> > >
> > >  import inspect
> > >  print inspect.stack()[1]
> > >
> > >
> > > On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > > > I want to know the name (and path) of the _External Method_ from
> > > > inside it. What I _can_ get is the name of the DTML method.
> > > >
> > > > I want to build generic scaffolding code for functions that
> > > > conditionally redispatch as asynchronous calls (via ZASync); that
> > > > part, however, isn't a problem at all - everything works fine as long
> > > > as I use an HTTP request directly and redispatch with information from
> > > > the REQUEST. The problem is that I need a TALES expression to call the
> > > > function again (asynchronously this time), and for that I need the
> > > > ZOPE path to it.
> > > >
> > > > Ole
> > > >
> > > > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > > > is there a generic way to find out from Python code which method has
> > > > > > been called (in other words: find out where the current method is
> > > > > > located in the ZOPE hierarchy and what its name is)? If I call an
> > > > > > External Method via a DTML method, of course the REQUEST object
> > > > > > contains the path to the DTML method because the External Method
> > > > > > hasn't been called via HTTP. I haven't been able to figure out any
> > > > > > other way of getting this information.
> > > > > >
> > > > > I don't get it. Do you want to know the name of the DTML method from
> > > > > inside the External method?
> > > > > Perhaps I'll be able to help if you tell us more about the intention
> > > > > of this code.
> > > > >
> > > > > > Thanks in advance,
> > > > > > Ole
> > > > > > ___
> > > > > > Zope maillist  -  Zope@zope.org
> > > > > > http://mail.zope.org/mailman/listinfo/zope
> > > > > > **   No cross posts or HTML encoding!  **
> > > > > > (Related lists -
> > > > > >  http://mail.zope.org/mailman/listinfo/zope-announce
> > > > > >  http://mail.zope.org/mailman/listinfo/zope-dev )
> > > > > >
> > > > >
> > > > > --
> > > > > Peter Bengtsson,
> > > > > work www.fry-it.com
> > > > > home www.peterbe.com
> > > > > hobby www.issuetrackerproduct.com
> > > > >
> > > > ___
> > > > Zope maillist  -  Zope@zope.org
> > > > http://mail.zope.org/mailman/listinfo/zope
> > > > **   No cross posts or HTML encoding!  **
> > > > (Related lists -
> > > >  http://mail.zope.org/mailman/listinfo/zope-announce
> > > >  http://mail.zope.org/mailman/listinfo/zope-dev )
> > > >
> > >
> > > --
> > > Peter Bengtsson,
> > > work www.fry-it.com
> > > home www.peterbe.com
> > > hobby www.issuetrackerproduct.com
> > >
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> 
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
Unforunately, this just gives me the pythonic path to the method; what
I need for a TALES expression is the ZOPE path - i.e. what I get from
the stack frame is
... E:\zope\Extensions\req.py ...
but what I need is
... http://localhost:8080/ReqTest ...

Ole


2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> Then, in your External method, try::
> 
>  import inspect
>  print inspect.stack()[1]
> 
> 
> On 6/17/05, Jan-Ole Esleben <[EMAIL PROTECTED]> wrote:
> > I want to know the name (and path) of the _External Method_ from
> > inside it. What I _can_ get is the name of the DTML method.
> >
> > I want to build generic scaffolding code for functions that
> > conditionally redispatch as asynchronous calls (via ZASync); that
> > part, however, isn't a problem at all - everything works fine as long
> > as I use an HTTP request directly and redispatch with information from
> > the REQUEST. The problem is that I need a TALES expression to call the
> > function again (asynchronously this time), and for that I need the
> > ZOPE path to it.
> >
> > Ole
> >
> > 2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > > > is there a generic way to find out from Python code which method has
> > > > been called (in other words: find out where the current method is
> > > > located in the ZOPE hierarchy and what its name is)? If I call an
> > > > External Method via a DTML method, of course the REQUEST object
> > > > contains the path to the DTML method because the External Method
> > > > hasn't been called via HTTP. I haven't been able to figure out any
> > > > other way of getting this information.
> > > >
> > > I don't get it. Do you want to know the name of the DTML method from
> > > inside the External method?
> > > Perhaps I'll be able to help if you tell us more about the intention
> > > of this code.
> > >
> > > > Thanks in advance,
> > > > Ole
> > > > ___
> > > > Zope maillist  -  Zope@zope.org
> > > > http://mail.zope.org/mailman/listinfo/zope
> > > > **   No cross posts or HTML encoding!  **
> > > > (Related lists -
> > > >  http://mail.zope.org/mailman/listinfo/zope-announce
> > > >  http://mail.zope.org/mailman/listinfo/zope-dev )
> > > >
> > >
> > > --
> > > Peter Bengtsson,
> > > work www.fry-it.com
> > > home www.peterbe.com
> > > hobby www.issuetrackerproduct.com
> > >
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> 
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
I want to know the name (and path) of the _External Method_ from
inside it. What I _can_ get is the name of the DTML method.

I want to build generic scaffolding code for functions that
conditionally redispatch as asynchronous calls (via ZASync); that
part, however, isn't a problem at all - everything works fine as long
as I use an HTTP request directly and redispatch with information from
the REQUEST. The problem is that I need a TALES expression to call the
function again (asynchronously this time), and for that I need the
ZOPE path to it.

Ole

2005/6/17, Peter Bengtsson <[EMAIL PROTECTED]>:
> > is there a generic way to find out from Python code which method has
> > been called (in other words: find out where the current method is
> > located in the ZOPE hierarchy and what its name is)? If I call an
> > External Method via a DTML method, of course the REQUEST object
> > contains the path to the DTML method because the External Method
> > hasn't been called via HTTP. I haven't been able to figure out any
> > other way of getting this information.
> >
> I don't get it. Do you want to know the name of the DTML method from
> inside the External method?
> Perhaps I'll be able to help if you tell us more about the intention
> of this code.
> 
> > Thanks in advance,
> > Ole
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> 
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Getting information about current method

2005-06-17 Thread Jan-Ole Esleben
Hi!

I am new to this list and rather new to Zope, so maybe this is a
stupid question; unfortunately I haven't been able to find an answer
to it anywhere:

is there a generic way to find out from Python code which method has
been called (in other words: find out where the current method is
located in the ZOPE hierarchy and what its name is)? If I call an
External Method via a DTML method, of course the REQUEST object
contains the path to the DTML method because the External Method
hasn't been called via HTTP. I haven't been able to figure out any
other way of getting this information.

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


Re: [Zope] Software Patents and Content Management Systems

2005-04-05 Thread Jan Ulrich Hasecke
Lennart Regebro schrieb:
> The name of a patent doesn't really say much. You now asked people,
> who mostly are not knowledgeable about patents, to read through a
> whole bunch of patents, and say if these may be applicable to their
> CMSs. I find that request quite unreasonable. Judging from the english
> titles alone, all the patents are applicable to anything that uses
> Zope, but I assume this is not what you need to know, as you surely
> are aware of that already.

Yes, the description is not too informative. I am sorry.

You will find further information by going to

http://depatisnet.dpma.de

Try the english UI.

Query for the Patent-Number given in the short list and then open the
PDF. There you will find a more detailed description of the patent in
English.

I will try to find the address of the european patent office.

juh

-- 
DZUG e.V. Telefon: +49 (0)3496/309 49 7
Schalaunische Strasse 6  Telefax: +49 (0)3496 309 91 18
06366 Köthen http://www.dzug.org http://www.zope.de
><°<  ><°<  ><°<  ><°<  ><°<  ><°<  Zope rocks!


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


[Zope] Software Patents and Content Management Systems

2005-04-05 Thread Jan Ulrich Hasecke
Hi,

I am sorry for this excessive crossposting, but it is urgent and
important.

The ffii.org made a list of cms-related patents. They need some feedback
from people actively using or developing Content Management Systems to
qualify the patents.

Please note that there is an ongoing legislative process in the european
parliament. Time is running short and the patent-holding companies are
doing an aggressive lobbying. 

Please consider the listed patent descriptions in context of your
favorite Zope CMS and give feedback to Holger Blasum or Dirk Steuwer
from FFII. Clarify to them to which extent your favorite Zope CMS could
be affected by the given patent.

Please reply to me, Dirk Steuwer and Holger Blasum

Thanks for your help!

juh

And here are the links!

THIS IS THE LIST! English and German descriptions
http://wiki.ffii.org/CMSPatente04De -> gefundene Patente, found patents

PDF-Version with english and german descriptions
http://www.stop-swpat.de/docs/Patente_CMS.pdf 

Some other Links 
GUI-patents webshop.ffii.org 

other Links:
http://nibiru.borg.metux.de:7000/wiki/index.php/Patentverletzer/Datenbank/Vorgeschlagen
http://swpat.ffii.org/vreji/pikta/index.de.html
http://gauss.ffii.org/


P.S. There is an urgent call to action on www.nosoftwarepatents.com from
the sponsors of this anti-patent-site, which is now run by the FFII.
Lobbying against Software patents needs money. If you want to help,
please contact the given email-address listed here:
http://www.nosoftwarepatents.com/phpBB2/viewtopic.php?t=474

-- 
DZUG e.V. Telefon: +49 (0)3496/309 49 7
Schalaunische Strasse 6  Telefax: +49 (0)3496 309 91 18
06366 Köthen http://www.dzug.org http://www.zope.de
><°<  ><°<  ><°<  ><°<  ><°<  ><°<  Zope rocks!


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


Re: [Zope] http protocol

2001-01-26 Thread Jan Muenther

Hi,

> I'd like to write an http client for an embedded system to get
> information from Zope. For debugging I want to see the traffic between
> the client and Zope (http protocol). How can this be achieved?

how about using a sniffer which can follow a tcp stream (e.g.
ethereal)??
-- 
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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 )




Re: [Zope] OpenBSD 2.8 woes

2001-01-15 Thread Jan Muenther

Hello,


> > Could anybody enlighten me??? I don't know Python (yet), so the
> > tracebacks are not too informative for me ...
> 
> Are you using Python 2.0?  It's not yet compatible with Zope, though
> efforts are being made. Just enter "python" to find out.


No, I'm not. At first I tried to take the version that comes
shipped as a package with OpenBSD 2.8, which is 1.6 with tk and
threads compiled in (at least that's what the package name
suggests). 
When that didn't work, I pkg_deleted the package and then
downloaded the 1.52 as noted in the Zope specs, compiled and
installed it - it seemed to run, but Zope cr***ed out with a
python.core after trying to access the management screen. The
machine itself definitely is okay, techwise. The python
compilation and installation didn't show any errors. The OpenBSD
installation is totally virgin otherwise. 

I don't really know what else I could do. Right now it looks
pretty much as if I'm going to switch to FreeBSD, my second
favourite :-| 
Has anyone got Zope 2.2.5 running under OpenBSD 2.8??? If so, I'd
be really curious what steps you followed to get it to work.-

Cheers, Jan 
-- 
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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] OpenBSD 2.8 woes

2001-01-12 Thread Jan Muenther

Hello folks,

first of all, I've installed Zope on my FreeBSD workstation (from
the ports) and I love it. I can't really do anything productive
yet ;o)), but the potential and power of the program's clear to
me. 

Now, after talking to my boss, I plan to set up the relaunch of
our website to be based on Zope. As OS I'd like to pick OpenBSD,
since it's nice, fast and secure and I generally have an
affection towards xBSDs

However, after installing the Python packages that comes shipped
with the OpenBSD 2.8 CDs, the Zope installation script runs
nicely, but when I try and access the management screen, I only
see LOADS of error messages:

  Zope Error

  Zope has encountered an error while publishing this
resource. 

  Error Type: ParserError
  Error Value: Expected node type 12, got 312.

Could anybody enlighten me??? I don't know Python (yet), so the
tracebacks are not too informative for me ... 

Cheers, 

Jan

-- 
Radio HUNDERT,6 Medien GmbH Berlin
- EDV -
[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 )




Re: [Zope] dtml

2001-01-07 Thread Jan H. Haul

nando n wrote:
> 
> i want to know as much as possible about dtml.

Nando,
this is the perfect time to read the Zope Book. You can read it
on the Zope.Org site or download the HTML and print a copy
yourself. It will be published by O'Reilly later this year, by
the way.
This book is just made as a good, in-depth tutorial answering
broad questions like yours.

After you've read the book, feel free to contact the list again
with specific questions if there is anything you need help with -
we all do it, and it surely helps.

On the other hand, very broad, basic questions are best answered
by the book. Really. To fully answer your question on the list,
someone would just have to rewrite the chapter on DTML of the
Zope book, which is a waste of everybodies' time, including
yours, as it would surely take longer than downloading the
chapter from zope.org :-)

For goot DTML examples, you can click at the "DTML source" link
on every Zope.org page.

Jan

___
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] site structure

2000-12-14 Thread Jan H. Haul

Nuno Goncalves wrote:
> 
> > On Thu, 14 Dec 2000, Nuno Goncalves wrote:
> > > How can we define a structure for an entire site with Zope ?
> > > for example i want that all the site's pages have a table with 3
> > > colums. it's kind of a template for the web site !
> >
> >Using standard_html_header and standard_html_footer in every Document on
> > your site...
> But that way if i want to change the structure, i have to change on every
> page.
> My ideia was to create a template(3 colums) where i add objects (dtml
> documents).
> If i want to change the site structure to 2 colums i only change the
> template !
> 
> Nuno
> 

That is *exactly* what standard_dtml_header and ...footer are
for.
Together, they *are* your template.

You *include* these in every document (using the  tag. They'll show up in your documents at run time.

Put the default template into the root folder and all your DTML
documents will acquire it. In a sub-folder, you can either do
nothing (then the acquired header and footer will be used), or
override these with a folder-specicic template.

See the Zope book, it explains it pretty well.

Jan

___
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] INTERBASE cannot do this type of query ?

2000-12-14 Thread Jan H. Haul

Francois-regis Chalaoux wrote:

> Error, Products.gvibDA.gvib.gvibExceptions.ProgrammingError: - Dynamic SQL Error -- 
>SQL error code = -206 -- Column
> unknown -- MOUSE
> 
> SQL used:
> 
> select IND_SPECIE
> from ZEB_INDIVIDU
> where IND_SPECIE = "MOUSE"

Use single quotes around 'MOUSE'.

In SQL, single qoutes are for string literals, double quotes for
column names (there are people who think spaces in column names
or mixed lower/upper case column names are neat NOT).

Jan

___
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] URL-problem

2000-11-21 Thread Jan Van de Vyle

Thanks for your reply, but the main problem is the navigation.
The admin part is the normal  browse-version + an admin interface at the
bottom of every side.
So when you are in root/main/press and you click on the new button a script
adds a new object.
But how do I solve the navigation problem. The buttons to the other
objects(pages) are the browse-version this means you leave the admin
interface every time you change your position.


___
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] URL-problem

2000-11-21 Thread Jan Van de Vyle



The problem is I've got a website which should have 
an admin-interface.This interface should only be visible if you call i.e. 
admin.website.com. If you call web.website.com you reach the normal browse 
view.
The website shoudn't be doubled, but the links on 
the browse-view normally call the browse-view and not the admin-view.Hope you 
understand the prob.
Thanks in advance!!


Re: [Zope] Zope Book Beta / inserting anchors into the "official" HTML?

2000-11-05 Thread Jan H. Haul

Simon Coles wrote:
> 
> >I wholeheartedly agree with Jason and Chris. I would very much appreciate a
> >PDF version that could be easily printed, or read with Adobe's Reader.
> 
> If you have the full version of Adobe Acrobat (you have to pay for
> it, as opposed to the free Reader) you can "Capture" web pages into a
> PDF. I created a PDF of the Zope Book beta to read on the train
> today. PDFs created in this way are full text searchable :-)

Well, that is not exactly the point - anybody can use, e.g.,
htmldoc (a very fine tool from www.easysw.com, which is not a big
moneydrain as Adobe distiller is).
The point in favor of a semi-official draft copy PDF is that it
gives us a common reference frame for reviews and feedback. The
PDF would mean everybody has the same page and line numbers,
while HTML has no such concept.

Hmmm. It would be pretty easy to cook up a script to number all
the  tags and include that number in the HTML as comments or,
even better, anchors so you can directly link to a paragraph). Of
course this makes sense only if it is done consistently, i.e., at
the source. That would certainly be fine with O'Reilly.

Cheers,
Jan

___
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-11-05 Thread Jan H. Haul

Fred Yankowski wrote:
> 
> I agree completely that the Zope Book beta will get more reviewers,
> and better feedback to the authors, if it is available as PDF.  

A valid point.
I do not care about the format that much. But what I care about
is a clear method of referencing the text, to the line or
paragraph level, so that we can get comments and corrections to
the authors/copyeditors efficiently.

A PDF *with page and line numbers* would fit the bill nicely. As
would a HTML file with paragraph numbers (as HTML comments,
maybe?).

The point is that we should be able to give meaningful feedback,
like "page 147, line 15: there should be their" (a totally
made-up example, do not go hunting for that one).
It just does not do to quote full sentences and have the
copyeditor search for all that stuff. Too much wasted time on
both ends.

Cheers,
Jan

___
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] again: install Zope under Solaris 8

2000-10-23 Thread Jan-Thies Baehr

Hi,

I just want to resume a thread from september. Has anyone else
encountered problems installing Zope (in our case 2.2.2) under Solaris
8? And more important: Do you know a solution?
Python is unable to import the ExtensionClass. I tried it from
commandline 
(python 1.5.2 (#1, Oct 19 2000, 13:55:34)  [GCC 2.95.3 19991030
(prerelease)] on sunos5)
also and got the same Import Error:


--- command and traceback following

[~/Zope-2.2.2] ./start

Traceback (innermost last):
File "/./Zope-2.2.2/z2.py", line 554, in exec "import "+MODULE in {}
File "", line 1, in File
"/./Zope-2.2.2/lib/python/Zope/__init__.py", line
94, in import ZODB, ZODB.ZApplication, imp
File "/./Zope-2.2.2/lib/python/ZODB/__init__.py", line 85, in 
import sys, ExtensionClass, TimeStamp, cPersistence, Persistence
ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error:
file /mnt/disk2/homes/wklinik/Zope-2.2.2/lib/python/ExtensionClass.so:
symbol PyImport_ImportModule: referenced symbol not found
--

Thanks,
  Thies Bähr.

-- 
-------
 Jan-Thies Bähr  
 Intelligent Visualization & Simulation
 DFKI GmbHEmail: [EMAIL PROTECTED]
 D-67608 Kaiserslautern (Germany) Phone: +49 (0) 631 205-4565
---

___
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] 'Offline' mailhost

2000-10-09 Thread Jan H. Haul

Michael Bernstein wrote:
> 
> "Jan H. Haul" wrote:
> >
> > Each of these will be around 42 KByte large.
> >
> > Huh? Why that? you ask.
> > Because in the header of each mail, the whole recipient list will
> > be listed under To: or Cc:
> > [snip]
> > - privacy: You would not like to have "your" recipients end up on
> > other people's mailing lists
> 
> What about using BCC: ?

That would effectively sending one separate mail to each
recipient, without giving you the full benefit of being able to
identify each in case of bounces.
I'd recommend using mailing list processing software (ezmlm on
qmail is especially handy, or majordomo) for the task - it is in
fact written for just this, and makes your life so much easier.
If someone insists in reinventing wheels, well, Monty Python has
a nice sketch on the topic :-)

Jan

___
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] 'Offline' mailhost

2000-10-07 Thread Jan H. Haul

Terry Kerr wrote:
> 
> Chris Withers wrote:
> 
> > Hannu Krosing wrote:
> >
> > > Also you could send just one message to all the recipients instead of
> > > sending individual messages.
> >
> > Urm, they could be pretty unfriendly mail messages if they're being sent
> > to a coupla thousand people. The bandwidth dcoming out of your server
> > alone would be far higher than it needed to be :-(
> 
> How would the bandwidth change??

Well, suppose you send a message of, say, 2 KByte (about one page
of typed text) to 1,000 recipients. You'll make about 1,000
connections to the recipients' MX hosts. 

Each of these will be around 42 KByte large.

Huh? Why that? you ask.
Because in the header of each mail, the whole recipient list will
be listed under To: or Cc: (I assumed 40 bytes per address as a
roundabout figure). In the envelope (what the SMTP protocol
*uses* to deliver the message, only one address will be used, the
body To: list is mainly for the recipients' use (to show them who
else got it).

Besides, there are other problems why you will want separate
mails:

- privacy: You would not like to have "your" recipients end up on
other people's mailing lists
- stability: When E-mail bounces, you would like to hanle it
intelligently, like trying this address once again (as it could
be a temporary outage) and take the address off the list if it
still bounces a week or so later
- stability again: You woulld not like to be blacklisted as
either a spammer or clueless by the recipients' postmaster :-)

I would probably use a stable MTA (like qmail, which has good
mailing list processing software, or postfix) for the job.

Cheers,
Jan


___
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] Barcodes, magnetic cards, etc.

2000-08-27 Thread Jan H. Haul

On Wed, 23 Aug 2000, Erik Enge wrote:
> 
> > And, by the way, do you know if there exist a magnetic card scanner
> > that plugs in to the PS/2?  And if yes, which information would get
> > from such a card?  Just a number, or are there other possibilities?
> >
> [Curtis Maloney]
>
> What is on the card is, strangely enough, what is on the card.  Magstripe
> readers commonly interface to ps/2 keyboard ports via a 'chok' or 'wedge',
> which just plugs inline with your regular keyboard.

Several vendors (afair, Keytronic and Cherry at least) make
keyboards with integrated magnetic or smart card readers, both in
regular PS/2 format as well as smaller keyboards for the POS
(cash register) market.
In effect, these keyboards behave such that when you swipe a
card, the contents of the selected track (magnetic cards usually
have three tracks, see the relevant ISO standards for details) is
"typed". Often, the magnetic card data is prefixed by an
identifier, but that's about it. If you swipe a card (or scan a
barcode with your keyboard-attached barcode reader) while in a
text editor, you'll see what the reader "types" just as if the
user typed it.

Most of the barcodes are standardized, albeit by different
standards bodies. UPC, EAN and such are used on food cans and the
like. 2 of 5 and similar are used for various purposes, e.g.,
labelling sample bottles for medical labs so you are not treated
for that other person's ailments...

Use your favorite search engine on bar codes and magnetic cards.
This is not really a Zope issue, as Zope never notices that the
article ID or whatsnot was scanned, not typed.

Jan

___
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 on AlphaStationNT...

2000-08-20 Thread Jan H. Haul

Jim Hoepner wrote:
> 
>Part 1.1Type: Plain Text (text/plain)
>Encoding: quoted-printable
>I am a total Zope newbie.  I am trying to run Zope on a AlphaStation running NT.  I 
>get a "service specific error 1"  >when I try to start Zope.

>I am using a utility called FX!32 which lets me run Win32 programs on my Alpha.
>"Compaq FX!32 (TM) lets you install and run 32 bit, x86 programs on
>   your Windows NT Alpha system."

>Does anyone have any info that might help?

>Please reply to [EMAIL PROTECTED] as I am not subscribed to the list yet.

>Thanks!
>jrh

Ok, I wil just guess.
Try to find Python 1.5.2 for your Alpha on NT (a search on
python.org should help). Worst case, take the Python source and
run it through your C compiler.
Then, take a regular Zope source release and install that.
I have never used NT on Alphas.

Another way would be to install Linux on your Alpha. There, the C
compiler is standard, Python is probably included in your Linux
distribution, and so it gets all rather easy.

HTH,
Jan

___
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] doesn't?

2000-08-20 Thread Jan H. Haul

Tino Wildenhain wrote:
> 
> Hi,
> 
> Chris Withers wrote:
> >
> > Hi,
> >
> > Is is just me or does stuff inside a  get parsed?
> >
> > So if you have:
> >
> > 
> >
> >  ... some syntactically bad dtml ...
> >
> > 
> >
> > You still can't save the page 'cos the the parser throws up an error.
> >
> > That seems silly to me. Anyone else agree?
> 
> No, I disagree. Why do you want bad dtml even inside comments?

For example to find out what exactly is bad about them - i.e.,
you develop something, you cannot save it, ok, lets comment out
the part I am not sure about and try again. Or work in progress
(hey, I've gotta sleep sometime) that you want to be stored in
the ZODB even though it's not finished. Astonishingly, some
really difficult 3am problems become surprisingly easy at 9am
after a few hour's sleep.

> dtml-comment is a tag like all the other tags. It does not
> control the parser. One advantage is, you may nest comment-tags.

True.
But still, the parser could read over all comments as long as the
 tags are properly nested.

Jan

___
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] Newbie Question (Content Manager Tutorial)

2000-08-19 Thread Jan H. Haul

"Mark A. Pappas" wrote:

> I installed Zope 2.2.0 on a Win 98 machine. Seems to work fine. I dloaded
> the Content Manager Guide and started working through the tutorial. Went to
> create a folder as instructed.
> 
> Below is what I got. What am I doing wrong?
>
> Error Type: SuperCannotOwn
> Error Value: Objects cannot be owned by the superuser
> 

You are working as superuser.
While this *did* work up to Zope 2.1.6, since Zope 2.2 the
security model was tightened.

You must (as superuser) create a user with manage privilege,
restart your browser and use that user to create objects.

HTH,
Jan

___
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] Fw: [Zope] Parameter in ZSQL

2000-08-13 Thread jan

Indra Gunawan wrote:
> 
>  Thanks man that really works..!!...
>  I want to ask another question
>  can I retrieve a random row from a table?

Yes, you can - but how is a bit dependent on your database, if
you want it to be efficient. The problem here is that SQL does
not by itseld define a rownum or similar.

If, on the other hand, you have a unique, sequential "id" column
in your table, you can use that in a SELECT statement.
Read up on SELECT in your SQL manual.

Probably, I'd do it as follows (untested, but should give you the
general idea):

in your DTML method, use an expression to get a random value
between 1 and the number of rows in your table. An SQL method
like

 SELECT count(*) AS rowcount FROM table;

gives you the total number of rows.

An expression like int(rnd()*rowcount) will give you a random
value to use in a SELECT (you'll need to define it as a parameter
or pass it in via REQUEST). You could use your current
ShowProduct for that. For the details of the random call, see
your Python manual (mine is in the office).

HTH,
Jan

___
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] ZCatalog attachments?

2000-08-13 Thread jan

> > Simon Coles writes:
> >  > We have binary files stored in Zope, for example Word documents (but
> >  > could be any of a variety of document types).
> >  >
> >  > We would like to be able to index and search the contents of these
> >  > files using ZCatalog. So if a Word file contains the word "Fred",
> >  > then any search for "Fred" would include that file in the list of
> >  > documents returned.
> > Someone else already told you, that you must create a parameterless
> > method (it need not necessary be named "PrincipiaSearchSource")
> > that returns the files content.
> >
> > You may not need to keep the rendered version around but
> > may be able to extract the plain text on demand.
> > I think, there is a "word.dll" that provides access to
> > MS Word from applications. Alternatively, you could
> > control Word via COM.

Ther is a Perl (I know, I know...) script to convert Word DOC
files into HTML. That should work well enough to make the stuff
searchable (I would use doc2html.pl | lynx -d to get a pure ASCII
version, though).
It is probably fast enough to just render on the fly (i.e., upon
indexing).

HTH,
Jan

___
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 on Linux, Oracle on another machine (Solaris) what to do?

2000-08-13 Thread jan

Chris Beaumont wrote:
> 
> Hello,
> 
> Newbie question here...  Thank you for any and all help...
> 
> The subject line says it all..
> 
> What's the best way to connect an instance of Zope running on a Linux
> box to an instance of Oracle 7.3 running on a Solaris box in the same
> subnet...
> 

You have to set up the Oracle client library (OCI) on the Linux
box.

The (slightly) tricky part is setting up the file Oracle SQL*Net
uses
to know where the server(s) are. That file is
$ORACLE_HOME/network/admin/tnsnames.ora (I could be slightly
off-key
on the path, but is certainly named tnsnames.ora).

In there, you create an entry for each Oracle instance you want
to access 
(see the manual or use one of the examples provided - if you
cannot figure 
it out, mail me and I'll provide an example; I do not have Oracle
installed 
here at home).
Then you set up your database connection within Zope just as if
it were a
local database - Zope will not know, as the Oracle library (wit
SQL*Net)
hides this detail quite effectively.

I have such a set-up working on Oracle 7.3 server on Solaris
(Zope is on
a Sparcstation 5 running Solaris 7, the Oracle Server is an
Enterprise 4000
running Solaris 2.6 for now).

You probably do not want to use ODBC. It tends to be slower, and
generally
is another layer of software that can break without giving you
enough
benefit for the hassle, in my opinion.)
On a different key, I'll try out Interbase on my testbed system
and see how
that works. Looks like a viable alternative, for now. Much
smaller footprint
than Oracle, and significantly cheaper.

HTH,
Jan

___
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] Confusing posts (was Re: [Zope] password)

2000-07-30 Thread jan

Jonathan Desp wrote:
> 
> Hi,
> 
> the program zpasswd prompt.
...
> Filename is not option, and should be the name of the file to store the
> information in.

...

> What I should write in this source code from zpasswd ? -->

What is your question, now?
Generally, you should not write anything in the source code to
zpasswd.py, unless you want to change how it works. But you know
that, don't you.

Jonathan, it happens often on the list that someone posts
confusing questions, where people scratch their head for some
time trying to figure out what the person's problem might be.
This is rather inefficient, as the person does not get the answer
they want, or get an answer that does not fit their problem (as
the answering person did not understand it).
Unfortunately, your posts fall rather often in this category.

I would recommend that, when asking a question to the list, to
- take time describing your problem clearly, assuming the reader
knows Zope but not your application;
- make clear what you want to achieve;
- make clear if you either have a question how to do something,
or if anything does not work as you expected;
- wait at least one hour and re-read your post to verify that it
is fully understandable before actually posting it;
- if at all possible, have some other person read your post and
ask them to rephrase your question back to you, i.e., make sure
that they get your real question from your post.

More work? For you, initially yes. For all together? No, a lot
less. For you untilk you get an answer? Probably not, as you are
much more likely to get an answer to your problem, without
several exchanges back and forth.
In any case, it is making better use of the time of people
wanting to help you, and prevents them from just adding you to
their kill file (as I was very nearly to do at some time).
And it is likely to give you a better standing in the Zope
community. 

This is not to say that I am perfect in that respect - even after
some fourteen years on mailing lists I still manage to send out
posts that I find less than perfect upon reading them when they
come back from the listserver. But one must always strive for the
best :-)

Cheera,
Jan

___
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.org down

2000-07-29 Thread jan

Chris Withers wrote:
> 
> Chris McDonough wrote:
> > The InterbaseStorage product is full-featured (undo, versioning).  But
> > I've gotten little response to releasing it, and I don't think anyone is
> > using it, so bugs are sure to exist.
> 
> I don't think you announced this loudly enough ;-)
> 
> Is interbase stable/OSS? 

Yes, it has been developed by Borland/Inprise commercially for
many years. They open-sourced it recently, going through a long
beta period.

> Where can I get it from?

http://www.inprise.com

> Where is the
> InterBaseStorage product (and documentation ;-) available?

See the ZopeTreasures page Beehive has set up. A nice piece of
work in tasteful day-glo colors :-)

Jan

___
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] Select in ZSQL

2000-07-17 Thread jan

Diego Rodrigo Neufert wrote:
> 
> Hi...
> 
> I'm having problems with this select statement in ZQL using a MySQL db:
> select table1.id, table2.id from table_x table1, table_y table2
> 
> I got this error:
> Error, exceptions.ValueError: Duplicate column name, id

Because you *have* identical (duplicate) column names, namely,
'id'.

If you just forgot a join condition, you'd write

   select table1.id
   from table1, table2
   where table1.id = table2.id;

thus ypu have only one 'id' column, as is proper (because they
are identical anyway, by virtue of the join condition - the where
clause.)

If, on the other hand, you really want the cartesian product (*),
then you would write

   select table1.id as id1, table2.id as id2
   from table1, table2;

thereby giving different names to the two 'id' columns.

HTH,
Jan

(*) e.g., let's assume both table have only the id column. Table1
holds the rows '1' and '2' (values of the column), table2 holds
the rows '3', '4', and '5'.
Then,

   select table1.id as id1, table2.id as id2
   from table1, table2;

would render

   id1  id2
   ---  ---
   13
   14
   15
   23
   24
   25

i.e., all possible combinations of the values in both tables,
called the cartesian product. For larger tables, this gets huge
soon :-)

More on this in any decent text on SQL.

___
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] HTML Editors that recognize DTML (was bastardized form of XML)

2000-06-24 Thread jan

OK, now the same question (what HTML editor understands / can be
made to understand DTML), but rund on Linux instead of Windows?
Right now, I use vi. I'll have to try the vim ftp plugins I've
seen on the list.
Anything else that works?

Cheers,
Jan

... see you at Linuxtag 2000

___
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] Probably a simple name space question

2000-06-21 Thread Bert Jan Bakker

Hi all,

I'm struggling with a problem in DTML
for a day now and I'm ready to beg for
someone to enlighten me.

Problem:

I want to call a Z SQL Method (say InsertFoo)
from a DTML Method (say CallingInsertFoo) and 
it just won't work.

The Z SQL Method takes three arguments, let's
call them a_id, b_id and c_id.

All three arguments are available to me
in the calling DTML Method. I can print
them in HTML. But when I call the query
with  I get the following
error:

"Error Type: Bad Request
 Error Value: ['a_id', 'b_id', 'c_id']"

I tried all sorts of things but I'm thinking
I am missing something obvious.

What am I doing wrong???


Greetings, BertJan Bakker

___
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] How to ZCatalog DTML documents and/or HTML files automatically?

2000-06-03 Thread jan

Hello,

this is probably a stupid question, But I'm damned if I can find
a solution :-(

We have an internal site to store technical documents (in HTML
or as DTML documents).
We are using ZCatalog to provide an index for it.

Now, we want to have some mechanism that updates the index every
night (including pages added during the day).

On this list, I have read that the obvious solution, ZScheduler,
"does not work". I take it "does not work reliably for all
conceivable uses". 
Does this mean it is likely to work for what I have in mind? Are
there any other ways to achieve it? I am running this on Unix
(Solaris 7, in fact).

Confused,
Jan

___
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 )