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: web app breakage with utf-8

2006-07-06 Thread elmo
On Thu, 06 Jul 2006 19:41:32 +, elmo wrote: > I guess it could be a new MySQLdb issue causing breakage. > Replying to self, this is *very* close to the problem: http://sourceforge.net/tracker/index.php?func=detail&aid=1438913&group_id=22307&atid=374932 -- http://mail.

Re: web app breakage with utf-8

2006-07-06 Thread elmo
On Thu, 06 Jul 2006 19:16:53 +0200, Stefan Behnel wrote: >> >> Is there a correct way to handle text input from a when the page is >> utf-8 and that input is going to be used in SQL statements? I've tried >> things like (with no success): >> sql = u"select * from blah where col='%s'" % input >

web app breakage with utf-8

2006-07-06 Thread elmo
Hello, after two days of failed efforts and googling, I thought I had better seek advice or observations from the experts. I would be grateful for any input. We have various small internal web applications that use utf-8 pages for storing, searching and retrieving user input. They have worked fine

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

2005-08-16 Thread Elmo Mäntynen
z.ala() > File "k.py", line 14, in ala > ludzik.l() > TypeError: unbound method l() must be called with ludzik instance as > first argument (got nothing instead) > > > i would be gratefull for resolving this problem for me Elmo -- http://mail.python.org/mailman/listinfo/python-list

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
tiating eg. image recognition. I'm already aware of these: python-bitzi, python-musicbrainz, mmpython, IMDbPY, python-mhash and imgSeek. If you could point me to other relating resources it would be great. Elmo -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG w

Re: Having trouble importing against PP2E files

2005-07-08 Thread Elmo Mäntynen
ve is correct, you should append the pythonpath with c:\Python24\ and refer to the wanted .py with Examples.PP2E.launchmodes. As such the import statement obviously should be "from Examples.PP2E.launchmodes import PortableLauncher". If the above isn't the case and there is still

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