This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://docs.python.org/reference/datamodel.html?highlight=__file__ | |
# Current module name | |
print __file__ | |
# module1.py | |
# Path of the current module | |
import os | |
print os.path.abspath(os.path.dirname(__file__)) | |
# /home/myusername/projects/project1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def is_ironpython(): | |
""" | |
If the platform is IronPython, this function returns True, False otherwise. | |
""" | |
result = False | |
if sys.platform == "cli": | |
result = True | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`echo $SHELL` --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
# http://www.python.org/dev/peps/pep-0263/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uname -a | |
cat /etc/redhat-release |
NewerOlder