shadowsocks - python中hasattr(sys, "frozen")是什么意思?
巴扎黑
巴扎黑 2017-04-18 09:43:58
0
1
1875

最近在看shadowsocks源代码,有些地方不是很懂,比如如下代码中的frozen是啥意思?官方文档没有查到~

# fix py2exe
    if hasattr(sys, "frozen") and sys.frozen in \
            ("windows_exe", "console_exe"):
        p = os.path.dirname(os.path.abspath(sys.executable))
        os.chdir(p)
巴扎黑
巴扎黑

répondre à tous(1)
PHPzhong

Lié à la bibliothèque cx_freeze. Il s'agit d'une bibliothèque utilisée pour empaqueter des programmes dans un exe sous Windows et injecter une variable gelée dans sys.

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!