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

All Samples(22)  |  Call(11)  |  Derive(0)  |  Import(11)
Generate a useful error message from an EnvironmentError (IOError or
OSError) exception object.  Handles Python 1.5.1 and 1.5.2 styles, and
does what it can to deal with exception objects that don't have a
filename (which happens when the error is due to a two-file operation,
such as 'rename()' or 'link()'.  Returns the error message as a string
prefixed with 'prefix'.

        def grok_environment_error (exc, prefix="error: "):
    """Generate a useful error message from an EnvironmentError (IOError or
    OSError) exception object.  Handles Python 1.5.1 and 1.5.2 styles, and
    does what it can to deal with exception objects that don't have a
    filename (which happens when the error is due to a two-file operation,
    such as 'rename()' or 'link()'.  Returns the error message as a string
    prefixed with 'prefix'.
    """
    # check for Python 1.5.2-style {IO,OS}Error exception objects
    if hasattr(exc, 'filename') and hasattr(exc, 'strerror'):
        if exc.filename:
            error = prefix + "%s: %s" % (exc.filename, exc.strerror)
        else:
            # two-argument functions in posix module don't
            # include the filename in the exception object!
            error = prefix + "%s" % exc.strerror
    else:
        error = prefix + str(exc[-1])

    return error
        


src/d/i/digsby-HEAD/installer/py2exe/py2exe/build_exe.py   digsby(Download)
    """
    import distutils
    from distutils.util import grok_environment_error
    _path_created = distutils.dir_util._path_created
 
            if verbose:
                print grok_environment_error(
                    exc, "error removing %s: " % directory)
 

src/f/e/FeedNotifier-HEAD/patch/build_exe.py   FeedNotifier(Download)
    """
    import distutils
    from distutils.util import grok_environment_error
    _path_created = distutils.dir_util._path_created
 
            if verbose:
                print grok_environment_error(
                    exc, "error removing %s: " % directory)
 

src/p/l/plexnet-HEAD/third_party/python/pyximport/pyxbuild.py   plexnet(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
from Cython.Distutils import build_ext
import shutil
        raise SystemExit, "interrupted"
    except (IOError, os.error), exc:
        error = grok_environment_error(exc)
 
        if DEBUG:

src/e/s/essig-HEAD/vm/cython/pyximport/pyxbuild.py   essig(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
    from Cython.Distutils import build_ext
    except (IOError, os.error):
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

src/p/y/pystan-2.2.0.1/setup.py   pystan(Download)
        raise SystemExit("Interrupted")
    except (IOError, os.error) as exc:
        from distutils.util import grok_environment_error
        error = grok_environment_error(exc)
    except (DistutilsError, CCompilerError) as msg:

src/c/y/Cython-0.20.1/pyximport/pyxbuild.py   Cython(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
    from Cython.Distutils import build_ext
    except (IOError, os.error):
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

src/c/y/cython-HEAD/pyximport/pyxbuild.py   cython(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
    from Cython.Distutils import build_ext
    except (IOError, os.error):
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

src/c/y/CythonCTypesBackend-HEAD/pyximport/pyxbuild.py   CythonCTypesBackend(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
    from Cython.Distutils import build_ext
    except (IOError, os.error):
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

src/p/y/pylibs-HEAD/pyximport/pyxbuild.py   pylibs(Download)
from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
    from Cython.Distutils import build_ext
    except (IOError, os.error):
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

src/f/i/fimport-0.2/fimport.py   fimport(Download)
from numpy.distutils.core import Extension, numpy_cmdclass, NumpyDistribution
from distutils.errors import DistutilsArgError
from distutils.util import grok_environment_error
 
assert sys.hexversion >= 0x2060000, "need Python 2.6 or later"
        sys.stderr.write(msg)
        exc = sys.exc_info()[1]
        error = grok_environment_error(exc)
 
        if DEBUG:

  1 | 2  Next