Newbie question about Python + CouchDB

2010-09-13 Thread C3
Total newbie here - have a quick question

I have a script that takes data in a flat text file, breaks it up and builds a 
CouchDB with all my data - however during the loop in which the data is loaded 
into couchdb - I sometimes get crashes becuase of a duplicate Document ID 
(which in my case is the serial number of a product)

i was wondering if it is possible to;

1. capture the HTTP status code for each post
2. write logic around that code (such as "skip post if error code was a 409")

thanks in advance






  -- 
http://mail.python.org/mailman/listinfo/python-list


Re: avl tree

2005-05-31 Thread =?utf-8?q?Berthold_H=C3=B6llmann?=
Zunbeltz Izaola <[EMAIL PROTECTED]> writes:

> On Mon, 30 May 2005 21:13:57 +0200, Berthold Höllmann wrote:
>
>> 
>> I'm afraid you won't be happy with the code. It's very old and likely
>> won't compile. We have an inhouse version of this module which
>> compiles and run on Sparc solaris (32 Bit) and linux x86 with Python
>> up to 2.4. I fixed some warnigs just today for compilation on Linux
>> x86_64, it also seems to work on this platform now. Installation is
>> setup.py based. I'm quite sure we once sent patches to Sam Rushing,
>> but they never made it into his release. I'll try to publish our
>> version the next days. 
>
> Thanks. I will be looking forward to the release.

You can grab it from 

  

Please report any problems to me. I'll do my best to solve them.

Regards,
Berthold
-- 
[EMAIL PROTECTED] / 
[EMAIL PROTECTED] / 
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: avl tree

2005-06-01 Thread =?utf-8?q?Berthold_H=C3=B6llmann?=
Zunbeltz Izaola <[EMAIL PROTECTED]> writes:

> On Tue, 31 May 2005 22:40:19 +0200, Berthold Höllmann wrote:
>
>> You can grab it from 
>> 
>>   
>> 
>
> Thanks i will play with it. But i have realize that what i need was
> exactly a binary tree. I haven't used tree yet and i don't know if i 
> can use the avl instaead an ordinary binary tree.
> I have to construct a tree like this
>
>  A
>
> B  C
>
>  A C A B
>
> B C   A B   B C   A C
>
>
> but i think i can construct a avl using left/right. Am I correct?

The point with AVL trees is, that they are self balancing, If you want
to 'define' the structure of the tree, you have to find another
solution.

Berthold
-- 
[EMAIL PROTECTED] / 
[EMAIL PROTECTED] / 
-- 
http://mail.python.org/mailman/listinfo/python-list