Jeremy Hylton wrote:
I am probably a bit idiosyncratic, but I prefer to avoid bare excepts
at all costs. I often use "except Exception:", otherwise I add a
Will that catch string exceptions?
eg: raise 'Something bad happened'
If not, then it's not much use in Zope, which is unfortunately
"Morten W. Petersen" wrote:
There's a new product available, which enables unique ids in a given context,
take a look at url:http://www.zope.org/Members/morphex/ThreadSafeCounter.
So would a counter such as:
class PersistentCounter(Persistent):
# create the counter
def
Chris Withers wrote:
"Morten W. Petersen" wrote:
There's a new product available, which enables unique ids in a given context,
take a look at url:http://www.zope.org/Members/morphex/ThreadSafeCounter.
So would a counter such as:
class PersistentCounter(Persistent):
# create
Hi,
I was if do something like:
if zope_version = 2.3:
# balh
else:
# blah
Where do I get the zope_version bti and what format will it be in?
cheers,
Chris
___
Zope-Dev maillist - [EMAIL PROTECTED]
Steve Alexander wrote:
Chris Withers wrote:
So would a counter such as:
snip my counter
That's not the issue.
Does that mean my counter is thread safe?
Morten's product stores the counter's
value in a file on the filesystem, and so it doesn't cause the
Data.fs to grow.
Hmmm,
Chris Withers wrote:
Hi,
I was if do something like:
if zope_version = 2.3:
# balh
else:
# blah
Where do I get the zope_version bti and what format will it be in?
You can get it as version_txt from Control_Panel. For example, from DTML:
dtml-with Control_Panel
dtml-var
Morten's product stores the counter's
value in a file on the filesystem, and so it doesn't cause the
Data.fs to grow.
Hmmm, well, my counter above wouldn't cause the data.fs to grow all that
much,
since it subclasses Persistent and so gets its own pickle jar.
cheers,
Chris
So subclassing
Hi again,
Is it true that you have to have the Manager role to use any methods that start
with manage_?
If so, that's pretty unhelpful, almost as unhelpful as the DocString limitation
:-(
cheers,
Chris
___
Zope-Dev maillist - [EMAIL PROTECTED]
Jon Franz wrote:
So subclassing persistent will avoid changes to the object being stored and
roll-backable in the ZODB?
NO! read the posting again... Subclassing from persistent is HOW you make things
live in the ZODB. However, objects that subclass Persistent get their own pickle
jar, and
Nope! the method calling the manage_* method can have proxy roles setup for
it
so that it can call manage_* methods for users who do not have the
capability
to call that manage_* method.
Also, any user can be assigned access to the manage_* methods needed on a
particular
document/method/object
Ah! this makes more sense, the idea of persistent properties even
fits with this idea, though a true write-in-place property might be
even better for some applications ;)
Next time I'll read the whole thread and not the last post in it!
-Original Message-
From: Chris Withers
Jon Franz wrote:
Nope! the method calling the manage_* method can have proxy roles setup for
it
so that it can call manage_* methods for users who do not have the
capability
to call that manage_* method.
That doesn't help if they want to use the methods directly ;-)
Also, any user can
Hello,
I have a problem with my Data.fs (ZODB). Always, after I change the ZODB
(add + delete), I can not pack the database. When I press the "PACK"
button in the managment screen, it will return to me that the Database was
packed in previous time (and it wasn't).
So my database get larger and
Anthony Baxter wrote:
Ok, my last for tonight - I put the output of my horrible script at
http://www.zope.org/Members/anthony/BarewordExcepts
I'll work over it a bit probably early next week - an obviousish next
step is to make it note when the body of the except: contains a 'raise'
[Chris Withers]
| So would a counter such as:
|
| class PersistentCounter(Persistent):
|
| # create the counter
| def __init__(self, value=0):
| self._value = value
|
| # get the value of the counter without incrementing
| def getValue(self):
| return
[Jon Franz]
| I had this problem in the past and hacked the mysql DA to fix it, then
| dicovered to my dismay I was using an out-of-date mysqlDA and it had already
| been fixed... Which DA are you using?
Using Python 2.0 could solve this problem, as longs are no longer rendered
with the L
Hi,
I am trying to figure out ZPatterns and because I rather work with Python Products
when with Zclasses I am trying to convert the EmployZ product to Python.
So far I got half the way there, the Rack recognizes the DataSkin
And on newItem in the Specialist it a new slot gets created and I can
"CW" == Chris Withers [EMAIL PROTECTED] writes:
I am probably a bit idiosyncratic, but I prefer to avoid bare
excepts at all costs. I often use "except Exception:", otherwise
I add a
CW Will that catch string exceptions? eg: raise 'Something bad
CW happened'
No.
CW If not,
18 matches
Mail list logo