<s> from __future__ import unicode_literals <EOL> import os . path <EOL> import re <EOL> from django . utils import six <EOL> if six . PY3 : <EOL> from glob import escape as glob_escape <EOL> else : <EOL> _magic_check = re . compile ( '<STR_LIT>' ) <EOL> def glob_escape ( pathname ) : <EOL> """<STR_LIT>""" <EOL> drive , pathname = os . path . splitdrive ( pathname ) <EOL> pathname = _magic_check . sub ( r'<STR_LIT>' , pathname ) <EOL> return drive + pathname </s>
