Re: [Zope] calling scripts

2005-06-24 Thread Andreas Jung



--On 24. Juni 2005 22:07:05 -0700 Varun Parange <[EMAIL PROTECTED]> 
wrote:



How do u call another python script from a python script??



By calling it as *any* other object -> Zope Book.

-aj

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


Re: [Zope] problems with testing (PloneMailBoxer)

2005-06-24 Thread Dieter Maurer
robert rottermann wrote at 2005-6-24 05:41 +0200:
> ...
>>>  security.declareProtected('Access contents information', 'getValueFor')
>>>  def getValueFor(self, key):
>>>  # Returns value for property;
>>>  # if available, a dynamic getter will be used
>>>
>>>  # we can not use MailBoxers getValueFor since
>>>  # it does not work with  skin elements on the FS
>>>  getter = self.getProperty('getter')
>>>  if getter:
>>>  getterHandler = self.unrestrictedTraverse(getter, default=None)
>>>  if getterHandler is not None:
>>>  try:
>>>  result = getterHandler(key)
>>>  if result is not None:
>>>  return result
>>>  except:
>>>  pass
>>>
>>>  # Our stored properties are the default
>>>  return self.getProperty(key)
>>>
[DM]
>>It this function returns "None", then "self.getProperty(key)"
>>(among others) must return "None".

>it does not.

It does -- in the failing case.

If you look (carefully) at your code, you see that it can return "None" only
when also "self.getProperty(key)" returns "None".
Some other things, too, have evaluated to some false value, in this case.

To analyse such problems, put "import pdb; pdb.set_trace()"
in the surprising code. The effect will be that the code
enters "pdb" at this line and allows you to single step
through the code and see precisely what goes on.

Of course, you can also use a different debugger...

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


Re: [Zope] calling scripts

2005-06-24 Thread robert rottermann

Varun Parange wrote:

How do u call another python script from a python script??


-
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
 



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

http://mail.zope.org/mailman/listinfo/zope-dev )
 
this is such a basic question that you better look it up in the zope 
book (which you find on zope.org).

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] calling scripts

2005-06-24 Thread Varun Parange
How do u call another python script from a python script??
		Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football


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


[Zope] Re: Batch folder creation

2005-06-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John Poltorak wrote:
> Hi David,
> 
> I'm used to using the term 'file'. I guess it isn't appropriate in this 
> case since I'm not actually handling a file but a Zope File object. I'm 
> not sure where to look to see how Python handles this...

File objects allow you to get the data as a Python string via its 'data'
attribute.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCvBGl+gerLs4ltQ4RAu49AKCTfyhSCth3lDOavdujejpaX+w5vwCffMoM
fr5lgTysol92DqtZ671w1hA=
=w7TK
-END PGP SIGNATURE-

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


Re: [Zope] problem with DCOracle2

2005-06-24 Thread Andreas Jung



--On 24. Juni 2005 15:17:26 +0200 Peter Semke <[EMAIL PROTECTED]> wrote:


In /opt/zope/lib/python/Products/DCOracle2/DCOracle2/ exists an file
named dco2.so .



Either you haven't compiled DCO with the same Python interpreter that is 
used for Zope or you have a problem with the file permissions of the 
installed DCO files. Check both.


-aj

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


[Zope] problem with DCOracle2

2005-06-24 Thread Peter Semke
Hello List,

we want to get a connection from Zope to Oracle and downloaded
DCOracle2.
Building was successfully (after changing the DEFS parameter)
but in Zope the DCOracle2 module is broken:

-
Traceback (most recent call last):
  File "/opt/zope/lib/python/OFS/Application.py", line 654, in import_product
product=__import__(pname, global_dict, global_dict, silly)
  File "/opt/zope/lib/python/Products/DCOracle2/__init__.py", line 91, in ?
import DA
  File "/opt/zope/lib/python/Products/DCOracle2/DA.py", line 90, in ?
from db import DB
  File "/opt/zope/lib/python/Products/DCOracle2/db.py", line 89, in ?
import DCOracle2, DateTime
  File "/opt/zope/lib/python/Products/DCOracle2/DCOracle2/__init__.py", line 
37, in ?
from DCOracle2 import   *
  File "/opt/zope/lib/python/Products/DCOracle2/DCOracle2/DCOracle2.py", line 
104, in ?
import dco2
ImportError: No module named dco2


In /opt/zope/lib/python/Products/DCOracle2/DCOracle2/ exists an file
named dco2.so .

The versions:

SuSE Linux 9.2
Zope 2.7.0
python 2.3.3
Oracle 8.1.7 (Client)


Can You give us a hint, please?


with best regards

P. Semke
mailto:[EMAIL PROTECTED]

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


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread Andreas Jung



--On 24. Juni 2005 11:15:23 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:


On Fri, Jun 24, 2005 at 12:09:32PM +0200, Andreas Jung wrote:

Yes, maybe I should.



PHP, Zope 3, Python Webware?

-aj


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


Re: [Zope] Problems changing from DTML to ZPT

2005-06-24 Thread Lennart Regebro
On 6/23/05, John Poltorak <[EMAIL PROTECTED]> wrote:
> I'm attempting to convert a page which uses DTML into one which uses ZPT
> but can't get it to look the same. Can some kind person quickly check over
> my poor attempt to utilise ZPT to see what I've done wrong?

If it doens't look the same, that's because you don't generate the
same HTML. Compare the HTML output to see the differences in HTML, and
you will be able to close in on the problems.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread Lennart Regebro
On 6/24/05, Andreas Jung <[EMAIL PROTECTED]> wrote:
> I don't read it this way. He says: how can I improve the look&feel with ZPT.

He said "Is there a repository for examples of what you can do with
ZPT's to make a web page look nicely set out?", which can be
interpreted in several ways, including yours, but also in other ways.
"Look" and "nicely" can refer to code, for example.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread Andreas Jung



--On 24. Juni 2005 12:15:04 +0200 Lennart Regebro <[EMAIL PROTECTED]> wrote:


Whoah. All he did is say that he thinks the documentation is
unsatisfactory...

I don't agree, especially, but John: You can always expand and put up
examples on zopewiki.org.



I don't read it this way. He says: how can I improve the look&feel with ZPT.

-aj



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


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread John Poltorak
On Fri, Jun 24, 2005 at 12:09:32PM +0200, Andreas Jung wrote:
> 
> 
> --On 24. Juni 2005 10:56:12 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:
> 
> > It seems that I'm not the only one who woul like to see more examples of
> > ZPTs. Is there a repository for examples of what you can do with ZPT's to
> > make a web page look nicely set out?
> >
> 
> What has ZPT to do with "make a web page look nicely"? ZPT produces HTML.
> The produces the HTML that is coming from your programming. If your ZPTs 
> produce trash HTML then the pages will be rendered as trash. So it is up to 
> you to produce correct HTML that looks somehow. But the implication that 
> ZPT is responsible because your site look trashy is just stupid. Fix your 
> HTMl, learn about web design, learn to use CSS but please stop your crying 
> about things that are just not true or about technologies that you 
> obviously don't understand. Maybe you should use some other framework that 
> it is easier for you.

Yes, maybe I should. 

Any suggestions?

 
> -aj


-- 
John


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


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread Lennart Regebro
On 6/24/05, Andreas Jung <[EMAIL PROTECTED]> wrote:
> --On 24. Juni 2005 10:56:12 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:
> 
> > It seems that I'm not the only one who woul like to see more examples of
> > ZPTs. Is there a repository for examples of what you can do with ZPT's to
> > make a web page look nicely set out?
> >
> 
> What has ZPT to do with "make a web page look nicely"? ZPT produces HTML.
> The produces the HTML that is coming from your programming. If your ZPTs
> produce trash HTML then the pages will be rendered as trash. So it is up to
> you to produce correct HTML that looks somehow. But the implication that
> ZPT is responsible because your site look trashy is just stupid. Fix your
> HTMl, learn about web design, learn to use CSS but please stop your crying
> about things that are just not true or about technologies that you
> obviously don't understand. Maybe you should use some other framework that
> it is easier for you.

Whoah. All he did is say that he thinks the documentation is unsatisfactory...

I don't agree, especially, but John: You can always expand and put up
examples on zopewiki.org.

http://zopewiki.org/PageTemplates

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread Andreas Jung



--On 24. Juni 2005 10:56:12 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:


It seems that I'm not the only one who woul like to see more examples of
ZPTs. Is there a repository for examples of what you can do with ZPT's to
make a web page look nicely set out?



What has ZPT to do with "make a web page look nicely"? ZPT produces HTML.
The produces the HTML that is coming from your programming. If your ZPTs 
produce trash HTML then the pages will be rendered as trash. So it is up to 
you to produce correct HTML that looks somehow. But the implication that 
ZPT is responsible because your site look trashy is just stupid. Fix your 
HTMl, learn about web design, learn to use CSS but please stop your crying 
about things that are just not true or about technologies that you 
obviously don't understand. Maybe you should use some other framework that 
it is easier for you.


-aj




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


[Zope] Why the hell hasn't Page Templates taken over the world?

2005-06-24 Thread John Poltorak

I found the question posed on the subject line whilst searching for 
information about ZPT's on a website called ZopeZen which appears now to 
have expired - I only found the reference in Google's cache.


The question was posed about a year ago and seemed to be correctly 
answered by this post:-


documentation maybe?
Posted by nan at 2004-08-06 03:08 PM

tal / metal / tales has a steep learning curve and the documentation is 
not that good at all ( I think on a printout it is 4 - 6 pages) E.g. the 
tal:on-error (which is extremly usefull) gets only one tiny paragraph.
I think if it had a more comprehensive documentation (with LOTs of 
examples) it would not scare of new users that much as it does right now.


It seems that I'm not the only one who woul like to see more examples of 
ZPTs. Is there a repository for examples of what you can do with ZPT's to 
make a web page look nicely set out?


-- 
John


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


Re: [Zope] From Zope 2.5.1 to Zope 2.7.6

2005-06-24 Thread Lennart Regebro
On 6/23/05, Tim Suter <[EMAIL PROTECTED]> wrote:
> Do I have to start all over? 

Yes, do what Bakhtiar said: Install a clean, new zope + all your
products from the old zope. Copy in the data.fs. Start. Fix problems
one by one as they appear. :-)

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )