[Pydev-users] [Please post to StackOverflow with PyDev tag] pydev fails to accomodate bottle framew
Brought to you by:
fabioz
From: SourceForge.net <no...@so...> - 2012-09-05 18:26:35
|
The following forum message was posted by texacote at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/5624906: I am unsuccessful in my effort to make an extremely simple example of the bottle framework work within PyDev, but I am able to make the same example, same file, operate correctly from the python shell interpreter (launched from a terminal command line). Here is the sample: from bottle import route, run [code]@route('/hello/<name>') def index(name): return '<b>Hello %s!</b>' % name if __name__ == '__main__': run(host='localhost', port=8080) [/code] Inside PyDev, the line "from bottle import route, run" shows the object "route" underlined in red. Hovering over the underlined item shows the tip, "unresolved import: route", but the other object, "run," is normal. I am able to place the cursor into the text "run", then press the "f3" key, and drill into the "run" function of the "bottle" module. Also, I can see the "bottle" module listed in the PyDev Package Explorer view. Environment Information is: 1. Eclipse Platform - 3.7.2.v20120207-1839-9gF7UHPDFxGjd-PqDr2jX_4yKaumkoHTz04_q-q 2. IDE Vendor - Spring Source Tool Suite - 2.9.1.RELEASE 3. PyDev Eclipse Plugin - 2.6.0.2012062818 4. Bottle Python Package/Egg - bottle-0.10.11-py2.7.egg 5. OS - Mac OS X Lion Going into the preferences and remove/add the interpreter does not change the outcome. Changing the bottle installation method from easy_install to pip does not change the outcome. Otherwise, have had a great time using the plugin. What do I need to do in order for this to work? Regards, SCott |