推荐学习书目
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
SimbaPeng
V2EX  ›  Python

Python 学习手册里有这么一句话:如果 Python 在搜索路径上只发现了字节码文件,而没有源代码,就会直接加载字节码。

  •  
  •   SimbaPeng · Oct 22, 2017 · 2747 views
    This topic created in 3128 days ago, the information mentioned may be changed or developed.
    在生成 pyc 文件后,我把那个模块的源代码文件删除了,为什么却是直接报 ModuleNotFoundError ?不是说好直接加载字节码吗?
    2 replies    2017-10-22 09:10:19 +08:00
    lrxiao
        1
    lrxiao  
       Oct 22, 2017
    放在__pycache__是没用的 要拿出来
    SimbaPeng
        2
    SimbaPeng  
    OP
       Oct 22, 2017
    @lrxiao 谢啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2805 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:34 · PVG 23:34 · LAX 08:34 · JFK 11:34
    ♥ Do have faith in what you're doing.