# Path: sprinter/next/compat.py
# def _unicode(s):
#     return s


import codecs
import logging
import os
import re
import shutil
from ..compat import _unicode
        if not os.path.exists(file_path):
            open(file_path, "w+").close()
        return file_path

    def in_noninjected_file(self, file_path, content):
        """ Checks if a string exists in the file, sans the injected """
        if os.path.exists(file_path):
            file_content = codecs.open(file_path, encoding="utf-8").read()
            file_content = self.wrapper_match.sub(u"", file_content)
        else:
            file_content = ""
        return file_content.find(content) != -1

    def inject_content(self, content, inject_string):
        """
        Inject inject_string into a text buffer, wrapped with
        #{{ wrapper }} comments if condition lambda is not
        satisfied or is None. Remove old instances of injects if they
        exist.
        """
        inject_string = _unicode(inject_string)
        content = self.wrapper_match.sub("", _unicode(content))
        if self.override_match:
            sprinter_overrides = self.override_match.search(content)
            if sprinter_overrides:
                content = self.override_match.sub("", content)
                sprinter_overrides = sprinter_overrides.groups()[0]
            else:
                sprinter_overrides = ""
        content += """

# Path: sprinter/next/compat.py
# def _unicode(s):
#     return s


# Path: sprinter/next/environment/injections.py
import codecs
import logging
import os
import re
import shutil
from ..compat import _unicode

        if not os.path.exists(file_path):
            open(file_path, "w+").close()
        return file_path

    def in_noninjected_file(self, file_path, content):
        """ Checks if a string exists in the file, sans the injected """
        if os.path.exists(file_path):
            file_content = codecs.open(file_path, encoding="utf-8").read()
            file_content = self.wrapper_match.sub(u"", file_content)
        else:
            file_content = ""
        return file_content.find(content) != -1

    def inject_content(self, content, inject_string):
        """
        Inject inject_string into a text buffer, wrapped with
        #{{ wrapper }} comments if condition lambda is not
        satisfied or is None. Remove old instances of injects if they
        exist.
        """
        inject_string = _unicode(inject_string)
        content = self.wrapper_match.sub("", _unicode(content))
        if self.override_match:
            sprinter_overrides = self.override_match.search(content)
            if sprinter_overrides:
                content = self.override_match.sub("", content)
                sprinter_overrides = sprinter_overrides.groups()[0]
            else:
                sprinter_overrides = ""
        content += """

%s