[Zope-dev] DA for DB2 ?

2001-02-15 Thread Philipp Auersperg

I have looked around for a DB2 database adapter for Zope and did not find any.

But I have found that there exists a DB2 driver for Python under:
ftp://people.linuxkorea.co.kr/pub/DB2

This driver claims to be Python DB API compliant, so it should be possible to port
for example the ZOracleDA. But before I invent the wheel for a second time I ask you:

0. Has anybody written or started to write a DB2 adapter for Zope?
1. Has anybody experiences with this python driver for DB2?
2. Or am I wrong with my assumption and it is early impossible to write a DB2 adapter.
3. Is anybody else interested in DB2 support for Zope?

thanks in advance

Philipp Auersperg





___
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] Re: [Zope-dev] MySQL with LAST_INSERT_ID()

2001-01-08 Thread Philipp Auersperg

Be careful with last_insert_id() and similar sql functions and Zope and more than one 
simultanous user:

since all requests run over the same physical database connection, it is not guaranteed
 that your call last_insert_id() returns YOUR last inserted record ID. if another user 
performs an insert
 in the right moment you get HIS last id.

the scenario:

user1 inserts  (gets ID 42)
user 2 inserts (gets ID 43)
user1 calls last_insert_id() (gets 43)


phil
*** REPLY SEPARATOR  ***

On 08.01.2001 at 08:27 Arno Gross wrote:

Dieters assumption was right. 
LAST_INSERTED_ID() returns a numeric value and
that seems to be the problem. So if I change the statement as this: 
SELECT CONV(LAST_INSERT_ID(),10,10) 
it works (CONV returns a string!)

P.S. Soren, maybe you can update your HowTo with a short note. Another
possibilty instead of using LAST_INSERT_ID can be using MAX(). That should
work  too.

Thanks
   Arno
On Sat, 06 Jan
2001, Dieter Maurer wrote:  Arno Gross writes:
   SELECT LAST_INSERT_ID()
   
   This method works with Zope 2.2.4 under Linux and MySQL 3.22.32
   but I got an error with Zope 2.2.2 under NT 4.0 and MySQL 3.22.29
  Error, exceptions.KeyError: unhandled
 Sieht aus, als könnte der MySQL Anschluss den
 Rückgabewert von "LAST_INSERT_ID" nicht in einen Python
 Datentyp wandeln, würde deshalb gerne eine "unhandled"
 Funktion aus einen Dictionary auslesen, die leider
 nicht drin ist.
 
 Sieht für mich nach einem Upgrade auf eine neuere Version
 von MySQL bzw. seinen Python Anschluss aus.
 
 Allerdings müsste man zunächst den Traceback genau anschauen,
 ob meine Vermutung auch wirklich zutrifft.
 
 
 Dieter
---

___
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 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] String problem with ZClassReverse

2001-01-08 Thread Philipp Auersperg

Hi!

it seems that you have problems to access the server-sided part of ZClassReverse (I 
know I have to refine the error messages)

Check out if you can correctly access the server-sided part of ZclassReverse, point 
your 
browser to the following (of course fill in your specific host,port and product):

http://yourserver:8080/zclassInfo/getClassInfos?product=QSurvey

If you see a long python dict containing the classdata, then it works, otherwise check 
if:
0. you have copied zclassInfo.py to your Zope's /Extensions directory
1. you have imported zclassInfo.zexp into the root folder of your ZODB
   you can check this, if in your ZopeRoot exists a folder called zclassInfo with 
three external methods declared

let me know if it helped

regards
phil

*** REPLY SEPARATOR  ***

On 08.01.2001 at 12:29 peter bengtson wrote:

I try to use zclassReverse 1.1.1, but when I am asked for details of the
Zclass this error (below) occurs almost instantly. This happens with all
ZClasses I have tried.
Zope 2.2.2 on WinNT.
Ideas? I have not been able to see any diagrams yet.

Regards, Peter

From the JPython (1.0.3) command line in ObjectDomain Evaluation 3.00.002:

 execfile('C:/Program Files/domain30/python/scripts/zclassReverse.py')
starting ZClass reverse engineering dialog...
 Error: ('invalid syntax', ('string', 1, 1,
'HTMLHEADTITLEZope/TITLE/HEADBODY BGCOLOR="#FF"'))



*** REPLY SEPARATOR  ***

On 08.01.2001 at 12:29 peter bengtson wrote:

I try to use zclassReverse 1.1.1, but when I am asked for details of the
Zclass this error (below) occurs almost instantly. This happens with all
ZClasses I have tried.
Zope 2.2.2 on WinNT.
Ideas? I have not been able to see any diagrams yet.

Regards, Peter

From the JPython (1.0.3) command line in ObjectDomain Evaluation 3.00.002:

 execfile('C:/Program Files/domain30/python/scripts/zclassReverse.py')
starting ZClass reverse engineering dialog...
 Error: ('invalid syntax', ('string', 1, 1,
'HTMLHEADTITLEZope/TITLE/HEADBODY BGCOLOR="#FF"'))


___
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] ODBC errors

2001-01-07 Thread Philipp Auersperg

I have worked with ODBC and Zope under Win2k and had no such problems with 
MSSQL,Oracle and Access.

Since you work with mysql the problem seems to happen in conjunction with the mysql 
ODBC AND Zope, I don't have 
experiences with MySQL ODBc, but:
If you work with mysql  Zope I would anyhow recommend Zope's native mysql adapter 
since it is full-threaded and
ZODBCDA  is not. 

*** REPLY SEPARATOR  ***

On 06.01.2001 at 10:41 Doug Brewer wrote:

Hello

I'm relatively new to Zope, and have been working on getting mySql connected via
ZODBC on Win2k. The connection is working, however, I have one column which
repeatedly throws an error when I try to access data. The column contains text
with many "\n" to retain formatting for email messages (it's an archive).

The error seems to be from the ODBC driver:

Error, sql.error: ('24000', 0, '[Microsoft][ODBC Driver Manager] Invalid cursor
state')

however I can successfully access values from this column directly from the
mysql console AND through the exact same datasource used by zope but from other
apps (I used Excel as a test, and successfully returned data). IOW, only Zope
produces this error.

Any thoughts or pointers would be greatly appreciated.

Doug Brewer


___
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-dev] Reverse engineering ZClasses into ObjectDomain

2000-12-25 Thread Philipp Auersperg



Here as a late Christmas present a tool to reverse engineer ZClasses 
intoa ObjectDomain model:

you need Zope 2.2.2 or 2.2.2 and ObjectDomain R3.

check it out at 
http://magnix.bluedynamics.com:8080/BlueDynamics/products/ZClassReverse/install

one question, that I ve asked several times:

??does anybody know what happened to the ObjectDomain people (no release 
for months)??

greetings
phil



[Zope-dev] oops-reverse engineering

2000-12-25 Thread Philipp Auersperg

sorry, I provided the wrong link:

http://magnix.bluedynamics.com:8080/BlueDynamics/products/ZClassReverse

phil


___
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] Linux Zope - Win2K SQL Server?

2000-12-14 Thread Philipp Auersperg


Does it also work with SQL Server 7.0?

thanks
phil
*** REPLY SEPARATOR  ***

On 08.12.2000 at 10:10 Anthony Baxter wrote:

Use the Sybase client libraries, with ZSybaseDA. We do that here, and
it works fine (but not for much longer, byebye sqlserver...)

Or FreeTDS, but I don't think it's thread-safe, so you'll need to use
a Thunked adaptor.

 "Neil K" wrote
 
 I'm still trying to figure out what the missing pieces are... if anyone else
 has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would
 appreciate some guidance.
 
 It seems I would have to write my own Product from scratch to do this, no
 matter what. None of the ODBC Products seem to be available for Unix, and
 ODBC from Unix - Windows will require additional software like EasySoft's
 ODBC Bridge anyway. Or I could just not use ODBC at all and make some
 Product customized to MS SQL Server.
 
 Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy.
 :)  It's a possibility, but I'd like to see if more conventional solutions
 exist.
 
 --
 Neil Kandalgaonkar, ActiveState
 
 
 
 ___
 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 )
 

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


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




Re: [Zope] ODBC Connection

2000-12-12 Thread Philipp Auersperg

the ZmxODBC DA uses the Zope-independent product mxODBC, that provides a generic 
Python DB API compliant ODBC interface to Python.

ZmxODBC installs mxODBC into lib/python/Shared/mx. The problem is that this path is 
not in the default PythonPath.

Solution:
move the mx directory from lib/python/Shared into a directory that's member of 
PythonPath (for example lib/python).

phil
*** REPLY SEPARATOR ***

On 12.12.2000 at 10:25 Emmon Simbo wrote:
Hi 

I have a few customers who are using Zope and have shown an interest in using the 
OpenLink ODBC Drivers. Unfortunately, I am not familiar with Zope and wondered if 
there was a How-To that I can use to show me how to use Zope with ODBC. I have 
downloaded the ZmxODBCDA module but when I select this from the Products menu, it 
shows up as ZmxODBCDA(Broken product ZmxODBCA). If I click on the link, I get
 

  File "D:\APPS\ZopeWeb\lib\python\OFS\Application.py", line 397, in import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\__init__.py", line 91, in ?
import DA
  File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\DA.py", line 92, in ?
from db import DB, manage_ODBCDataSources
  File "D:\PROGRA~1\Zope22\lib\python\Products\ZmxODBCDA\db.py", line 87, in ?
ImportError: No module named mx.ODBC


 
Any ideas what's wrong here and secondly how I can go about making an ODBC connection.
 
Thanks for you help in advance
 
Best Regards,

Emmon Simbo
Consultant
OpenLink Software
Tel: +44 (0) 20 8681 7701
Web: http://www.openlinksw.com
XML  E-Business Infrastructure Technology Provider 


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

2000-12-11 Thread Philipp Auersperg

PythonScripts will come with Zope 2.3


How did you call the method?
perhaps you forgot the 'self'
your call should look like this:

self.foo(...)

phil

*** REPLY SEPARATOR  ***

On 10.12.2000 at 16:22 kosh wrote:

I know I am still using PythonMethods however I have not seen Python
Scripts out yet for 2.2.4.

Okay here is the problem. How do I call one PythonMethod from another
PythonMethod?

Example

object foo is a python method and it takes a='',b='',c='',d=''

does stuff
returns a string


foo_spec takes parameters a1='',b1=''
it should return foo(a=a1,b=b1)

However trying to call that foo gives an error.

I get a NameError on foo when it is used in foo_spec. However using foo
directly does work however I want to make easier customized interfaces for
users.

Thanks


___
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] unicode,python20,SQL DB Adapters

2000-12-11 Thread Philipp Auersperg

Python 2.0 has unicode support and once Zope will officially run with it -

has anybody evaluated how several database adapters will be 
able to read and write unicode varchars ? (of course only if the DB supports unicode :)

DB's with my special interest are:

Oracle
MSS SQL Server

and the database adapters:
mxODBC
ZOracleDA
ZSybaseDA

thanks in advance

phil


___
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-dev] ZClasses not copyable - why?

2000-11-05 Thread Philipp Auersperg

It is not posible to copy ZClasses, when I try to copy a ZClass 
in the Management Interface I get the error:'The Item 'blorf' does not support 
that operation'

I digged into that and found that in the ZClass.py there exists a method 

def cb_isCopyable:
pass

I was so crude to replace the pass with a 'return 1', restarted Zope and 
could now copy ZClasses as I wanted it.

-
My first question now:
0.Why are ZClasses not copyable?
1.Do I shoot into my foot with my hack or is that OK?

-



And now my second question
I am working on a ZClass-intensive project and sometimes I 
want to add/remove base classes of a ZClass without redefining the whole class 
manually.

in ZClass I have found a nice-sounding method _setBasesHoldOnToYourButts() grin,
and the source is commented with '#Eeeek', h

What are the risks for a good shot into my foot using this function?

thanks

phil


___
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] UML

2000-11-05 Thread Philipp Auersperg

Hi!

I also don't know which question Douglas ment (see bottom of page) , but both 
should be worth a short (or not so short) answer from a DC guru.

We for our current project use ObjectDomain (www.objectdomain.com)  as case tool,
but do not generate code for python or ZClasses with the tool by now, we use it just 
for drawing the models.

The problem with ObjectDomain is that it is a nice tool, but:

- its sort of unstable, sometimes it crashes and eats up parts of the model :(
- I don't know if the guys still work on the project. Since end of april you can still 
download the Beta od Release 3, 
   but nothing new on their site since then
- lots of other bugs (e.g. export to Rational Rose is buggy)

Since ObjectDomain is customizable through JPython it should be possible to make it 
able to
generate/reverse engineer ZClasses (has anybody done that already?)

Do you still use ObjectDomain at DC? At the Paris Zope meeting Paul Everitt told me 
that DC had many 
troubles with it too.

phil

*** REPLY SEPARATOR  ***

On 04.11.2000 at 13:03 Michel Pelletier wrote:

Douglas Daniel Del Frari wrote:
[snip]

I'm not sure what you mean Douglas, do you want to know:

1) If we apply a design methedology to Zope or

2) How you can apply a design methedology to Zope?

-Michel

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




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




[Zope] Re: [Zope-dev] pluggable brains - namespace blues

2000-11-03 Thread Philipp Auersperg



the best answers are those answered by yourself:

For all who want to know it:

you have to explicitely give self as an extra parameter:

concerning the example below:

just call: 

rs[0].getName(rs[0]) 

and it works for me. 
Weird, but now I can enjoy my beer

phil*** REPLY SEPARATOR 
***On 03.11.2000 at 12:30 Philipp Auersperg wrote:

  I have a problem with pluggable brains:
  
  1. Given is a ZClass named 'Merchant' that maps to a SQL table 'Merchant' 
  with the columns 'ID' and 'name'.
  
  2. I the ZClass I defined a Python method 'getName' with the body:
   return self.name
  
  3. I have a SQL Method with "select * from merchant" that I bind to the 
  brain class 'Merchant'
  
  4.I define a Python method with the following body:
  
  rs=self.Merchants()return rs[0].name
  
  
  And now the problems:
  
  That works fine, but when I want to access the Merchant's name through 
  the its member function getName() with the following code:
  
  
  rs=self.Merchants()return rs[0].getName()
  
  
  then I get an AttributeError mentioning that 'name' cannot be 
found.
  when I change the getName() Python method to:
  return 42
  it works!
  
  It seems that the namespace is somehow shreddered, I have to dig into 
  that but if anybody can help it would spare much time!
  
  So finally my desperate question:
  How can I solve/workaround that problem to call methods in pluggable 
  brains that access database-based members from a python method?
  
  thanks in advance
  phil
  
  
  



Re: [Zope] Mapping tools and Zope - SIG? Fishbowl?

2000-11-02 Thread Philipp Auersperg

Hi Trevor!

That is an interesting question, we had a GIS project in the beginning of this year 
where we worked with and
extended PMS (Practical Map Server from ArsDigita) .

On our demo site we run the project (BlueGis) together with Zope (check out 
www.bluedynamics.com, 
exactly:http://www2.bluedynamics.com:8080/BlueDynamics/products/bluegis/BlueGis).

PMS has a very elegant clear structure, but it is written in java (unfortunately java 
has stability problems under linux and PMS 
sometimes locks up).

We had the vision to 'pythonize' PMS, since the architecture and concept of PMS should 
be well portable
to the Python/Zope world, but had unfortunately not enough timemoney to do that on 
our own.

I am very happy to see that there exists interest in that direction and perhaps there 
will be the opportunity to
pythonize PMS. 

Regards
phil

*** REPLY SEPARATOR  ***

On 01.11.2000 at 15:37 twiens wrote:

I'm writing to all who responded to my query regarding mapping tools for
Zope or others interested in this issue. In one of the responses, was
the suggestion to start a SIG or Fishbowl.

At this point in time, I'm in a research phase for a project where a
mapping interface will be needed in Zope based web application. We are
starting to move into the design phase and so some technical decisions
will start to be made in the next two months at which point we will
begin building something.

I've received a number of other interesting replies about GIS and Zope
and possible solutions. These have ranged from "I know about this" to "I
use this" to "We should build something". I think there might be
sufficient interest in at least starting a SIG or Fishbowl or separate
list about the problem. Is there??

I'm personally a bit hesitant to even consider building yet another GIS
product. There are many of them out their (see www.freegis.org) for web
display, cartography, spatial analysis, etc. Obviously our interest here
is web interfaces, but these other products are testimony to the
ubiquitous nature of the problem; a good suite of comprehensive GIS
software solutions just doesn't exist, either for free or commercially
(IMHO). The approach my team will likely take on our project will be to
examine existing open source products and determine if there is one that
is sufficient to meet our needs and simply use it. If we can build some
tools around this product to facilitate it's future use with Zope by
others, we will open source those.

I would welcome the discussion of this issue, since it is important and
it is one of the up and coming needs for web applications. I would
welcome feedback from others who undoubtedly have significant experience
and knowledge to bring to this problem.

T
--
Trevor Wiens
[EMAIL PROTECTED]

The significant problems that we face cannot be solved at the same level
of thinking we were at when we created them. (Albert Einstein)


___
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] Zope.org uptime listed by netcraft

2000-11-01 Thread Philipp Auersperg



on www.netcraft.com I looked at the list 
with the websites having the 
maximum uptime and found - Zope - under the top 10 !

Check it out:
http://uptime.netcraft.com/today/top.avg.html

phil



[Zope] pluggable brains

2000-10-30 Thread Philipp Auersperg



For ZSQL Methods it is possible to bind a ZClass to the records.

These can be selected from te combo box labeled 'ZClass' in the 
'advanced' tab of the SQLMethod's management screen,
but there is always listed just one ZClass.

My question:
Why is there just one ZClass selectable, even if there are many ZClasses 
defined?
Is that a bug or a feature?

thanks

phil



Re: [Zope] pluggable brains

2000-10-30 Thread Philipp Auersperg



I already found the answer myself:

one can only use ZClasses as pluggable brains that are NOT 
persistent!!

phil*** REPLY SEPARATOR 
***On 31.10.2000 at 05:05 Philipp Auersperg wrote:

  For ZSQL Methods it is possible to bind a ZClass to the records.
  
  These can be selected from te combo box labeled 'ZClass' in the 
  'advanced' tab of the SQLMethod's management screen,
  but there is always listed just one ZClass.
  
  My question:
  Why is there just one ZClass selectable, even if there are many ZClasses 
  defined?
  Is that a bug or a feature?
  
  thanks
  
  phil



[Zope] ZODB question: get older object versions without undo

2000-10-10 Thread Philipp Auersperg



I have two questons concerning ZODB:

1. Since ZODB does not overwrite objects on change one can get the older 
versions when undoing the changes.
 My question now: how can I access older versions of 
objects without undoing transactions? (I had a short glance at the ZODB classes, 
but found nothing)

2.Is it possible ( or will be ) to define ZODB objects for which updates 
are done by overwriting and not appending to theobject database

- That is an important issue for objects that are subject to frequent 
and simple changes. For example Webcounters or Advertising banners that count 
the clicks. Solutions to write these changes into external files (like 
FSCounter) are not more than emergency solutions for me.

thanks
phil



Re: [Zope] locking help

2000-10-10 Thread Philipp Auersperg

this Postgres adapter is not multithreaded, check out the ZPoPyDA from zope.org. 
That is an alternative Postgres adapter that is multithreaded and does not lock up.

phil
*** REPLY SEPARATOR  ***

On 11.10.2000 at 08:48 Mark Twiddy wrote:

Hi thanks for the reply
The problem is whenever i do really big query everything stops and waits.

im using
ZPyGreSQLDA-0.3-rjr2
and 
py-PyGreSQL-2.4

thanks 
Mark
On Tue, 10 Oct 2000, Mike Renfro wrote:

 On Tue, Oct 10, 2000 at 04:58:46PM +0930, Mark Twiddy wrote:
 
  Can someone please tell me what is going on. while querying a
  postgres database i am unable to access any crap from zope. I have
  tried creating a db connection in a enternal method and querying
  through that but it still locks and wont serve any requests.
 
 Don't know if this will help, but my Zope/Postgresql experience has
 gone remarkably well.
 
 I have the following packages installed on an otherwise regular Debian
 2.2 machine:
 
 libpgsql2 7.0.2-6 Shared library libpq.so.2 for PostgreSQL
 postgresql7.0.2-6 Object-relational SQL database, descended fr
 postgresql-client 7.0.2-6 Front-end programs for PostgreSQL
 postgresql-dev7.0.2-6 Header files for libpq (postgresql library)
 postgresql-doc7.0.2-6 Documentation for the PostgreSQL database.
 python-pygresql   7.0.2-6 PostgreSQL module for Python
 zope  2.2.2-1 The Z Object Publishing Environment
 zope-pygresqlda   0.3rjr2-1   A Zope Database Adapter for PostgreSQL
 
 Between those packages, following the PostgreSQL tutorial at
 postgresql.org, and following the Z SQL Methods User's Guide
 (http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.html), I'm
 working fine. Where are the actual errors?
 
 -- 
 Mike Renfro  / RD Engineer, Center for Manufacturing Research,
 931 372-3601 / Tennessee Technological University -- [EMAIL PROTECTED]
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


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




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




Re: [Zope] HTTP user authentication in Python

2000-10-07 Thread Philipp Auersperg


The core of HTTP authentication is the following (you have to put the authentication 
into the HTTP header):

import httplib
h=httplib.HTTP()

h.putheader("AUTHORIZATION", "Basic %s" % string.replace(
encodestring("%s:%s" % (self.username, self.password)),
"\012", ""))


there is a xmlrpc howto where you find a detailed description:

http://www.zope.org/Members/Amos/XML-RPC

good luck
phil

*** REPLY SEPARATOR  ***

On 06.10.2000 at 14:22 Hung Jung Lu wrote:

Hi,

Where can I find out more information on HTTP user authentication? I have 
seen the RFC before, but it's a bit too technical to follow. I think Python 
does not include the authentication/cookie handling part probably because 
out of concern about abuses. :)

Does anyone know where I can find more info on the authentication and cookie 
protocol stuff? Is there any Python module already written to handle these 
things?

The idea is to be able to fetch external webpages automatically using 
Python, including providing the necessary auth and cookie info. Of course 
this opens up a whole can of security worms, but heck, it's open information 
and someone must already have written something in Python already.

regards,

Hung Jung
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


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




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




Re: [Zope] In a python method, I want to convert a XML string into a dictionary...

2000-10-05 Thread Philipp Auersperg


0. There is an XML parser in the python standard library (package xmllib, you find it 
in the python documentation),
there also exist alternative xml parsers.
1. Take a look at www.xml-rpc.com, you find a lot of iternnformation there.
2. check out the xmlrpclib by Frederic Lundh (it comes also with Zope, look in the 
lib/python/xmlrpclib.h)
3. in the xmlrpclib.py you can see how the xml parser is used
4. there are several how-to's at zope.org concerning xml-rpc - just serch zope.org for 
'xmlrpc'

good luck
phil
*** REPLY SEPARATOR  ***

On 05.10.2000 at 10:52 Frederic Quin wrote:

Hi all,


I would like to create a python method which take a parameter xml_string
and return a dictionary containing all tags, values and attributes. I
know that it exists some modules for xml conversions but I don't know
very much how to use them. I am novice in Python so it's a little bite
difficult for me to understand the codes...


Thanks


Fred

___
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] XMLRPC:XML Compressors - anybody experienced it?

2000-09-30 Thread Philipp Auersperg



Since XML blows lots of overhead over the line sending large amounts 
of
data via XML becomes a performance question.

There exist XML-compressors, for example XMill that address this 
problem.

What I need is integrating such an XML compressor into the Zope XMLRPC 
mechanism, 
Before I do something that is already done by somebody else:

Did anybody play with XML compressors for Zope or at least have a hint how 
to do that?

thanks



Re: [Zope] How to Pass values to a DTML method ??

2000-09-11 Thread Philipp Auersperg

enclose the expression in quotes and you're happy:

dtml-var "some_method(param=value)"

phil

*** REPLY SEPARATOR  ***

On 11.09.2000 at 09:01 Stuart Foster wrote:

I have a DTML method that is called from a document. I need to pass a value
to it like a parameter would be passed to a function.

dtml-var some_method(param=value)

Thanks


___
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] PyWinTypes15.dll not found

2000-09-04 Thread Philipp Auersperg


This dll exists in  in the Zope tree in the directories bin and bin\lib\win32.
unfortunately none of these is in the PYTHONPATH.

Remedy:

copy PyWinTypes15.dll into one of the directories where it
searches for ( e.g. in your case C:\programs\ZopeDev\lib\python\Products\LocalFS)

or

change the start.bat so that PythonPath also points to these directories

phil



*** REPLY SEPARATOR  ***

On 04.09.2000 at 08:58 Jean Jordaan wrote:

Hi Zopers ..

I've installed Zope to start as a service. It seems to work perfectly
fine, but I notice messages like the following in the eventlog::

2000/09/02 10:25:36Application Popup   Information None
26 N/A
JEAN   Application popup: python.exe - Unable To Locate DLL : The
dynamic
link library PyWinTypes15.dll could not be found in the specified path
C:\programs\ZopeDev\lib\python\Products\LocalFS;
.;
C:\WINNT\System32; 
C:\WINNT\system;
C:\WINNT;
C:\Perl\bin\;
C:\WINNT\system32;
C:\WINNT; 
C:\WINNT\System32\Wbem;
C:\Program Files\Network Associates\PGPNT;
C:\Program Files\Resource Pro Kit\;
c:\programs\vim\vim57;
C:\programs\NcFTP;
c:\cygwin\bin;
c:\cygwin\usr\bin.  

(I broke the path into separate lines for clarity.) Now, when I
examine the environment variables thru 
'Control Panel|System|Advanced|Environment Variables', Zope does not
feature. I also don't notice anything untoward when I examine the
registry. The registry entry that starts Zope seems to be::

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev]
"Type"=dword:0010
"Start"=dword:0002
"ErrorControl"=dword:0001
"ImagePath"="C:\\Programs\\ZopeDev\\bin\\lib\\win32\\PythonService.exe"
"DisplayName"="Zope (ZopeDev)"
"ObjectName"="LocalSystem"
@=""

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Parameters]
"start"="\"C:\\programs\\ZopeDev\\bin\\python.exe\"
\"C:\\programs\\ZopeDev\\z2.py\" -S"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\PythonClass]
@="C:\\programs\\ZopeDev\\ZServer\\ZService.ZServerService"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Security]
 
"Security"=hex:01,00,14,80,a0,00,00,00,ac,00,00,00,14,00,00,00,30,00,00,00,0
2,\
 
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
 
00,00,02,00,70,00,04,00,00,00,00,00,18,00,fd,01,02,00,01,01,00,00,00,00,00,\
 
05,12,00,00,00,4f,00,47,00,00,00,1c,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\
 
20,00,00,00,20,02,00,00,4f,00,4e,00,00,00,18,00,8d,01,02,00,01,01,00,00,00,\
 
00,00,05,0b,00,00,00,20,02,00,00,00,00,1c,00,fd,01,02,00,01,02,00,00,00,00,\
 
00,05,20,00,00,00,23,02,00,00,4f,00,4e,00,01,01,00,00,00,00,00,05,12,00,00,\
00,01,01,00,00,00,00,00,05,12,00,00,00

(This also occurs as
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev]
except that the 'ControlSet001' version has an additional key, 'Enum'::

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev\Enum]
"0"="Root\\LEGACY_ZOPEDEV\\"
"Count"=dword:0001
"NextInstance"=dword:0001

Now for the questions:

 - What is the difference between the 'ControlSet002' version and the
   'ControlSet001' version? 

 - How and where does 'LocalFS' get into the path? 

 - Why isn't 'C:\programs\ZopeDev\bin\lib\win32\PyWinTypes15.dll'
   found? 

 - What, for that matter, is the difference between *that*
   PyWinTypes15 and this one:
   'C:\programs\ZopeDev\bin\PyWinTypes15.dll'?

Any answers sorely appreciated!

Regards, 
-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

___
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] Re: HappySession

2000-09-02 Thread Philipp Auersperg

Hi!

I do not have any reference to HappySession in my headers.

I enclosed the session.set(..) in dtml-try in order to catch the 
SessionNotFoundError,
your slution just tests if the item exists in the session but does it prevent from the 
SessionNotFoundError exception?

thanks

phil

*** REPLY SEPARATOR  ***

On 01.09.2000 at 08:15 Hung Jung Lu wrote:

From: "Philipp Auersperg" [EMAIL PROTECTED]

I also use HappySession and when catching the SessionNotFoundError
weird things happen:
here my  code:

dtml-try
dtml-call "SESSION.set('FLinkID','0')"
dtml-except
session error!
/dtml-try

When the session is expired the error is not caught correctly and I get the 
error mentioned below. Plus, I have to restart my server because ZODB 
reports a transactional error and sets itself to read-only.

I would guess you have the same problem as Diego Rodrigo... could you check 
your standard_html_header? Does it make any reference to SESSION?

One thing about HappySession is that I made it so no initialization is 
required. So please do not call SESSION object in standard_html_header to 
initialize it. (In the next release I'll make it safe even if someone calls 
it in standard_html_header.)

I will try to guess what you want to do: you want to initialize FLinkID at 
the beginning of the session? If so, since HappySession's dictionary does 
not require initialization, you can do something like:

  dtml-if "SESSION['FLinkID'] == _.None"
dtml-call "SESSION.set('FLinkID', 0)"
  dtml-else
... normal operation here ...
  /dtml-if

(If an item does not exist, SESSION['FLinkID'] returns ._None)

regards,

Hung Jung

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


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




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





Re: [Zope] Re: HappySession

2000-09-01 Thread Philipp Auersperg


I also use HappySession and when catching the SessionNotFoundError
weird things happen: 
here my  code:

dtml-try
   dtml-call "SESSION.set('FLinkID','0')"
dtml-except
session error!
/dtml-try

When the session is expired the error is not caught correctly and I get the error 
mentioned below. Plus, I have to restart my server because ZODB reports a 
transactional error and sets itself to read-only.


thanks
Philipp Auersperg (zwork)
---
  Zope Error
Zope has encountered an error while publishing this resource. 

Error Type: KeyError
Error Value: SessionUID
---
and the traceback:
Traceback (innermost last):
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in 
publish_module
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in 
publish
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Zope/__init__.py, line 202, in 
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 169, in 
publish
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/ZODB/Transaction.py, line 275, in 
commit
  File /usr/local/Zope-2.1.4-linux2-x86/lib/python/Shared/DC/ZRDB/TM.py, line 120, in 
tpc_finish
(Object: TM)
  File 
/usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, 
line 168, in _finish
(Object: TM)
  File 
/usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, 
line 291, in _onTransactionEnded
(Object: SESSION)
  File 
/usr/local/Zope-2.1.4-linux2-x86/lib/python/Products/HappySession/HappySession.py, 
line 255, in _store
(Object: SESSION)
KeyError: (see above)


*** REPLY SEPARATOR  ***

On 31.08.2000 at 19:03 Hung Jung Lu wrote:

My conjecture now is that your error-handling HTML might be accessing 
attributes from Zope server. A more correct way of handling exceptions 
should have been using the dtml-try...dtml-except.../dtml-try block. 
But I kind of make a cheat sheet recipe recommendation, tweaking the 
standard_error_message, which was not a good idea. When Zope arrives to 
standard_error_message, the transaction has been aborted and if your 
session_not_found_html is not simple enough and uses more DTML features, I 
can see that it can cause transaction error.

Can you send me your session_not_found_html? I think this was the problem.

In the future I will remove the standard_error_message trick from the help 
file and instead tell people to use proper exception handling, which is the 
right way of doing things. But it will require people to structure their 
sites more carefully so they can catch the SessionNotFound exception. 
Basically, it is recommended that you have single (or few) index_html on 
your site, and place a dtml-try...dtml-except ../dtml-try block to 
capture all exceptions from Zope and deal with them. It's the right way of 
doing things, it's just that many people tend to have many index_html and it 
will make their site harder to catch exceptions and deal with them in a 
centralized way.

In short, HappySession itself is probably not the cause of the transaction 
error. The problem probably comes from bad exception handling. If you want 
to use the standard_error_message trick, then please use a simple html page 
for session_not_found_html without additional Zope features. If I find out 
more, I'll let you know.

regards,

Hung Jung

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


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




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




RE: [Zope] Wish for the next Zope Release: Doc tab for every Zope entity

2000-09-01 Thread Philipp Auersperg

Is DC planning to do something in that matter?

also the docstring should perhaps not be just one property, but
structured (author,parameters,prerequisites...) as it is in
javadoc (ok, we don't like java, but thats a point where we can learn from java)

The next point:
if there is a 'Documentation' tab then
every Zope developer is leaded to document his code.
( DTML is not always simple to read for other people except the author ;-)

just my 2 cents...

phil
*** REPLY SEPARATOR  ***

On 01.09.2000 at 08:16 Chris McDonough wrote:

I agree that instances of DTML methods, DTML documents, SQL methods,
Python methods, objects based on ZClasses, etc. should have "docstring"
capabilities in some sort of common-denominator fashion.

dtml-comment is the only way this can be done for DTML methods.

The other objects can have properties, which could be documentation.

-Original Message-----
From: Philipp Auersperg [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 01, 2000 6:23 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Wish for the next Zope Release: Doc tab for every Zope
entity


Mostly when developing a project it should be documented as well :)
The best would be a strucutral documentation that can be generated 
out of the project so that it always keeps track of the software and is
up to date

- Python has that because there are the doc strings for classes and
methods
- Java has it (javadoc)
- Zope - ?

For Zope it would be fine if every entity in the ODB has a
'Documentation' tab
So I could when developing a Zope site always on the fly document its
structure 
without having to leave y developing environment.

Then its an easy thing to write a doc generator that queries the objects
in the ODB
and their documentation.

Did I miss something and such a beast exists or is there really
something to be done?
I don't mean documentation in dtml-comment, I mean documentation as
seperate 
property for each object and method.

Philipp Auersperg (zwork)




___
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 SQL problem: Query Error: Cannot render query template

2000-08-31 Thread Philipp Auersperg

When starting Zope as a service under Win NT always make sure that
the ODBC data sources you use are *system* data sources and not *user* data sources.

This could explain why your ODBC connections work when you start Zope from the console 
and
don't work when starting it as service.

Anyhow:
Zope 2.1.6 is not the best for SQL (problems with recordsets show up when used 
in dtml-tree)
Zope 2.2.0 has problems with ZODBC under Windows 2000 (Authorisation dialogs 
pop up).

My hint:
Use 2.1.4 or 2.2.1 (does it fine with SQL under Linux and Windows )


phil

*** REPLY SEPARATOR  ***

On 31.08.2000 at 06:40 Stephen Nosal wrote:

Troy-

Have you tried running this from the DOS prompt? I ran into all sorts of problems 
running 2.1.6 on NT4WS with the ODBCDA. Everything was fine when I used the start and 
stop scripts from the command line. When I moved to starting zope as a service, my 
ODBC connections kept failing. Never did find an NT solution, I just moved everything 
to Linux.

It's worth a try.

- Steve

On Wed, 30 August 2000, "Farrell, Troy" wrote:

 
 Hello.
 
 I am running Zope as a service on NT4WS.  I have multiple MS Access
 databases connected to different ZJetDAs and I am not able to modify the
 data in them with SQL statements.  For example, INSERT INTO test VALUES
 (dtml-sqlvar value_one type=string, dtml-sqlvar value_two type=int)
 returns the error "Query Error: Cannot render query template".  Can you tell
 me what the cause is.  I think it might be a permissions problem, but I have
 everything wide open and I can't figure it out.
 
 Thanks.
 Troy Farrell
 
 Troy Farrell
 Video Operations Technician II
 Williams VYVX Services
 918.573.3029
 918.573.1441 fax
 mailto:[EMAIL PROTECTED]
 http://www.williams.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 )


__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!

___
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] SSL and PGP

2000-08-30 Thread Philipp Auersperg

Sounds interesting, I ve checked out M2Crypto 
(downloaded it and checked the files but no install),
it patches Medusa and ZServer in order to handle HTTPS,
so Zope itself becomes a SSL enabled server without needing
a proxy or gateway.

But modifications to Zope's core 
components such as Medusa seem risky to me as
long as Digital Creations don't integrate them into the
official release, because every update to a new Zope release
can become a horror trip when the SSL patches clash with 
the new Zope version.

Are there any plans by DC to do something in that matter?

Philipp Auersperg (zwork)

*** REPLY SEPARATOR  ***

On 29.08.2000 at 19:39 R. David Murray wrote:

On Tue, 29 Aug 2000, Diego Rodrigo Neufert wrote:
 Anyone know how to send a pgp cryped email in zope? (using dtml-sendmail or
 anything else)
 
 and
 
 How to run a SSL server with ZServer?

Search for M2Crypto on zope.org.  It does both.

--RDM


___
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] Z Database Connections - pass uid/pwd to RDB

2000-08-30 Thread Philipp Auersperg



When you create a Z database connection you must supply a fixed 
connection
string with a fixed uid/pwd to open that connection.

So every user that connects to Zope connects with the fixed uid/pwd to the 
relational database.

Is there any way or workaround to dynamically pass the Zope uid/password to 
the relational database?
This is important when user security is maintained by the database 
scheme.

Not that I really want this feature for my use but we have projects where 
the customer has the database model
ready and wants the users to be individually authenticated at the 
relational database (in this case: Oracle).

thanks

Philipp Auersperg(zwork)






Re: [Zope] SQL trees...

2000-08-21 Thread Philipp Auersperg

Which Zope version do you use ?

When I read your message I have a deja-vu:
I encountered the same output when I use SQL based trees under Zope 2.1.6,
it is a bug somewhere in the SQL method handling that appeared in 2.1.6 and is 
fixed in 2.2.0.

Solution:
switch back to 2.1.4 or forward to 2.2.0 or patch the existing 2.1.6 

Philipp Auersperg (zwork)

*** REPLY SEPARATOR  ***

On 21.08.2000 at 16:43 Mayers, Philip J wrote:

Excellent. That answers that.

I'm loath to ask this, since it's supposedly a FAQ, but I'm having trouble
with the tree...

Following:

http://www.zope.org/Members/anthony/tree-coding-tricks

I've got:

dtml-let network="'0/0'"
dtml-tree id=network branches_expr="network_children(parentnet=network)"
 bdtml-var network/b dtml-var descr
/dtml-tree
/dtml-let

The SQL query is working - "test"ing network_children will give the correct
hierarchy. However, the tree generated looks like this:

192.168/16
  192.168/16
192.168/16
10/8
172.20/16
  10/8
192.168/16
10/8
172.20/16
  172.20/16
192.168/16
10/8
172.20/16
10/8
  etc

Basically, the tree only seems to ever contain the top-level (children of
the root of the tree).  The children of all the nodes is... another copy of
the root top-level nodes! Whu?!? A search for several variations of "SQL
tree" in all the relevant list/site archives didn't seem to help. Any ideas?

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+ 

-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2000 15:23
To: Mayers, Philip J
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] dtml-let and quoting(?) or forcing to string


"Mayers, Philip J" wrote:
 dtml-let network="0/0"
 dtml-tree id=network branches_expr="network_children(parentnet=network)"
  bdtml-var network/b dtml-var descr
 /dtml-tree
 /dtml-let

Anything in a DTML tag that's inside "" is python, usually ;-)

So, your dtml-let should be:
dtml-let network="'0/0'"

which is kinda yucky, don't you think?

cheers,

Chris

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

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




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




Re: [Zope] calling (SQL) methods dynamically from External methods

2000-08-21 Thread Philipp Auersperg

Thanks for the answer, it helped me, 
but you missed what I really wanted.

I don't want to call SQL queries by query string, what I want is to
use Z SQL Methods, but I need to identify them by their name as string, because 
in this project we have many complicated queries with parameters.

But finally I am happy because that works:

m1=getattr(self,'dbTest')   #dbTest is a ZSQL method
rs=m1(self)   

for r in rs:
...

Thanks

Philipp Auersperg(zwork)

*** REPLY SEPARATOR  ***

On 21.08.2000 at 13:32 Andrew Kenneth Milton wrote:

+---[ Philipp Auersperg ]--
| 
| What I want to do is calling a SQL method given its
| name as string, so I first have to get the method out of
| the self.__dict__ and then call it. I need that for calling
| the SQL methods dynamically for example out of an URL
| string.

realConnection=getattr(self,connectionId)
realConnection().query(query_in_a_string)

-- 
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] Parameter in ZSQL

2000-08-13 Thread Philipp Auersperg

call :
dtml-in "ShowProduct(product_id=1)"

with let you just define a variable in the current namespace

Philipp Auersperg (zwork)

*** REPLY SEPARATOR  ***

On 13.08.2000 at 17:27 Indra Gunawan wrote:

Hello All
here's the problem
my Zope 2.2.0 is running on win98
my Database is a MySQL

I created a ZSQL method named ShowProduct with parameter product_id

the template as follows : select * from products where sqltest product_id
type=string

why can't I call the ZSQL method directly (without using the GET/POST
variables)?
I try to call it like this

dtml-let product_id="1"
dtml-in ShowProduct
...(i would like to insert some of programs here if this is working)

/dtml-in
/dtml-let

it always returns error like this
Error Type: Bad Request
Error Value: ['product_id']

can anyone help please? is there any workaround for this?
TIA

-IGUN-
ICQ:1474584




___
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] Ivalid Integer from Zope

2000-08-13 Thread Philipp Auersperg

I will fix this for the next release (est. next week).

This happens when nothing is entered in the textfield for the integer value.

In the meanwhile you have to do the check in the insert/update SQL method:

dtml-if "_['btest.val']!=''"
!--#sqlvar btest.val type=int --
dtml-else
   null
/dtml-if



*** REPLY SEPARATOR  ***

On 13.08.2000 at 10:31 Herring, William O. wrote:

I am using the Znolk Input Wizzard with postgresql tables.  One of the
variables in the table is an integer and can have null values.  However, in
the update and insert forms, if I attempt to leave the value null, I get the
following error from Zope:

"Invalid integer value for weight.bcs"


The variable is defined throughout as :dtml-var bcs null=""

Any help would be appreciated.

___
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] RESPONSE.write() slow

2000-08-12 Thread Philipp Auersperg

I want to be able to download dynamic content (coming from a relational database) via 
Zope as a file.
I do this by calling RESPONSE.write() which works fine but it is very slow

When I download a greater package with an External method (on the bottom of the mail),
I just get downloads of 3 to 12 KB/s in my LAN and even locally on the same machine.
Also the thread sending the data uses 90% CPU.
Can anybody tell me why it is so slow or how I can speed that up?
I am using a standalone Zope 2.2.0 with standard ZServer

Thanks in advance
Philipp Auersperg



def streamTest(self,RESPONSE):
   RESPONSE.setHeader('Content-Type','text/richtext') 
   i=0
   while i 10:
  RESPONSE.write('hallo')
  i=i+1

   RESPONSE.close()


___
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] Using Zope as App Server for non http-Protocols

2000-08-11 Thread Philipp Auersperg



We want to (mis)use zope as an application server servicing a proprietary 
non-http protocol 
for transmitting compressed data.

Our idea is a specially written client that connects on a proprietary port 
to zope where 
a special product is listening and serving the request.

Our question:

How can I implement a product listening on a specific port and servicing 
requests and sending back binary (in our case compressed) data.
But the product should of course be able to use the infrastructure of Zope 
(ODB,External methods,ZSQL methods...)

Another question is how does the authentification work for such a non-http 
connection.

Any hints?
Thanks in advance

Philipp Auersperg



Re: [Zope] Znolk - Not recognizing ODBC

2000-07-28 Thread Philipp Auersperg

I just checked Znolk and ODBC - it works correctly (I checked that with Win 2k, NT4 on 
different machines
   with Zopes = 2.1.4, Oracle and MSSQL ODBC drivers )

check the following:

- Have you verified that you have a valid ZODBC database connection in the scope
   of your actual folder ( you can check that with for example a Z Search interface )

- clear the browser's cache (memory and disk) , do a refresh

- uuhrg, last try with restarting Zope

If nothing helps:
feed me with more information, I am sure that I can help you with that

Philipp Auersperg  (zwork)

*** REPLY SEPARATOR  ***

On 27.07.2000 at 16:47 Jim Sanford wrote:

I have downloaded the latest Znolk which claims to now support the Z ODBC DA. When  I 
try to run the Znolk wizard it tells me I have
no DB connections when I do.

Any suggestions?

 __

  Jim Sanford
  .   Database Engineer
 / \  /   Accelerated Technology, Inc.
/   / 720 Oak Circle Drive East
   /  /  \Mobile, AL 36609
  / / \   Voice: 334-661-5770  fax: 334-661-5788
 / \  E-Mail: [EMAIL PROTECTED]
  Web: http://www.atinucleus.com

 Nucleus.  All You NEED in an RTOS.  Royalty Free
 __




___
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] Announcement: Znolk 0.1.1

2000-07-25 Thread Philipp Auersperg


Thanks, due to a renaming the link was broken, I have fixed that now

phil
*** REPLY SEPARATOR  ***

On 25.07.2000 at 11:01 Jim Tittsler wrote:

On Sun, Jul 23, 2000 at 02:07:39PM +0200, Philipp Auersperg wrote:
 I've uploaded Znolk 0.1.1 to http://www.zope.org/Members/zwork with minor
 bug fixes and added support for ZPoPy connections.

The link to Znolk on that page appears to be broken.

Jim

-- 
Jim Tittsler, Tokyo
Python Starship http://starship.python.net/crew/jwt/




___
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] Announcement: Znolk 0.1.1

2000-07-23 Thread Philipp Auersperg

I've uploaded Znolk 0.1.1 to http://www.zope.org/Members/zwork with minor bug fixes 
and added support for ZPoPy connections.

Important hint:


At the third screen of the wizard where you select the columns you MUST select at 
least one column as 'Primary key' because Znolk needs the PK to identify the record to 
be edited. Otherwise you get the following error message when clicking the 'edit' link 
in the BrowseReport:

Error Type: OperationalError
Error Value: ERROR: parser: parse error at or near "" 

Philipp Auersperg 


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