Re: dynamic assigments

2011-03-26 Thread Seldon
On 03/24/2011 07:39 PM, Seldon wrote: Hi, I have a question about generating variable assignments dynamically. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are strings and value1, value2 are generic objects. Now, I would like to use data

Re: dynamic assigments

2011-03-25 Thread Seldon
On 03/25/2011 12:05 AM, Steven D'Aprano wrote: On Thu, 24 Mar 2011 19:39:21 +0100, Seldon wrote: Hi, I have a question about generating variable assignments dynamically. [...] Now, I would like to use data contained in this list to dynamically generate assignments of the form "var

dynamic assigments

2011-03-24 Thread Seldon
Hi, I have a question about generating variable assignments dynamically. I have a list of 2-tuples like this ( (var1, value1), (var2, value2), .. , ) where var1, var2, ecc. are strings and value1, value2 are generic objects. Now, I would like to use data contained in this list to dynamically

Re: Parsing numeric ranges

2011-03-03 Thread Seldon
On 02/25/2011 10:27 AM, Seldon wrote: Hi all, I have to convert integer ranges expressed in a popular "compact" notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). Is there any library for doing such kind of things or I have to write it fr

Re: Parsing numeric ranges

2011-02-25 Thread Seldon
On 02/25/2011 10:44 AM, Alain Ketterlin wrote: Seldon writes: I have to convert integer ranges expressed in a popular "compact" notation (e.g. 2, 5-7, 20-22, 41) to a the actual set of numbers (i.e. 2,5,7,20,21,22,41). What form does the input have? Are they strings, or

Parsing numeric ranges

2011-02-25 Thread Seldon
ny answers. Seldon -- http://mail.python.org/mailman/listinfo/python-list

guessing file type

2009-07-17 Thread Seldon
Hello, I need to determine programmatically a file type from its content/extension (much like the "file" UNIX command line utility) I searched for a suitable Python library module, with little luck. Do you know something useful ? Thanks in advance. -- Seldon -- http://mail.