# Path: corpkit/constants.py
# STRINGTYPE = str if PYTHON_VERSION == 3 else basestring
# 
# PYTHON_VERSION = sys.version_info.major
# 
# INPUTFUNC = input if PYTHON_VERSION == 3 else raw_input


from corpkit.constants import STRINGTYPE, PYTHON_VERSION, INPUTFUNC
    from corpkit.interrogation import Interrogation
            from corpkit.other import load
            from corpkit.other import load
    from time import localtime, strftime
    from corpkit.process import makesafe, sanitise_dict
    from corpkit.interrogation import Interrogation
    from corpkit.corpus import Corpus, Datalist
            from types import ModuleType, FunctionType, BuiltinMethodType, BuiltinFunctionType
    from corpkit.other import load
    from time import strftime, localtime
    from time import localtime, strftime
    from other import load
    from process import makesafe
    from interrogation import Interrodict
    from corpkit.constants import transshow, transobjs
    from corpkit.interrogation import Interrodict, Interrogation
    from corpkit.interrogation import Interrogation, Interrodict
    import corpkit
    import pandas as pd
    import numpy as np
    import os
    import corpkit
    import corpkit
    import pandas as pd
        import os
        import os
        import cPickle as pickle
        import pickle as pickle
    import os
    import corpkit
        import cPickle as pickle
        import pickle as pickle
    import os
    import glob
    import os
    import corpkit
    import corpkit
    import os
    import shutil
    import stat
    import platform
        import os
    import os
    import corpkit
    import pandas as pd
    import corpkit
    import re
    import numpy as np
    import pandas as pd
    import corpkit
        import pandas as pd
        import numpy as np
    import corpkit
    import pandas as pd
    
    :param savedir: Relative path to directory in which to save file
    :type savedir: str
    
    :param print_info: Show/hide stdout
    :type print_info: bool
    
    :returns: None
    """

    try:
    except ImportError:


    print_info = kwargs.get('print_info', True)

    def make_filename(interrogation, savename):
        """create a filename"""
        if '/' in savename:
            return savename

        firstpart = ''
        if savename.endswith('.p'):
            savename = savename[:-2]    
        savename = makesafe(savename, drop_datatype=False, hyphens_ok=True)
        if not savename.endswith('.p'):
            savename = savename + '.p'
        if hasattr(interrogation, 'query') and isinstance(interrogation.query, dict):
            corpus = interrogation.query.get('corpus', False)
            if corpus:

# Path: corpkit/constants.py
# STRINGTYPE = str if PYTHON_VERSION == 3 else basestring
# 
# PYTHON_VERSION = sys.version_info.major
# 
# INPUTFUNC = input if PYTHON_VERSION == 3 else raw_input


# Path: corpkit/other.py
from corpkit.constants import STRINGTYPE, PYTHON_VERSION, INPUTFUNC
    from corpkit.interrogation import Interrogation
            from corpkit.other import load
            from corpkit.other import load
    from time import localtime, strftime
    from corpkit.process import makesafe, sanitise_dict
    from corpkit.interrogation import Interrogation
    from corpkit.corpus import Corpus, Datalist
            from types import ModuleType, FunctionType, BuiltinMethodType, BuiltinFunctionType
    from corpkit.other import load
    from time import strftime, localtime
    from time import localtime, strftime
    from other import load
    from process import makesafe
    from interrogation import Interrodict
    from corpkit.constants import transshow, transobjs
    from corpkit.interrogation import Interrodict, Interrogation
    from corpkit.interrogation import Interrogation, Interrodict
    import corpkit
    import pandas as pd
    import numpy as np
    import os
    import corpkit
    import corpkit
    import pandas as pd
        import os
        import os
        import cPickle as pickle
        import pickle as pickle
    import os
    import corpkit
        import cPickle as pickle
        import pickle as pickle
    import os
    import glob
    import os
    import corpkit
    import corpkit
    import os
    import shutil
    import stat
    import platform
        import os
    import os
    import corpkit
    import pandas as pd
    import corpkit
    import re
    import numpy as np
    import pandas as pd
    import corpkit
        import pandas as pd
        import numpy as np
    import corpkit
    import pandas as pd

    
    :param savedir: Relative path to directory in which to save file
    :type savedir: str
    
    :param print_info: Show/hide stdout
    :type print_info: bool
    
    :returns: None
    """

    try:
    except ImportError:


    print_info = kwargs.get('print_info', True)

    def make_filename(interrogation, savename):
        """create a filename"""
        if '/' in savename:
            return savename

        firstpart = ''
        if savename.endswith('.p'):
            savename = savename[:-2]    
        savename = makesafe(savename, drop_datatype=False, hyphens_ok=True)
        if not savename.endswith('.p'):
            savename = savename + '.p'
        if hasattr(interrogation, 'query') and isinstance(interrogation.query, dict):
            corpus = interrogation.query.get('corpus', False)
            if corpus:

                if isinstance(corpus, STRINGTYPE):