Check the path of the Python imported module

shell-session


python2.4 -c 'import os; print os.__file__'

result


/usr/lib/python2.4/os.pyc

shell-session


python2.6 -c 'import os; print os.__file__'

result


/usr/lib/python2.6/os.pyc

shell-session


python2.7 -c 'import os; print os.__file__'

result


/usr/local/lib/python2.7/os.pyc

Recommended Posts

Check the path of the Python imported module
Pass the path of the imported python module
Check the behavior of destructor in Python
Check the existence of the file with python
the zen of Python
[python] Check the elements of the list all, any
Check the date of the flag duty with Python
[Python] A rough understanding of the logging module
Try using the collections module (ChainMap) of python3
Check items when the imported python module does not work as expected
Easy way to check the source of Python modules
Towards the retirement of Python2
[Python] Get the official file path of the shortcut file (.lnk)
About the Python module venv
Automatic update of Python module
Python --Check type of values
[python] Get the list of classes defined in the module
About the ease of Python
Let's use the Python version of the Confluence API module.
Check OpenSSL version of python 2.6
How to access the global variable of the imported module
About the features of Python
Check the asymptotic nature of the probability distribution in Python
[Python] Check the installed libraries
The Power of Pandas: Python
Check the operation of Python for .NET in each environment
Make the display of Python module exceptions easier to understand
View using the python module of Nifty Cloud mobile backend
Check the scope of local variables with the Python locals function.
(Note) How to pass the path of your own module
Hook to the first import of the module and print the module path
What is the default TLS version of the python requests module?
2015-11-26 python> Display the function list of the module> import math> dir (math)
Test the version of the argparse module
[Python] Check the current directory, move the directory
The story of Python and the story of NaN
Check the behavior when assigning Python
First Python 3 ~ The beginning of repetition ~
Get the desktop path in Python
Existence from the viewpoint of Python
pyenv-change the python version of virtualenv
Get the script path in Python
Change the Python version of Homebrew
[Python] Understanding the potential_field_planning of Python Robotics
Review of the basics of Python (FizzBuzz)
Get the desktop path in Python
Try using the Python Cmd module
About the basics list of Python basics
Master the weakref module in Python
Learn the basics of Python ① Beginners
How to check the memory size of a variable in Python
How to check the memory size of a dictionary in Python
The story of making a module that skips mail with python
Create a compatibility judgment program with the random module of python.
Change the length of Python csv strings
[Python3] Understand the basics of Beautiful Soup
How to check the version of Django
Comparison of Japanese conversion module in Python3
The story of making Python an exe
Learning notes from the beginning of Python 1
About the virtual environment of python version 3.7