A python versioning scheme for modules, patches, softwares etc.

2009-02-17 Thread kretel
There exist a number of versioning schemes to keep track of software
version. Each developer certainly have it's own style and preferred
scheme. However, I am wonder if there is a specific versioning scheme
for python modules.

Regards,
Krzysztof
--
http://mail.python.org/mailman/listinfo/python-list


Re: A python versioning scheme for modules, patches, softwares etc.

2009-02-17 Thread kretel
On Feb 17, 5:31 pm, Robert Kern  wrote:
> On 2009-02-17 11:16, kretel wrote:
>
> > There exist a number of versioning schemes to keep track of software
> > version. Each developer certainly have it's own style and preferred
> > scheme. However, I am wonder if there is a specific versioning scheme
> > for python modules.
>
> A number of Python tools that manipulate Python packages use the version 
> number
> parsing code in distutils.version, so it would be a good idea to use version
> numbers it can parse. From the docstring of the StrictVersion class in that 
> module:
>
>      """Version numbering for anal retentives and software idealists.
>      Implements the standard interface for version number classes as
>      described above.  A version number consists of two or three
>      dot-separated numeric components, with an optional "pre-release" tag
>      on the end.  The pre-release tag consists of the letter 'a' or 'b'
>      followed by a number.  If the numeric components of two version
>      numbers are equal, then one with a pre-release tag will always
>      be deemed earlier (lesser) than one without.
>
>      The following are valid version numbers (shown in the order that
>      would be obtained by sorting according to the supplied cmp function):
>
>          0.4       0.4.0  (these two are equivalent)
>          0.4.1
>          0.5a1
>          0.5b3
>          0.5
>          0.9.6
>          1.0
>          1.0.4a3
>          1.0.4b1
>          1.0.4
>
>      The following are examples of invalid version numbers:
>
>          1
>          2.7.2.2
>          1.3.a4
>          1.3pl1
>          1.3c4
>
>      The rationale for this version numbering system will be explained
>      in the distutils documentation.
>      """
>
> You probably want to do release candidates, too, and the "1.3c4" format is
> really quite useful for that. In reality, people usually use LooseVersion from
> that module to parse version numbers, and it will accept "1.3c4". But it also
> accepts a whole lot of version number formats that I would not recommend that
> you use.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>   that is made terrible by our own mad attempt to interpret it as though it 
> had
>   an underlying truth."
>    -- Umberto Eco

Thanks for pointing this out.


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


Using logging module to log into flash drive

2009-06-09 Thread kretel
Hi All,

I am trying to implement the following functionality:
1. log messages to the flash drive
2. if the flash drive is not available, switch handler to the
BufferringHandler and log into buffer,
3. once the flash drive is plugged in and available store the logs
from BufferHandler into that flash drive and switch the handler into
RotateFileHandler.

Which approach would you suggest to use while implementing this
functionality? One that come into my mind is to have one process or
thread to check periodically if the flashdrive is available, and have
a flag that will indicate that we can store the logs into the flash
drive. But I don't particularly like this approach.
Would you do it different way?
Any suggestions are appreciated.

Cheers,
Krzysztof
-- 
http://mail.python.org/mailman/listinfo/python-list