推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
chaleaoch
V2EX  ›  Python

py 文件编译成.so 文件之后, logging 无法获取当前具体是哪个文件的哪行代码了.

  •  
  •   chaleaoch · Jan 14, 2021 · 2413 views
    This topic created in 1944 days ago, the information mentioned may be changed or developed.
    可解否?
    5 replies    2021-01-15 12:42:38 +08:00
    yangyaofei
        1
    yangyaofei  
       Jan 15, 2021   ❤️ 1
    我记得是 Cython 编译之后是有一个变量不能用(就是没了)的. 比如 __file__, 我觉得原因就在此,我觉得无所谓吧,logging 的时候信息再多点不知道那个文件知道哪个类不是一样?
    black11black
        2
    black11black  
       Jan 15, 2021   ❤️ 1
    印象中 cython 可以设置允许或关闭 traceback,默认是允许的,理论上与原生无异。LZ 嵌入了一些反向追踪的内容?
    julyclyde
        3
    julyclyde  
       Jan 15, 2021
    哪种编译方法呢?
    chaleaoch
        4
    chaleaoch  
    OP
       Jan 15, 2021
    @julyclyde cython
    chaleaoch
        5
    chaleaoch  
    OP
       Jan 15, 2021   ❤️ 1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4253 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 00:56 · PVG 08:56 · LAX 17:56 · JFK 20:56
    ♥ Do have faith in what you're doing.