state.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:noc-orchestrator 作者: DirceuSilvaLabs 项目源码 文件源码
def __init__(self):
        now = datetime.datetime.now()
        self.py2 = py.is_py2() #truth test Python 2 interpreter
        self.py3 = py.is_py3() #truth test Python 3 interpreter
        self.py_major = py.py_major_version() #Python major version
        self.py_minor = py.py_minor_version() #Python minor version
        self.py_patch = py.py_patch_version() #Python patch version
        self.os = sys.platform #user operating system
        self.cwd = cwd() #current (present) working directory
        self.parent_dir = os.pardir
        self.default_path = os.defpath
        self.user_path = os.path.expanduser("~")
        self.string_encoding = sys.getdefaultencoding()
        self.file_encoding = sys.getfilesystemencoding()
        self.hour = now.hour
        self.min = now.minute
        self.year = now.year
        self.day = now.day
        self.month = now.month
        self.second = now.second
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号