Hi!

You can add "session" to Preferences -> PyDev -> Editor -> Code
Analysis -> Undefined, in there is a comma separated list of name
globals, just add "session" to the list. After that you may have to
restart eclipse or clean the project.

2010/8/18 Elver Loho <elver.l...@gmail.com>:
> Hi!
>
> Not sure if this is the right place to ask this question, but here it is 
> anyway.
>
> I'm using CherryPy a lot, and its session-keeping features. Basically
> CherryPy exposes a dictionary that can be used to store session
> variables, like this:
>
> import cherrypy
> cherrypy.session["username"] = "parrot"
> username = cherrypy.session.get("username")
>
> Problem is -- CherryPy's module does not contain the session variable.
> It is created at run time. So that every line where I access
> cherrypy.session in any way is marked red by PyDev. Which is annoying.
>
> Yes, I could add #...@undefinedvariable at the end of each such line, but
> that's not very sensible in the long run. And putting it at the end of
> just a single line does not fix things in the rest of the file.
>
> What should I do?
>
> Best,
> Elver
>
> elver.l...@gmail.com
> +372 5661 6933
> http://memeresearch.com/
> skype: elver.loho
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> pydev-code mailing list
> pydev-code@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pydev-code
>



-- 
  Tmi: Jari Pennanen
  Y-tunnus: 1867270-2
  Puh: 050 4911400

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to