我无法记住我安装了RxPY的哪个版本,而且显而易见的似乎不起作用:
In[33]: import rx
In[34]: rx.__version__
Traceback (most recent call last):
File "C:\Program Files\Python\2.7\lib\site-packages\IPython\core\interactiveshell.py", line 3035, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-34-b9c56e77da3a>", line 1, in <module>
rx.__version__
AttributeError: 'module' object has no attribute '__version__'
In[35]: any(map(lambda x: 'version' in x.lower(), dir(rx)))
Out[35]: False
此外,help
不包含版本:
In[38]: help(rx)
Help on package rx:
NAME
rx
FILE
c:\Program Files\python\2.7\lib\site-packages\rx\__init__.py
PACKAGE CONTENTS
abstractobserver
anonymousobservable
anonymousobserver
autodetachobserver
backpressure (package)
blockingobservable
checkedobserver
concurrency (package)
disposables (package)
internal (package)
joins (package)
linq (package)
notification
observable
observeonobserver
observer
scheduledobserver
subjects (package)
testing (package)
DATA
Future = None
asyncio = None
config = {'Future': None, 'Lock': <function RLock>, 'asyncio': None}