[Zope-dev] Re: PDBDebugMode 0.1 Release

2006-03-14 Thread Simon Michael

Paul Winkler wrote:

All hail Ken Manheimer, pdbtrack is very cool.


HAIL!

Also hail Ross and hail Chris. I didn't know about that trick for debugging 
restricted code with source.


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

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


Re: [Zope-dev] Re: PDBDebugMode 0.1 Release

2006-03-14 Thread Paul Winkler
On Tue, Mar 14, 2006 at 01:07:48PM -0800, Ross Patterson wrote:
> Oooh!  I'd love that.  I'll look into it.
> 
> You should really try using a editor/IDE that automatically shows the
> corresponding code along side the debugger, like Emacs' gud-mode which
> can be invoked with "M-x pdb".  It rocks!

I do that sometimes, but I lack sufficient wizardry to make it
work with through-the-web scripts :-)
But then, I don't write many of those anymore.

All hail Ken Manheimer, pdbtrack is very cool.
 
-- 

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


Re: [Zope-dev] App.Product - distribution related code?

2006-03-14 Thread Martijn Pieters
On 3/14/06, Andreas Jung <[EMAIL PROTECTED]> wrote:
> lib/python/App/Product.py contains code that deals *somehow* with
> "distributions" (whatever this means). Does any one know what this code
> is doing?...anyway this code uses the Python rotor module which was
> removed in Python 2.4. This code is a clear candidate to be kicked...
> objections?

No objections. With it you could package ZClass-based Products up for
redistribution; the redstributed version could then be installed like
a regular product, complete with locked code...

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


Re: [Zope-dev] Re: PDBDebugMode 0.1 Release

2006-03-14 Thread Ross Patterson
> I've only just tried PDBDebugMode, very handy since you don't have
> to put set_trace() in your code (and remember to remove it).

Glad you like it :)

> I have also sometimes used Chris Withers' "zdb" product, 
> http://www.simplistix.co.uk/software/zope/zdb,
> which has some overlap in that it allows you to do this in restricted
> code, e.g. cmf scripts:
>
> from Products.zdb import set_trace
> set_trace()
>
> ... and, very usefully, once in the debugger you can use the "l" command
> to see the script source and it gets line numbers right.  So Ross, maybe

Oooh!  I'd love that.  I'll look into it.

You should really try using a editor/IDE that automatically shows the
corresponding code along side the debugger, like Emacs' gud-mode which
can be invoked with "M-x pdb".  It rocks!

Thanks for the suggestion!

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


Re: [Zope-dev] App.Product - distribution related code?

2006-03-14 Thread Andreas Jung

It seems to be ZClasses relatedso it can go :-)

--On 14. März 2006 15:40:55 -0500 Chris McDonough <[EMAIL PROTECTED]> wrote:


I'm not entirely sure what this code is.  But I've never used it or  seen
anyone else use it.  I suspect it can go.

- C

On Mar 14, 2006, at 3:14 PM, Andreas Jung wrote:


lib/python/App/Product.py contains code that deals *somehow* with
"distributions" (whatever this means). Does any one know what this
code
is doing?...anyway this code uses the Python rotor module which was
removed in Python 2.4. This code is a clear candidate to be kicked...
objections?

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




   ---
  -   Andreas JungZOPYX Ltd. & Co KG-
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
  ---


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


Re: [Zope-dev] App.Product - distribution related code?

2006-03-14 Thread Chris McDonough
I'm not entirely sure what this code is.  But I've never used it or  
seen anyone else use it.  I suspect it can go.


- C

On Mar 14, 2006, at 3:14 PM, Andreas Jung wrote:


lib/python/App/Product.py contains code that deals *somehow* with
"distributions" (whatever this means). Does any one know what this  
code

is doing?...anyway this code uses the Python rotor module which was
removed in Python 2.4. This code is a clear candidate to be kicked...
objections?

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


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

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


[Zope-dev] How to delete an object given a path in Zope

2006-03-14 Thread Takahashi, Michael








Hi guys,

 

I am trying to figure out how to delete an object in
Zope given a path.

 

Using restrictedTraverse I’m able to get the
object by its path.  I then want to delete this object.  

 

I’m assigning the result to ‘obj’
as shown here:

 

obj = context.restrictedTraverse('webcasts/courses/temp')

 

The goal here is to be able to delete ‘temp’
by giving it a path.

 

 

Any help is greatly appreciated.

 

Thanks,

 

Mike






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


[Zope-dev] App.Product - distribution related code?

2006-03-14 Thread Andreas Jung

lib/python/App/Product.py contains code that deals *somehow* with
"distributions" (whatever this means). Does any one know what this code
is doing?...anyway this code uses the Python rotor module which was
removed in Python 2.4. This code is a clear candidate to be kicked...
objections?

-aj

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


Re: [Zope-dev] Re: PDBDebugMode 0.1 Release

2006-03-14 Thread Paul Winkler
On Tue, Mar 14, 2006 at 12:56:33PM -0500, Tres Seaver wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Ross Patterson wrote:
> > http://www.zope.org/Members/rossp/PDBDebugMode
> > 
> > PDBDebugMode - PDB post-mortem debugging on exceptions when debug-mode=on
(snip)
> Way cool!  What would you think about incorporating a version of this
> into the Zope2 core for version 2.10?  I think we would need to add some
> additional ZConfig schema to support it, as the mere presence of the
> product would not be sufficient as an enabling knob (in fact, there
> mightn't be any "product" at all).
> 
> If you're willing, I'd be glad to help land it (I think Z3 already has a
> similar feature, wired in as a separate server).

I've only just tried PDBDebugMode, very handy since you don't have
to put set_trace() in your code (and remember to remove it).

I have also sometimes used Chris Withers' "zdb" product, 
http://www.simplistix.co.uk/software/zope/zdb,
which has some overlap in that it allows you to do this in restricted
code, e.g. cmf scripts:

from Products.zdb import set_trace
set_trace()

... and, very usefully, once in the debugger you can use the "l" command
to see the script source and it gets line numbers right.  So Ross, maybe
you can borrow some of Chris' code :-)

Unfortunately zdb doesn't appear to work with zope 2.9 / python 2.4.
I'll file a bug report with Chris.
It works great with zope 2.8 / python 2.3.

-- 

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


[Zope-dev] Re: PDBDebugMode 0.1 Release

2006-03-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ross Patterson wrote:
> http://www.zope.org/Members/rossp/PDBDebugMode
> 
> PDBDebugMode - PDB post-mortem debugging on exceptions when debug-mode=on
> 
> If a relevant error log object is found, exceptions included in the
> error log's ignored exception types will be ignored and the debugger
> won't be invoked.
> 
> It also enables the import of the pdb module in unprotected code.
> 
> On encountering an error, the port-mortem debugger is invoked with the
> error's traceback.  Once in the debugger you can examine objects,
> variables, etc. at all levels of the call stack.  This is, of course,
> extremely useful for debugging.
> 
> Since it only does anything if the instance is running with
> debug-mode=on, I find this product useful not only for debugging on my
> development instances, but also for doing quick emergency debugging on
> a live production site.  IOW, if the problem is only reproducable on
> the production site but not on my development instance, I'll restart
> the production instance in debug-mode with pdb in emacs, reproduce the
> error, inspect the call stack.

Way cool!  What would you think about incorporating a version of this
into the Zope2 core for version 2.10?  I think we would need to add some
additional ZConfig schema to support it, as the mere presence of the
product would not be sufficient as an enabling knob (in fact, there
mightn't be any "product" at all).

If you're willing, I'd be glad to help land it (I think Z3 already has a
similar feature, wired in as a separate server).


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

iD8DBQFEFwPR+gerLs4ltQ4RAgSXAJ9yBgpP74cQc+8gDoQScdhdV9fZkgCffP4N
FJ3XyKUG/hijv0ZaM3Se3+0=
=EL3t
-END PGP SIGNATURE-

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


[Zope-dev] Re: running unit tests for Zope 2.8

2006-03-14 Thread Geoff Davis
Balazs,

That almost did the trick.  In the end I found that having both
--libdir=/opt/Zope-2.8/lib/python/Products and
--dir=/opt/Zope-2.8/lib/python/Products/SiteAccess/tests
enabled the tests to run.  Thanks!

Geoff


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