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

关于 Flask 输出 list 的问题

  •  
  •   RadishWind · Sep 17, 2015 · 4993 views
    This topic created in 4040 days ago, the information mentioned may be changed or developed.

    def query (key ):
    results = searcher.find ("content", key )
    tmp=[]
    for i in results:
    tmp.append (i )
    print (tmp )
    print (type (tmp ))
    #print (results )
    return "".join (tmp )
    请问这个代码为什么在控制台输出很正常 而在 flask 框架中输出不出来呢?

    1 replies  •  2015-09-18 08:57:02 +08:00
    firemiles
        1
    firemiles  
       Sep 18, 2015   ❤️ 1
    logger
    A logging.Logger object for this application. The default configuration is to log to stderr if the application is in debug mode. This logger can be used to (surprise ) log messages. Here some examples:

    ```python
    app.logger.debug ('A value for debugging')
    app.logger.warning ('A warning occurred (%d apples )', 42 )
    app.logger.error ('An error occurred')
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   951 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 19:52 · PVG 03:52 · LAX 12:52 · JFK 15:52
    ♥ Do have faith in what you're doing.