2018-11-28
阅读量:
755
打印出导入的模块的文件路径
如果你想知道代码中导入的模块的绝对路径,用下面这条技巧就行了:
import threading
import socket
print(threading)
print(socket)
#1- <module 'threading' from '/usr/lib/python2.7/threading.py'>
#2- <module 'socket' from '/usr/lib/python2.7/socket.py'>






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论