checking suds version in python

2019-09-14 16:23发布

问题:

how to check the version of suds installed in python, i look over in the net but i cannot find one.

i try this one. in running python manage.py shell

>>> import suds
>>> suds

but i got the python version on running it.

<module 'suds' from '/usr/local/lib/python2.7/dist-packages/suds/__init__.pyc'>

how can I check the suds version?

i try also suds version but i got this error

>>> import suds
>>> suds version
  File "<console>", line 1
    suds version
               ^
SyntaxError: invalid syntax

回答1:

>>>> import suds
>>>> print suds.__version__
0.4.1

Tada.

Edit: A more generic question was asked about this, and here's a kind-of-hacky script that checks for common names for the version constant.



标签: python suds