获取 python 包的路径

root@ostack01:~# python
Python 2.7.12 (default, Nov 19 2018, 06:48:02) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__file__
'/usr/local/lib/python2.7/dist-packages/yaml/__init__.pyc'

 

posted @ 2019-09-09 18:36  salami_china  阅读(1930)  评论(0编辑  收藏  举报