[Zope-dev] ZPatterns: SkinScript semantics

2001-01-20 Thread Steve Alexander

In a SkinScript COMPUTE statement, should I be allowed to supply 
different names in the OTHERWISE LET section as in the attributes section?

For example:

WITH some_query() COMPUTE
   foo,bar,baz
OTHERWISE LET
   foo='There is no foo',
   spoon='There is no spoon'


Looking at the ZPatterns code, I don't think this attribute provider 
will get registered for providing "spoon", although "spoon" will get 
calculated if foo, bar or baz is requested.

On the other hand, you could consider the above as a shorthand for:

WITH some_query() COMPUTE
   foo,bar,baz,
   spoon=NOT_FOUND
OTHERWISE LET
   foo='There is no foo',
   spoon='There is no spoon'

In which case, it works entirely as expected.


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net




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




[Zope-dev] ZPatterns patches

2001-01-20 Thread Steve Alexander

I've put an extensive patch to ZPatterns 0-4-3b2 here:

   http://www.cat-box.net/steve/ZPatterns.patch

The patch includes the following:

* Fix to _memento class so it works with Zope 2.3

* Alteration to GAPMixin so the the attributes it says it provides come 
from the union of the assignments and the defaults.

* Add style="width: 100%;" to SkinScript edit textarea, in line with 
other zope textareas.

* Add syntax to SkinScript "INVALIDATE FOR". You can put an optional 
invalidate-for clause at the end of a compute statement. This causes the 
attributes provided by the statement to be invalidated from the 
dataskin's attribute cache when any of the attributes named after 
INVALIDATE FOR change. It is easier to demonstrate than to explain :-)


There's also an updated PlugIns/www/main.dtml file at:

   http://www.cat-box.net/steve/main.dtml


An example of the new SkinScript syntax:

WITH SELF COMPUTE
   name='%s %s' % (forename, surname)
INVALIDATE FOR
   forename, surname

This is useful if you're providing attributes from another DataSkin. 
Here's an example from some school management software. This is an 
attribute provider for Pupils. A Pupil may have an Instructor. This is 
implemented by the attribute instructor_id of Pupil.

# the instructor is only valid if the pupil is current
WITH SELF COMPUTE
   has_instructor=instructor_id or 0 and current and 1

# don't use has_instructor below, or the instructor details for
# cataloging won't get updated when the assigned instructor changes
# from no instructor to having an instructor.
WITH self.instructor_id and self.current and
   Instructors.getItem(self.instructor_id) or NOT_FOUND COMPUTE
   instructor_name=name,
   instructor_name_link='a href="%s"%s/a' %
 (absolute_url(), html_quote(name)),
   instructor_sort_key=sort_key,
   instructor=RESULT
OTHERWISE LET
   instructor_name='no instructor',
   instructor_name_link='no instructor',
   instructor_sort_key='',
   instructor=_.None


The problem here is that I can't use has_instructor in the WITH clause, 
if I'm also using has_instructor in the same transaction as I'm updating 
instructor_id. I have to use "self.instructor_id and self.current" 
instead, as above.

However, with the new syntax, I don't have to worry about that:

# the instructor is only valid if the pupil is current
WITH SELF COMPUTE
   has_instructor=instructor_id or 0 and current and 1
INVALIDATE FOR
   current, instructor_id

WITH has_instructor and Instructors.getItem(self.instructor_id)
   or NOT_FOUND COMPUTE
   instructor_name=name,
   instructor_name_link='a href="%s"%s/a' %
 (absolute_url(), html_quote(name)),
   instructor_sort_key=sort_key,
   instructor=RESULT
OTHERWISE LET
   instructor_name='no instructor',
   instructor_name_link='no instructor',
   instructor_sort_key='',
   instructor=_.None


Thanks to PJE for pointing me in the right direction on how to implement 
this.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net



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




Re: [Zope-dev] Import/Export in 2.3beta2

2001-01-20 Thread Christopher Petrilli

The reason it's gone is that it's not really a "view" of hte folder, but an
action.  It is, however, a bug that the button doesn't show up if the folder
is empty.  I'm quite sure Brian will fix this ASAP.

Chris
--
| Christopher Petrilli
| [EMAIL PROTECTED]
- Original Message -
From: "Andy McKay" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 19, 2001 6:42 PM
Subject: [Zope-dev] Import/Export in 2.3beta2


 Is this a stupid question, or why cant i Import/Export into a folder in
2.3
 b2 (Windows), there seems to be no tab...

 --
   Andy McKay.




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




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




[Zope-dev] Added rename to ZOPE FTP server

2001-01-20 Thread Tom Vijlbrief

Hi,

I've added the rename capability to the Zope FTP-server,
so I could use the KDE FTP client (this is a known Zope bug).

I attached the 3 modified files (from the 2.2.5 src distro).

There is however another problem in the ZOPE ftpd which
is probably not related to my patches, but for which I have
not found the cause.

The SIZE command (used by the KDE ftp-client as a 
kind of file-exists probe)
reports the size of identical named objects
higher in the tree, to reproduce:

copy with the KDE FTP client a directory tree which has
fileabc in the top directory and a file "fileabc" in a subdirectory
to the Zope ftp server.

The SIZE command returns a size (for a
non existing object!) but the LIST command works o.k.
(reports an error: could not list directory)


127.0.0.1:3771 == mkd testdir
127.0.0.1:3771 == 257 MKD command successful.
127.0.0.1:3771 == mkd testdir/adir
127.0.0.1:3771 == 257 MKD command successful.
127.0.0.1:3771 == type I
127.0.0.1:3771 == 200 Type set to Binary.
127.0.0.1:3771 == SIZE testdir/fileabc
127.0.0.1:3771 == 550 Error getting file size.
127.0.0.1:3771 == type I
127.0.0.1:3771 == 200 Type set to Binary.
127.0.0.1:3771 == SIZE testdir/fileabc.part
127.0.0.1:3771 == 550 Error getting file size.
127.0.0.1:3771 == type I
127.0.0.1:3771 == 200 Type set to Binary.
127.0.0.1:3771 == PASV
127.0.0.1:3771 == 227 Entering Passive Mode (127,0,0,1,14,190)
127.0.0.1:3771 == stor testdir/fileabc.part
127.0.0.1:3771 == 150 Opening Binary connection for
testdir/fileabc.part
127.0.0.1:3771 == 226 Transfer complete.
127.0.0.1:3771 == RNFR testdir/fileabc.part
127.0.0.1:3771 == 350 RNFR command successful.
127.0.0.1:3771 == RNTO testdir/fileabc
127.0.0.1:3771 == 250 RNTO command successful.
127.0.0.1:3771 == SITE CHMOD 644 testdir/fileabc
127.0.0.1:3771 == 500 'SITE': command not understood.
127.0.0.1:3771 == type I
127.0.0.1:3771 == 200 Type set to Binary.
127.0.0.1:3771 == SIZE testdir/adir/fileabc
127.0.0.1:3771 == 213 2
127.0.0.1:3771 == cwd testdir/adir/fileabc
127.0.0.1:3771 == 550 No such directory.
127.0.0.1:3771 == type A
127.0.0.1:3771 == 200 Type set to ASCII.
127.0.0.1:3771 == PASV
127.0.0.1:3771 == 227 Entering Passive Mode (127,0,0,1,14,192)
127.0.0.1:3771 == list testdir/adir/fileabc
127.0.0.1:3771 == 550 Could not list directory. 

-- 
Tom Vijlbrief   [EMAIL PROTECTED]
 FTPRequest.py
 FTPServer.py
 ftp_server.py


[Zope-dev] Better test case for Bug 1783: Persistent __call_method__() interferes with __getstate__

2001-01-20 Thread John D. Heintz

Hello all,

The following is the best test case I have so far for bug 1783.

The behavior of the bug is that no CMethods from Persistent can be 
called indirectly when the __call_method__ hook is present.  This means 
that I can't override any of __getstate__, __setstate__, _p_deactivate.

#!/usr/bin/python
import ZODB
from Persistence import Persistent

class P(Persistent):
def __call_method__(self, meth, methArgs, methKW={}):
return apply(meth, methArgs, methKW)

p = P()

p.__getstate__()

#This throws exception!
Persistent.__getstate__(p)


TypeError: function requires exactly 0 arguments; 1 given


-- 
. . . . . . . . . . . . . . . . . . . . . . . .

John D. Heintz | Senior Engineer

1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | [EMAIL PROTECTED]

w w w . d a t a c h a n n e l . c o m


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




Re: [Zope-dev] Added rename to ZOPE FTP server

2001-01-20 Thread Joachim Werner

Tom Vijlbrief wrote:

 Hi,
 
 I've added the rename capability to the Zope FTP-server,
 so I could use the KDE FTP client (this is a known Zope bug).
 
 I attached the 3 modified files (from the 2.2.5 src distro).
 
Dear people at DC! Please get that into the CVS ASAP. This is a very big 
issue for Linux users! (I reported this bug right after KDE2 came out)

Cheers

Joachim




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




[Zope-dev] MS-SQL Server Connector

2001-01-20 Thread Adrian Hungate

Is there a database connector or similar for MS-SQL Server that might run on
non-windows Zopes?

Adrian...


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




Re: [Zope-dev] LoginManger: multiple LoginMethods

2001-01-20 Thread Phillip J. Eby

At 06:38 PM 1/7/01 -0800, John Eikenberry wrote:

Anyways... I want to be able to support both cookie based auth and basic
auth. With cookie based auth being the default unless they don't have
cookies (either because they have them turned off, behind a proxy filter,
etc), in which case they should use basic auth. The problem is I'm not sure
how to get it to use something other than cookie based auth. The default
setup tries to use cookie auth whether or not cookies are in use.

Any tips on how to get this working? I know there is no great way of
detecting cookies, besides setting one and testing for it. But even if I
did this, how do I say I want basic auth if the test cookie isn't found.


Doing a: raise "Unauthorized" or RESPONSE.setStatus(401) will tell the
browser to pop up an authorization dialog.  Note that if you do this, you
won't be able to also display a login form for cookies.

For all practical purposes, you need a seperate login page for cookies vs.
basic auth.


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




[Zope] specifying namespace stacks in dtml-with

2001-01-20 Thread Michael Halle


I was thinking about something I'd consider a useful addition to the
dtml-with tag; I'd like to get other people's opinions, especially
about a couple syntax issues.

Problem: In part because of the combination of the dtml namespace
stack and acquisition, it's often hard to get exactly the name
resolution you want in Zope.  For example, I think it's really useful
to want the following:

   "Call an object, found by acquisition, using its "natural" namespace,
except include a small number of symbols found in the local namespace.
When evaluating the local symbols, do so in the local namespace."

Why is this useful?  Because it cuts down on accidental interference
of the local namespace in the evaluation of an object, which
acquisition exacerbates because it multiplies the number of symbols in
the local namespace. I'd even go as far as to say that the above
action is what most people want to do most of the time.

How do you do it?  If you do:

dtml-with object
  dtml-with expr="_.namespace(name1=local_object1, name2=local_object2)"
dtml-var object
  /dtml-with
/dtml-with

(or the equivalent using an inner "let" tag instead of "with") you get
the right nesting, but "local_object1" and "local_object2" are
evaluated in "object"'s namespace, not the local one.  I *think* the
only way to do it right (I haven't tried it) is:

/dtml-let ns="_.namespace(name1=local_object1, name2=local_object2)"
  dtml-with object
/dtml-with ns
  dtml-var object
/dtml-with
  /dtml-with
/dtml-let

That way, you can get a namespace evaluated in the local scope onto
the top of the namespace stack to override the object's symbols.
You've got to go through contortions to swap the order of the
namespace stack without introducing unwanted evaluation side effects.

Yuck!

I think is would be much cooler, and more general, to be able to
specify a namespace stack as a list for dtml-with:

dtml-with "[_.namespace(name1=local_object1, name2=local_object2), object]"
/dtml-var object
/dtml-with

The "with" tag's entire expression would be evaluated in the local
scope, *then* a namespace stack would be constructed, using elements
of a list.  

If you had several objects already, the syntax is even cleaner:

dtml-with expr="[object1, object2, object3]"
  ...
/dtml-with

In short, this construct lets you build a well-defined namespace stack
without worrying as much about unwanted scope interaction.  It's even
not that hard to write the implementation, except for a couple
questions.

-- First, the "mapping" attribute to "with" is per-namespace; how do
you specify it for elements of the stack?  (The "only" attribute is
okay, it is specified once per stack.)  It would be limiting to say
that all namespaces pushed onto a stack would need to be all be
mappings or all be objects.

-- Second, is the expression for "with" currently ever a sequence?  If
so, then you'd have to recognize and distinguish between the old and
the new usages.  I don't think there's much of a problem here, although
the "with" tag code does do a little checking about whether its
expression is a tuple.

-- Finally, what's the natural order of the stack?  If you give the argument
"[a, b, c]" to "with", is "a" or "c" on the top of the namespace stack?
I'd probably say "a".

I'd appreciate any ideas/suggestions others may have.  Thanks!


Michael Halle
[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] Seminar on Zope at City University, London, UK on 15th Jan

2001-01-20 Thread Paul Browning


Not a bad turn-out (30ish) for a cold night 

Pointers to the presentation now available at:

http://www.business.city.ac.uk/ero/150101.html

Paul

--
 The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK
 E-mail: [EMAIL PROTECTED]  URL: http://www.bris.ac.uk/


___
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] Re: Workflow and document management system in Zope

2001-01-20 Thread Nicolas Pettiaux

Dear Mr Boulanger,

Thank you very much for your input. 

 I don't think there is such as system polished and ready within 2
 weeks. 

I do NOT need a polished system within 2 weeks. I need a proof of concept . 

The production system shoudl run in 2 or 3 months ... and could be optimized 
afterwards also, in order to be polished. If it is well though already this 
should be possible.

What could you do or take in charge ?

Best regards,

Nicolas Pettiaux

Le Samedi 20 Janvier 2001 00:51, albert boulanger a crit :
 I am looking for a workflow (WF) linked to a electronic document management
(EDM) system and a groupware email based (I have just happened to come
accross aethera from the Kompany) that would be free software and
 preferably in Zope + Python. The WF+DEM system I am looking for need to be
 usable with only a browser (to be independant from the client ... that
 could be proprietary !), store its data into a postgresql database. It
 should be demonstrablable (at least showable into a proof of concept)
 within 2 weeks and be already installable and usable within 2 or 3 months.
 (I have obtained taoday that the date when we'll decide on the system would
 be postponed 2 weeks from wednesday 24/1 to wed 7/2)
If I could find such a marvel, I may find the money to pay for it, at
 least 5 $ to start with (this amount is a rapid guess; I may give more
 precise amounts we could spend in the following week)

The idea is to use that combination of tools INSTEAD of buying a closed,
proprietary solution (that may exist but be expensive and really har to
parametrize), that NEED to be linked to a SAP ERP system.

All suggestions and ideas are welcome, also on the selection criteria.

(I happen to be responsible for the IT dept of the public institution
 that wants to buy such a tool, but be new in the place and do not yet know
 a lot about WF and EDM !)

Soon I may be able to give you more details about the requirements.

 I don't think there is such as system polished and ready within 2
 weeks. Here are some starting points:

 use wftk as a basis, the open source workflow toolkit --
 http://.vivtek.com/wftk

 use openflow, a Zope based, but stalled project,
 http://openflow.sourceforge.net

 use Chautauqua, an old python based workflow system,
 http://www.cs.colorado.edu/~carlosm/chautauqua.html

 use the old UCI Endeavors workflow (java) system
  at http://www.ics.uci.edu/pub/endeavors/endeavors.html

 We have not bit the bullet and built anything yet.

 Regards,
 Albert Boulanger
 [EMAIL PROTECTED]

-- 
Nicolas Pettiaux
Avenue du Prou 29
B-1000 Brussels

___
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] Zope 2.3.0b2 bug

2001-01-20 Thread Oleg Broytmann

Hi!

   Little bug - if there is no items in a folder - there is no
"Import/Export" button. :) I have to create a dummy item to import a zexp.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] Zope 2.3.0b2 bug #2

2001-01-20 Thread Oleg Broytmann

It is not exactly bug, but VERY unplesant misfeature:

   Zope now sends all HTML in management screens with

meta http-equiv="content-type" content="text/html; charset=iso-8859-1"

   This is WRONG way of doing! Please stop it and don't do it :) Meanwhile
- where I can turn this off?

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] Zope build script

2001-01-20 Thread Oleg Broytmann

Hello!

   http://www.zope.org/Members/phd/build-zope/

   Zope build script helps to build Zope from sources. The script:

-- runs python w_pcgi.py
-- runs python zpasswd.py inituser|access
-- generates root.sh - a script to run under root to complete the
  installation; root.sh set up right ownership and permissions in the
  installation tree.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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 build script

2001-01-20 Thread Oleg Broytmann

On Sat, 20 Jan 2001, Oleg Broytmann wrote:
http://www.zope.org/Members/phd/build-zope/

   Oops, forget to say - the script was updated for Zope 2.3 (it now
asks for "inituser" along with "access"). The script still can be used for
Zope 2.2.

Oleg.

 Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
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] batch processing problem

2001-01-20 Thread Timothy Wilson

Hi everyone,

I was trying to throw together a page with some pictures of my brand-new
nephew for his parents to show to relatives. What should have been a
relatively simple dtml-in iteration through a folder full of images has
turned out to be headache inducing. I'm sure that there's something I'm just
not understanding, but I can't figure out why the following doesn't
work. I've tried many different combinations without success. You can see it
for yourself at http://208.42.140.222:9673/olsen/cullypics/ (Sorry, DNS
problems.)

dtml-var standard_html_header

h2 align="center"Cullin Isaac Olsen/h2
h3 align="center"January 17, 2001br8 lb. 1 oz., 22 in./h3
br

table align="center" cellspacing="10"
dtml-in "PARENTS[0].objectValues(['Image'])" size=1 start=query_start
sort=display_order
tr
 td colspan="2"
  span style="font: bold larger Verdana, Arial, Helvetica,
sans-serif"Picture #dtml-var display_order/spanbr
  a href="fullsize/dtml-var id_fullsize"dtml-var sequence-item/a
  dtml-if titleh4 align="center"dtml-var title/h4/dtml-if
 /td
/tr
tr
 td
  dtml-if previous-sequence
   p align="left"a href="dtml-var URLdtml-var
sequence-queryquery_start=dtml-var previous-sequence-start-number"p
align="left"Previous picture/a/p
  dtml-else
   nbsp;
  /dtml-if previous-sequence
 /td
 td
   dtml-if next-sequence
p align="right"a href="dtml-var URLdtml-var
sequence-queryquery_start=dtml-var next-sequence-start-number"
   Next picture/a/p
   dtml-else
nbsp;
   /dtml-if next-sequence
 /td
/tr
/dtml-in
/table

dtml-var standard_html_footer

Any ideas?

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.com/


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




[Zope] Creating PDF's

2001-01-20 Thread Tom Deprez

Hi,

I read in Itamar's 'A Developers Guide to learning Zope' about 'Reportlab'.
It is a python library to create pdf files. Is there somebody among here who
already used this library with zope? And is it possible to give a little
example in how we can use it with zope?

Thanks in advance,
Tom.


___
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 2.3.0b2 bug #2

2001-01-20 Thread Aleksander Salwa

On Sat, 20 Jan 2001, Oleg Broytmann wrote:

Zope now sends all HTML in management screens with
 
 meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
 
This is WRONG way of doing! Please stop it and don't do it :) Meanwhile
 - where I can turn this off?

It would be very nice, if we could set it somewhere in configuration.
Till now (Zope 2.2.x) I have to patch Zope (some *.dtml files, and even
some *.py files) in order to have proper Content-Type headers on my
management screens (specifically iso-8859-2).

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


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




Re: [Zope] Creating PDF's

2001-01-20 Thread Tim Cook

Tom Deprez wrote:
 
 Hi,
 
 I read in Itamar's 'A Developers Guide to learning Zope' about 'Reportlab'.
 It is a python library to create pdf files. Is there somebody among here who
 already used this library with zope? And is it possible to give a little
 example in how we can use it with zope?
 

I hope so. But in the interim, I have used ZpdfDocument ( thanks
Gaaros ), with fairly good results. It probably isn't as
configurable as using ReportLab. But, it got the job done. s

-- Tim Cook, President --
Free Practice Management,Inc. | http://www.FreePM.com Office:
(901) 884-4126
"Nearly everyone will lie to you given the  right
circumstances."  
- Bill Clinton

___
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 2.3.0b2 bug

2001-01-20 Thread Martijn Pieters

On Sat, Jan 20, 2001 at 04:33:44PM +0300, Oleg Broytmann wrote:
Little bug - if there is no items in a folder - there is no
 "Import/Export" button. :) I have to create a dummy item to import a zexp.

How about clicking on the Import tab?

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
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 2.3.0b2 bug

2001-01-20 Thread Martijn Pieters

On Sat, Jan 20, 2001 at 08:46:54PM +0100, Martijn Pieters wrote:
 On Sat, Jan 20, 2001 at 04:33:44PM +0300, Oleg Broytmann wrote:
 Little bug - if there is no items in a folder - there is no
  "Import/Export" button. :) I have to create a dummy item to import a zexp.
 
 How about clicking on the Import tab?

Urm, I pulled open my big mouth without checking again... It'll be fixed
for b3.

/me goes and hides somewhere now.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

___
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] __setstate__ and acquisition

2001-01-20 Thread Matt

I am using __setstate__ to reload files into memory for objects of a product I
have made.  This all works nicely, as is it supposed to.  The problem though is
that the object seems not to know about its environment at that time, i.e. it
cannot acquire methods further back in the hierachy, but is able to perfectly
well once it is fully instantiated.  For example a product method may call a
render method that exists quite root to the whole site.  This product method
will work fine when the object is fully instantiated , but trying to call that
render method during __setstate__ fails.

regards
Matt





___
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] if-else using ZSQL resultset sendmail query

2001-01-20 Thread Lee

Hi,

I've got a few questions, which may be answered by saying, "Not
possible"! Any feedback would be appreciated.

get_testclass_details is a ZSQL method returning user data from a table.
I display the data (strangely enough) in an HTML table and I want
alternating rows to have different background colours.

I figure that the best way to do this is to obtain the resultset number
(i.e. is it the 1st, 2nd or 3rd result row) and do something like the
following;

dtml-in...
if (the result set number % 2 == 0)
 bgcolour is white
 ...
else
 bgcolour is grey
 ...
/dtml-in...

Is it possible to obtain the resultset number? 

Also, re: sendmail. I still haven't managed to figure out why it's not
posting messages to newsgroups. Maybe some folks at digicool could let
me know if this isn't supported?

Previous message was:

I have another question re: sendmail, which I'd be grateful if someone
could answer. Am I correct in saying that sendmail does not support
newsgroup postings? Adding the following to my message seems to work but

it is not being posted on the newsgroup...

To: [EMAIL PROTECTED]
Groups: uk.local.glasgow *and* Newsroups: uk.local.glasgow

It sends the mail to me; the group is listed in the header file under
'Newsgroups' when I view *my* received message but it is not getting to
the newsgroup.

Can anyone comment?

Thanks very much for your time,

- Best regards,

Lee


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




RE: [Zope] if-else using ZSQL resultset sendmail query

2001-01-20 Thread Randall F. Kern

dtml-in ...
dtml-if sequence-even
bgcolor is white
...
dtml-else
bgcolor is grey
...
/dtml-if
/dtml-in

If you really need the "resultset number", you can use sequence-number.

As for dtml-sendmail and news, it only sends mail via SMTP, so it
can't be used to post news.

-Randy

-Original Message-
From: Lee [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 20, 2001 1:48 PM
To: [EMAIL PROTECTED]
Subject: [Zope] if-else using ZSQL resultset  sendmail query


Hi,

I've got a few questions, which may be answered by saying, "Not
possible"! Any feedback would be appreciated.

get_testclass_details is a ZSQL method returning user data from a table.
I display the data (strangely enough) in an HTML table and I want
alternating rows to have different background colours.

I figure that the best way to do this is to obtain the resultset number
(i.e. is it the 1st, 2nd or 3rd result row) and do something like the
following;

dtml-in...
if (the result set number % 2 == 0)
 bgcolour is white
 ...
else
 bgcolour is grey
 ...
/dtml-in...

Is it possible to obtain the resultset number? 

Also, re: sendmail. I still haven't managed to figure out why it's not
posting messages to newsgroups. Maybe some folks at digicool could let
me know if this isn't supported?

Previous message was:

I have another question re: sendmail, which I'd be grateful if someone
could answer. Am I correct in saying that sendmail does not support
newsgroup postings? Adding the following to my message seems to work but

it is not being posted on the newsgroup...

To: [EMAIL PROTECTED]
Groups: uk.local.glasgow *and* Newsroups: uk.local.glasgow

It sends the mail to me; the group is listed in the header file under
'Newsgroups' when I view *my* received message but it is not getting to
the newsgroup.

Can anyone comment?

Thanks very much for your time,

- Best regards,

Lee


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


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




[Zope] ZSQL: postgres, SELECT INTO

2001-01-20 Thread Steve Drees

Has anybody selectively used SELECT INTO with zope/postgres?

Zope version: Zope 2.1.6 (binary release, python 1.5.2, linux2-x86)
Python version: 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3]
System Platform: linux2
ZPyGreSQLDA-0-0-3



I'm trying something like:

SELECT DISTINCT
  song, ipadress, date
INTO
TEMP d_requests
FROM
  requests
WHERE
  date  dtml-sqlvar startdate type="string"
dtml-var sql_delimiter
SELECT
  COUNT(*) AS num_requests,
  song
FROM
  d_requests
GROUP BY
  song

-
works fine under psql
zope raises an exceptions.ValueError
and the db connection dies.


traceback follows:
!--
Traceback (innermost last):
  File /path/to/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /path/to/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /path/to/zope/lib/python/Zope/__init__.py, line 180, in
zpublisher_exception_hook
(Object: copy_of_getTopRequests)
  File /path/to/zope/lib/python/ZODB/Transaction.py, line 180, in begin
  File /path/to/zope/lib/python/ZODB/Transaction.py, line 155, in abort
  File /path/to/zope/lib/python/Shared/DC/ZRDB/THUNK.py, line 115, in abort
  File /path/to/zope/lib/python/Products/ZPyGreSQLDA/db.py, line 117, in
_abort
ValueError: PQsendQuery() -- There is no connection to the backend.


--


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




Re: [Zope] HELP: ZPatterns Installation on Linux

2001-01-20 Thread ender

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

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

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

restart zope and you should be good to go.

kapil




On Friday 19 January 2001 14:11, J. Atwood wrote:
 The instructions in the README.txt and on zope.org are a little vague..

 How, indeed, do I " build this extension using the included Setup
 file in the ZPatterns directory" I can see the Setup file but that is
 about it.

 I would be more than happy to write up some documentation (on
 Zope.org) if someone sends me the answer.

 RH Linux 6.2, Zope 2.2.2, Latest ZPatterns

 Thanks,
 J

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

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




RE: [Zope] ZSQL: postgres, SELECT INTO

2001-01-20 Thread Steve Drees

 
 Has anybody selectively used SELECT INTO with zope/postgres?

Make that succesfully.

 
 Zope version: Zope 2.1.6 (binary release, python 1.5.2, linux2-x86)
 Python version: 1.5.2 (#10, Dec 6 1999, 12:16:27) [GCC 2.7.2.3]
 System Platform: linux2
 ZPyGreSQLDA-0-0-3
 
 
 
 I'm trying something like:
 
 SELECT DISTINCT
   song, ipadress, date
 INTO
 TEMP d_requests
 FROM
   requests
 WHERE
   date  dtml-sqlvar startdate type="string"
 dtml-var sql_delimiter
 SELECT
   COUNT(*) AS num_requests,
   song
 FROM
   d_requests
 GROUP BY
   song
 
 -
 works fine under psql
 zope raises an exceptions.ValueError
 and the db connection dies.
 
 
 traceback follows:
 !--
 Traceback (innermost last):
   File /path/to/zope/lib/python/ZPublisher/Publish.py, line 214, in
 publish_module
   File /path/to/zope/lib/python/ZPublisher/Publish.py, line 179, 
 in publish
   File /path/to/zope/lib/python/Zope/__init__.py, line 180, in
 zpublisher_exception_hook
 (Object: copy_of_getTopRequests)
   File /path/to/zope/lib/python/ZODB/Transaction.py, line 180, in begin
   File /path/to/zope/lib/python/ZODB/Transaction.py, line 155, in abort
   File /path/to/zope/lib/python/Shared/DC/ZRDB/THUNK.py, line 
 115, in abort
   File /path/to/zope/lib/python/Products/ZPyGreSQLDA/db.py, line 117, in
 _abort
 ValueError: PQsendQuery() -- There is no connection to the backend.
 
 
 --
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 

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




Re: [Zope] __setstate__ and acquisition

2001-01-20 Thread Evan Simpson

From: "Matt" [EMAIL PROTECTED]
 I am using __setstate__ to reload files into memory for objects of a
product I
 have made.  This all works nicely, as is it supposed to.  The problem
though is
 that the object seems not to know about its environment at that time

__setstate__ is called on the bare object, without any acquisition wrappers.
All you can do at that time is load state and set volatile attributes for
use later.

Cheers,

Evan @ digicool  4-am


___
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] Zope, emacs secure ftp

2001-01-20 Thread Geoffrey L. Wright


Was just wondering what sort of solution people use for secure ftp and
zope.  I'd like to be able to use efs (or ange-ftp) over a secure
connection to zope so I can do development using efs outside of our
firewall.

Does Zope's ftp server support SSL?  Or is there some sort of
SSH-based solution?

Just curious...



//glw


___
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] ZSQL: postgres, SELECT INTO

2001-01-20 Thread Andrew Kenneth Milton

+---[ Steve Drees ]--
| Has anybody selectively used SELECT INTO with zope/postgres?

It's probably dying because there can only be ONE SELECT clause in a
ZSQL Method. The SELECT ... INTO will be triggering a false positive.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[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] __setstate__ and acquisition

2001-01-20 Thread Matt

That makes sense.  Is there any way to explicitly pass the surrounding
namespace to __setstate__ ?

The problem is this :  my product is really a handle to methods that create or
update files on the local filesystem.  Previously I have been building
filenames and paths within the product and then setting them as an attribute of
the object.  However it is nicer for the path components to be acquired from
the current folder/container properties so that an object knows it's location
by way of the environment it is in.  The reason for this ?  I have almost got
my product to the state where is has no persistent attributes, it is instead a
rich set of functions that when instantiated, will use its current environment
to build the datafiles path and name, pick it up or make it, create some
volatile objects, and then allow the user to action one of the many functions
it provides.   The reason for this, the volatile objects can be huge, and I
have thousands of these.  The only thing that ever persists is the id.


So getting back to the first point, if __setstate__ could somehow access the
sorrounding namespace, then that would make it easier.  For now I have a swtich
in the get_filename method, which is called both by __setstate__ and by other
functions in the product.  The switch says : try finding these acquired
features, if you can't then use the local copy of where you last thought you
were.   Then once the object is instantiated any updates that also call this
function will naturally find the new acquired attributes.  This however forces
you to make sure a previous copy of a file still resides in the old location.

matt


Evan Simpson wrote:

 From: "Matt" [EMAIL PROTECTED]
  I am using __setstate__ to reload files into memory for objects of a
 product I
  have made.  This all works nicely, as is it supposed to.  The problem
 though is
  that the object seems not to know about its environment at that time

 __setstate__ is called on the bare object, without any acquisition wrappers.
 All you can do at that time is load state and set volatile attributes for
 use later.

 Cheers,

 Evan @ digicool  4-am


___
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] Zope 2.3

2001-01-20 Thread Tom Deprez

To all who feels him/herself addressed :

Congrats to the new look of zope! And to the new implemented products!

All I can say is ... keep up the good work!

Regards, Tom.


___
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] RE: Workflow and document management system in Zope

2001-01-20 Thread Spicklemire, Jerry

Hi Nicolas,

Your last post mentioned:

 I am looking for a workflow (WF) linked to a electronic document 
 management (EDM) system and a groupware email based 

In addition to other links, you might want to check out ZopeGUM, 
and ZUBBS,

 http://www.zope.org/Members/morphex/ZopeGUM

 http://www.zope.org/Members/morphex/ZopeGUM/Info

 http://www.zope.org/Members/BwanaZulia/ZUBB

 http://www.zope.org/Members/BwanaZulia/ZUBB/README

These may provide some of the groupware  email pieces you 
are looking for. BTW, you may want to consider contacting some 
of the consultants listed on the Zope Solution Providers page. 

 http://www.zope.org/Resources/ZSP

I'm sure the Digital Creations folks won't object to me 
mentioning that in addition to being the sponsors, hosts, and
creators of Zope, they also do consulting, including projects 
involving integrated workflow, such as the PTK.

 http://www.digicool.com

 http://www.digicool.com/Company/

Later,
Jerry S.

___
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] MS-SQL Server Connector

2001-01-20 Thread Spicklemire, Jerry

Adrian asked:

 Is there a database connector or similar for MS-SQL Server that 
 might run on non-windows Zopes?

Check out http://www.zope.org/Members/TheJester/SybaseDA , and 
please let the list know how it goes. We all need to help each 
other with these little puzzles.

Good luck,
Jerry S.

___
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] Simple ZClass Question

2001-01-20 Thread Gerald Gutierrez


Using Zope 2.3.0b2, I've found that if I create a ZClass with "Include 
standard Zope persistent object base classes" enabled, I can instantiate 
the ZClass right away. If I don't have it enabled, I can still create the 
ZClass, but instantiating it gives me the following error:

Zope has encountered an error while publishing this resource.
Error Type: AttributeError
Error Value: _setId

I understand the difference between checking and not checking the option, 
but unfortunately, I'm just starting with Zope in general so this error is 
not obvious to me. Is this correct behaviour?

Also, I'm interested in whether Zope can be used to write web games, e.g. 
along the lines of Blacknova.net's use of PHP. Are there any examples of 
Zope games on the web?

Thanks.


Gerald.


___
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] MySQL connection string.

2001-01-20 Thread Indra Gunawan

Hello,
could anyone tell me how to make connection string to MySQL in Linux?
I use Zope 2.3 and I've tried the 

database@[host] username password

format, and still no luck,
TIA,

-IGUN-


___
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] SQL query result set - what data structure how to access [(elements)]?

2001-01-20 Thread Lee

Hi,

I'm using a python method to query my database as follows, where I need
to use the result set to generate some HTML. I'm interested in result[0]
and result[1] as listed below;

* return result[0] gives me:
[{'name': 'PRACTICALS', 'type': 's', 'null': None, 'width': None},
{'name': 'TUTORIALS', 'type': 's', 'null': None, 'width': None},
{'name': 'ASSIGNMENTS', 'type': 's', 'null': None, 'width': None},
{'name': 'BONUS', 'type': 's', 'null': None, 'width': None}]

* return result[1] (or just 'return result') gives me:
[(1, 16, 9, 1)]

What kind of data structure is this? First impressions suggest that it's
a tuple but why the extra brackets?. I need to access each element but
how do I do this? I've tried all sort of tuple/list
conversions/operations and have had no success.

If the result is [(1, 16, 9, 1)] how can I assign...

a=1st element i.e. 1
b=2nd element i.e 16..?

I can convert it to a string, parse it and obtain the results that way,
which is simple enough, but surely there's a way to access the element
directly? Does anyone know?

Thanks,

Lee




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