" Hello World" Bottle.py程序

时间:2014-11-02 07:22:04

标签: python bottle

我刚试过快速入门:" Hello,World!" bottle.py教程(http://bottlepy.org/docs/dev/tutorial.html#quickstart-hello-world

但是我收到了这种错误:

  Traceback (most recent call last):
  File "first.py", line 1, in <module>
    from bottle import route, run
  File "/home/sid/bottle.py", line 3, in <module>
    @route('/hello/<name>')
NameError: name 'route' is not defined

1 个答案:

答案 0 :(得分:3)

不要为自己的文件bottle.py命名,因为它会影响实际的bottle库。