def __init__(self, config): self.config = config self.lang = "en" self.stdin_encoding = get_console_encoding(sys.stdin.encoding) # Input shorthand for yes self.yes = "y" # Input shorthand for no self.no = "n"
def __init__(self, path, config): self.path = path self.config = config self.stdin_encoding = get_console_encoding(sys.stdin.encoding) self.lang = None # We will create a timestamp so that the setup will be completed in a specific interval self.timestamp = time() # TODO: probably unneeded self.yes = "yes" self.no = "no"
("zoidberg10", "*****@*****.**")] ################################# InitHomeDir ################################# __builtin__.owd = os.path.abspath("") #: original working directory __builtin__.homedir = os.path.expanduser("~") __builtin__.rootdir = os.path.abspath(os.path.join(__file__, "..")) __builtin__.configdir = "" __builtin__.pypath = os.path.abspath(os.path.join(rootdir, "..")) if "64" in platform.machine(): sys.path.append(os.path.join(pypath, "lib64")) sys.path.append(os.path.join(pypath, "lib", "Python", "Lib")) sys.path.append(os.path.join(pypath, "lib")) sys.stdout = getwriter(get_console_encoding(sys.stdout.encoding))( sys.stdout, errors="replace") if homedir == "~" and os.name == "nt": import ctypes CSIDL_APPDATA = 26 _SHGetFolderPath = ctypes.windll.shell32.SHGetFolderPathW _SHGetFolderPath.argtypes = [ ctypes.wintypes.HWND, ctypes.c_int, ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD, ctypes.wintypes.LPCWSTR ] path_buf = ctypes.wintypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
__builtin__.rootdir = os.path.abspath(os.path.join(__file__, "..")) __builtin__.configdir = "" __builtin__.pypath = os.path.abspath(os.path.join(rootdir, "..")) import sys sys.path.append(os.path.join(pypath, "lib", "Python", "Lib")) sys.path.append(os.path.join(pypath, "lib")) import codecs from pyload.utils import get_console_encoding sys.stdout = codecs.getwriter(get_console_encoding(sys.stdout.encoding))(sys.stdout, errors="replace") if homedir == "~" and os.name == "nt": import ctypes CSIDL_APPDATA = 26 _SHGetFolderPath = ctypes.windll.shell32.SHGetFolderPathW _SHGetFolderPath.argtypes = [ctypes.wintypes.HWND, ctypes.c_int, ctypes.wintypes.HANDLE, ctypes.wintypes.DWORD, ctypes.wintypes.LPCWSTR] path_buf = ctypes.wintypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
def __init__(self, config): self.config = config self.lang = "en" self.stdin_encoding = get_console_encoding(sys.stdin.encoding)