Re: how to find out the version of a certain installed package

2008-09-30 Thread Christophe
great! thanks for you fast response.

Christophe

On Tue, Sep 30, 2008 at 6:30 PM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote:

> On 2008-09-30 18:17, Christophe wrote:
> > Hi,
> >
> > In a projecet I'm making using pycrypto, I need to find out the
> > current installed version of pycrypto. After looking around, I found
> > out that "pkg_resources.requires("pycrypto") will give me a string
> > containing the version number, but is this the only way to do it or
> > are there other ways?
>
> Most packages have a .__version__ attribute in their top-level
> package dir which you can query.
>
> You do have to import the base package, though, in order to find
> out.
>
> Thanks,
> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source  (#1, Sep 30 2008)
> >>> Python/Zope Consulting and Support ...http://www.egenix.com/
> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
> >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
> 
>
>  Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 
>
>
>   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
>D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
>   Registered at Amtsgericht Duesseldorf: HRB 46611
>
--
http://mail.python.org/mailman/listinfo/python-list

Re: how to find out the version of a certain installed package

2008-09-30 Thread M.-A. Lemburg
On 2008-09-30 18:17, Christophe wrote:
> Hi,
> 
> In a projecet I'm making using pycrypto, I need to find out the
> current installed version of pycrypto. After looking around, I found
> out that "pkg_resources.requires("pycrypto") will give me a string
> containing the version number, but is this the only way to do it or
> are there other ways?

Most packages have a .__version__ attribute in their top-level
package dir which you can query.

You do have to import the base package, though, in order to find
out.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Sep 30 2008)
>>> Python/Zope Consulting and Support ...http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


 Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
--
http://mail.python.org/mailman/listinfo/python-list


how to find out the version of a certain installed package

2008-09-30 Thread Christophe
Hi,

In a projecet I'm making using pycrypto, I need to find out the
current installed version of pycrypto. After looking around, I found
out that "pkg_resources.requires("pycrypto") will give me a string
containing the version number, but is this the only way to do it or
are there other ways?

thanks,

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