Re: How to lock files (the easiest/best way)?

2006-07-15 Thread Elmo Mäntynen
On Sat, 15 Jul 2006 23:52:10 +0200, Sybren Stuvel wrote: > Elmo Mäntynen enlightened us with: >> Only locally. I want to be able to read/write to a single file from >> multiple possibly parallel processes. Would 'touch lock' (or >> something like that) work re

Re: How to lock files (the easiest/best way)?

2006-07-15 Thread Elmo Mäntynen
On Sat, 15 Jul 2006 23:28:21 +0200, Sybren Stuvel wrote: > Elmo Mäntynen enlightened us with: >> Is there something better than using fnctl? It seems a bit >> intimidating with a quick look. > > Locking files is a complex business. What do you want to lock? Why? > Lock

How to lock files (the easiest/best way)?

2006-07-15 Thread Elmo Mäntynen
Is there something better than using fnctl? It seems a bit intimidating with a quick look. -- http://mail.python.org/mailman/listinfo/python-list

Re: class-call a function in a function -problem

2005-08-16 Thread Elmo Mäntynen
On Tue, 16 Aug 2005 18:45:51 +0200, wierus wrote: > Hello, i have a problem. I write my first class in python so i'm not a > experience user. I want to call a function in another function, i tried to > do it in many ways, but i always failed:( > I supposed it's sth very simple but i can't figu

Re: Dictionary inheritance

2005-08-13 Thread Elmo Mäntynen
On Fri, 12 Aug 2005 12:44:11 -0700, Talin wrote: > I want to make a dictionary that acts like a class, in other words, > supports inheritance: If you attempt to find a key that isn't present, > it searches a "base" dictionary, which in turn searches its base, and so on. > > Now, I realize its f

Re: How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
On Mon, 25 Jul 2005 21:15:36 +0300, Elmo Mäntynen wrote: > On Mon, 25 Jul 2005 16:51:05 +0200, Johannes Findeisen wrote: > >> On Mon, 2005-07-25 at 17:23 +0300, Elmo Mäntynen wrote: >>> I want to encode a plaindigest or a hexdigest in base 32. Any hints? >> >>

Re: How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
On Mon, 25 Jul 2005 16:51:05 +0200, Johannes Findeisen wrote: > On Mon, 2005-07-25 at 17:23 +0300, Elmo Mäntynen wrote: >> I want to encode a plaindigest or a hexdigest in base 32. Any hints? > > Search Google for "python base32" isn't as hard... > > Firs

How can I encode something in base32 preferably very fast?

2005-07-25 Thread Elmo Mäntynen
I want to encode a plaindigest or a hexdigest in base 32. Any hints? Elmo -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I get an sha1 hash in base32?

2005-07-24 Thread Elmo Mäntynen
On Sat, 23 Jul 2005 23:27:44 +0200, Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Elmo Mäntynen wrote: > >> I know how to make a hash(using mhash), but instead of encoded as hex I >> want it in base32 for use with the bitzi catalog. python-bitzi is u

How can I get an sha1 hash in base32?

2005-07-23 Thread Elmo Mäntynen
I know how to make a hash(using mhash), but instead of encoded as hex I want it in base32 for use with the bitzi catalog. python-bitzi is useful but way too slow for just getting the hash of a file(am going to use it elsewhere). Thanks. Elmo -- http://mail.python.org/mailman/listinfo/python-list

Re: Differences between RDFlib - 4RDF and Redfoot - 4Suite?

2005-07-19 Thread Elmo Mäntynen
On Fri, 15 Jul 2005 09:50:38 -0700, uche.ogbuji wrote: > I'd say for now if you just need quick RDF parsing, and you're not also > using plain XML, and stuff like Versa RDF query language aren't > important to you, you'll get along just fine with rdflib. Thanks for the insight! -- http://mail.p

Differences between RDFlib - 4RDF and Redfoot - 4Suite?

2005-07-14 Thread Elmo Mäntynen
I was wondering about the differences with the referred libs and servers. Since the documentation isn't so thorough(and a bit because of my laziness), I thought I'd make request for usage accounts etc. stating the pros and cons of the aforementioned. Any notes would be appreciated. -- http://mail.

Re: Multivariable polynomials

2005-07-14 Thread Elmo Mäntynen
On Wed, 13 Jul 2005 16:55:32 -0700, Chris wrote: > Fantastic. May I ask what you are hoping to use it for? > > I checked out Scientific python: > http://starship.python.net/~hinsen/ScientificPython/ > > It has a module with multivariate polynomials with support for a good > functionality but I t

Re: Searching for metadata related tools for use with python

2005-07-13 Thread Elmo Mäntynen
On Wed, 13 Jul 2005 23:25:46 +0300, Elmo Mäntynen wrote: > On Wed, 13 Jul 2005 23:22:01 +0300, Elmo Mäntynen wrote: > >> On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>

Re: Searching for metadata related tools for use with python

2005-07-13 Thread Elmo Mäntynen
On Wed, 13 Jul 2005 23:22:01 +0300, Elmo Mäntynen wrote: > On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> I'm interested in various metadata >> extraction/prosessing/distr

Re: Searching for metadata related tools for use with python

2005-07-13 Thread Elmo Mäntynen
On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I'm interested in various metadata > extraction/prosessing/distribution/something tools(including ways of > differentiating between files, eg hashing etc

Re: Multivariable polynomials

2005-07-13 Thread Elmo Mäntynen
On Tue, 12 Jul 2005 18:56:30 -0700, Chris wrote: > Does anyone know of a good standalone implementation of multivariable > polynomials in python? > > Thanks, > Chris I'm interested also, and am posting this in the hope that being now a multipostthread with a plus sign next to it, someone more kn

Re: Searching for metadata related tools for use with python

2005-07-13 Thread Elmo Mäntynen
On Wed, 13 Jul 2005 15:49:27 +0300, Elmo Mäntynen wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I'm interested in various metadata > extraction/prosessing/distribution/something tools(including ways of > differentiating between files, eg hashing etc

Searching for metadata related tools for use with python

2005-07-13 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm interested in various metadata extraction/prosessing/distribution/something tools(including ways of differentiating between files, eg hashing etc) and especially python enabled ones. I'm also considering content-recognition/differentiating eg. imag

Re: Having trouble importing against PP2E files

2005-07-08 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charles Krug wrote: > List: > > I'm trying to use the example files from Programming Python, 2nd Ed. > > I've copied them into c:\Python24\Examples\PP2E. > > Launching any of the examples programs by themselves seems to work > spiffily. > > Using r

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Hansen wrote: > Заур Шибзухов wrote: > >> There is a syntactic sugar for item access in >> dictionaries and sequences: >> >> o[e] = v <-> o.__setitem__(e, v) >> o[e] <-> o.__getitem__(e) >> >> where e is an expression. >> >> There is no similar

Re: I need help figuring out how to fix this code.

2005-06-28 Thread Elmo Mäntynen
to be new with programming with python and thought of sharing this with you. You have maybe read something like this before from a book or tutorial(there are a couple of good free books for learning python, for example "byte of python"), but good commenting and the like are usual

A strange and annoying restriction, possibly a bug. A glance by a more experienced would be nice.

2005-06-25 Thread Elmo Mäntynen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is the case: >>> n=(100,) tuple(*n) Traceback (most recent call last): File "", line 1, in -toplevel- tuple(*n) TypeError: iteration over non-sequence To be sure I searched for ways to check if something is a sequence: >>> n.__iter__().n