Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(161)  |  Call(88)  |  Derive(0)  |  Import(73)
Return a string containing the major and minor Python version,
leaving off the patchlevel.  Sample return values could be '1.5'
or '2.2'.

        def get_python_version():
    """Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    """
    return sys.version[:3]
        


src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/common/modutils.py   modern-python-example(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
 
try:
    PY_COMPILED_EXTS = ('so',)
    # extend lib dir with some arch-dependant paths
    STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version())
 
BUILTIN_MODULES = dict(zip(sys.builtin_module_names,

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/logilab/common/modutils.py   antisocial(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
from distutils.errors import DistutilsPlatformError
 

src/r/o/rolf-HEAD/ve/lib/python2.7/site-packages/logilab/common/modutils.py   rolf(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
from distutils.errors import DistutilsPlatformError
 

src/p/y/Python-mode-klen-HEAD/pymode/libs/pylama/lint/pylama_pylint/pylint/logilab/common/modutils.py   Python-mode-klen(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
 
try:
    PY_COMPILED_EXTS = ('so',)
    # extend lib dir with some arch-dependant paths
    STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version())
 
BUILTIN_MODULES = dict(zip(sys.builtin_module_names,

src/n/u/nupic-linux64-HEAD/lib/python2.6/site-packages/logilab/common/modutils.py   nupic-linux64(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
from distutils.errors import DistutilsPlatformError
 

src/i/n/input-lib-HEAD/packages/logilab-common/modutils.py   input-lib(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
 
try:
    PY_COMPILED_EXTS = ('so',)
    # extend lib dir with some arch-dependant paths
    STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version())
 
BUILTIN_MODULES = dict(zip(sys.builtin_module_names,

src/d/d/ddocker-HEAD/bin/pex.venv/lib/python2.7/site-packages/setuptools/command/bdist_egg.py   ddocker(Download)
        return get_path("purelib")
except ImportError:
    from distutils.sysconfig import get_python_lib, get_python_version
    def _get_purelib():
        return get_python_lib(False)
        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution,'dist_files',[]).append(
            ('bdist_egg',get_python_version(),self.egg_output))
 
 

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/setuptools/command/bdist_egg.py   antisocial(Download)
        return get_path("purelib")
except ImportError:
    from distutils.sysconfig import get_python_lib, get_python_version
    def _get_purelib():
        return get_python_lib(False)
        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution,'dist_files',[]).append(
            ('bdist_egg',get_python_version(),self.egg_output))
 
 

src/r/o/rolf-HEAD/ve/lib/python2.7/site-packages/setuptools/command/bdist_egg.py   rolf(Download)
        return get_path("purelib")
except ImportError:
    from distutils.sysconfig import get_python_lib, get_python_version
    def _get_purelib():
        return get_python_lib(False)
        # Add to 'Distribution.dist_files' so that the "upload" command works
        getattr(self.distribution,'dist_files',[]).append(
            ('bdist_egg',get_python_version(),self.egg_output))
 
 

src/p/y/pylint-mode-HEAD/ftplugin/python/logilab/common/modutils.py   pylint-mode(Download)
from os.path import splitext, join, abspath, isdir, dirname, exists, basename
from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY
from distutils.sysconfig import get_config_var, get_python_lib, get_python_version
 
try:
    PY_COMPILED_EXTS = ('so',)
    # extend lib dir with some arch-dependant paths
    STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version())
 
BUILTIN_MODULES = dict(zip(sys.builtin_module_names,

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next