# Path: Cython/Utils.py
# def replace_suffix(path, newsuf):
# def open_new_file(path):
# def castrate_file(path, st):
# def file_newer_than(path, time):
# def path_exists(path):
# def decode_filename(filename):
# def detect_file_encoding(source_filename):
#   def __init__(self, stream):
#   def read(self, count=-1):
#   def readlines(self):
# def open_source_file(source_filename, mode="r",
#                      encoding=None, error_handling=None,
#                      require_normalised_newlines=True):
# def open_source_from_loader(loader,
#                             source_filename,
#                             encoding=None, error_handling=None,
#                             require_normalised_newlines=True):
# def str_to_number(value):
# def long_literal(value):
#     def all(items):
#     def any(items):
# class NormalisedNewlineStream(object):


import os
import platform
import cython
        import __builtin__ as builtins
        import builtins
from Cython import Utils
from Cython.Plex.Scanners import Scanner
from Cython.Plex.Errors import UnrecognizedInput
from Errors import error
from Lexicon import string_prefixes, raw_prefixes, make_lexicon, IDENT
from Future import print_function
from StringEncoding import EncodedString
        # order to save memory when they are only used once
        key = (encoding, error_handling)
        try:
            lines = self._lines[key]
            if lines is not None:
                return lines
        except KeyError:
            pass
        f = Utils.open_source_file(
            self.filename, encoding=encoding,
            error_handling=error_handling,
            # newline normalisation is costly before Py2.6
            require_normalised_newlines=False)
        try:
            lines = list(f)
        finally:
            f.close()
        if key in self._lines:
            self._lines[key] = lines
        else:
            # do not cache the first access, but remember that we
            # already read it once
            self._lines[key] = None
        return lines

    def get_description(self):
        return self.path_description

    def get_error_description(self):
        path = self.filename

# Path: Cython/Utils.py
# def replace_suffix(path, newsuf):
# def open_new_file(path):
# def castrate_file(path, st):
# def file_newer_than(path, time):
# def path_exists(path):
# def decode_filename(filename):
# def detect_file_encoding(source_filename):
#   def __init__(self, stream):
#   def read(self, count=-1):
#   def readlines(self):
# def open_source_file(source_filename, mode="r",
#                      encoding=None, error_handling=None,
#                      require_normalised_newlines=True):
# def open_source_from_loader(loader,
#                             source_filename,
#                             encoding=None, error_handling=None,
#                             require_normalised_newlines=True):
# def str_to_number(value):
# def long_literal(value):
#     def all(items):
#     def any(items):
# class NormalisedNewlineStream(object):


# Path: Cython/Compiler/Scanning.py
import os
import platform
import cython
        import __builtin__ as builtins
        import builtins
from Cython import Utils
from Cython.Plex.Scanners import Scanner
from Cython.Plex.Errors import UnrecognizedInput
from Errors import error
from Lexicon import string_prefixes, raw_prefixes, make_lexicon, IDENT
from Future import print_function
from StringEncoding import EncodedString

        # order to save memory when they are only used once
        key = (encoding, error_handling)
        try:
            lines = self._lines[key]
            if lines is not None:
                return lines
        except KeyError:
            pass
        f = Utils.open_source_file(
            self.filename, encoding=encoding,
            error_handling=error_handling,
            # newline normalisation is costly before Py2.6
            require_normalised_newlines=False)
        try:
            lines = list(f)
        finally:
            f.close()
        if key in self._lines:
            self._lines[key] = lines
        else:
            # do not cache the first access, but remember that we
            # already read it once
            self._lines[key] = None
        return lines

    def get_description(self):
        return self.path_description

    def get_error_description(self):
        path = self.filename

        cwd = Utils.decode_filename(os.getcwd() + os.path.sep)