V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
yakczh
V2EX  ›  Python

sqlalchemy 建的库建到哪去了?

  •  
  •   yakczh · 2013-08-19 21:10:02 +08:00 · 2338 次点击
    这是一个创建于 3908 天前的主题,其中的信息可能已经有所发展或是发生改变。
    engine=sqlalchemy.create_engine("sqlite:///tutorial.db",echo=True)

    这个tutorial.db建到哪了?是在内存里面,当前路径下没找到
    4 条回复    1970-01-01 08:00:00 +08:00
    justfly
        1
    justfly  
       2013-08-19 21:31:52 +08:00
    你要首先确定这个在当前目录下,不然你运行会报错的。不是他创建,而是你创建好它使用。
    roricon
        2
    roricon  
       2013-08-20 09:22:21 +08:00
    是建立到内存里面,只有session commit后才会生成sqlite库文件。
    库文件会生成在当前的工作目录。
    mkeith
        3
    mkeith  
       2013-08-20 09:24:18 +08:00
    看下根目录和用户主目录
    batfree
        4
    batfree  
       2013-08-20 09:39:12 +08:00
    /tutorial.db 应该是在根目录下面吧。如果没有权限,应该是失败才对。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1000 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:30 · PVG 07:30 · LAX 16:30 · JFK 19:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.