|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
WingIDE and virtualenvI was wondering if there was planned support for virtualenv any time in the near future.
I keep a very bare-bones python install on my machine and keep all my projects separate. Because of this I lose a lot of the benefits of auto-complete/source assist, because the packages do not exist in the python which runs WingIDE. It would be nice to have a 1-to-1 mapping of project to virtualenv, and when I opened a project, it would use that virtualenv's python for the prompt, autocompletion, etc. Thanks! -chris _________________________________________________ Wing IDE users list http://wingware.com/lists/wingide |
|
|
Re: WingIDE and virtualenvHi Chris,
On Wed, 2008-07-02 at 12:14 -0600, Chris Perkins wrote: > I was wondering if there was planned support for virtualenv any time > in the near future. > I too would like to see this. > Because of this I lose a lot of the benefits of auto-complete/source assist, because the packages do not exist in the python which runs WingIDE. What I have discovered (with Stephan Deibel's help of course) is to start Wing after activating a terminal window in virtualenv. Then I also load a python file that sets sys.path to my eggs directories, i.e. ----------------------- import sys sys.path[0:0] = [ '/home/tim/projects/ref_impl_python/TRUNK/oship/src', '/home/tim/buildout-eggs/z3c.evalexception-2.0-py2.4.egg', '/home/tim/buildout-eggs/Paste-1.7-py2.4.egg', '/home/tim/buildout-eggs/setuptools-0.6c8-py2.4.egg', '/home/tim/buildout-eggs/PasteScript-1.6.2-py2.4.egg', ... ----------------------- as my Debug File (See the Debug menu). This file then sets the Effective Python Path (see:Source Analysis Stats under the Source menu option). Now this doesn't fix the issue with the Python Shell window but code completion works perfectly. I do note though that adding files to my code in the project doesn't get added to the Source Completion function unless I restart Wing. So this solution isn't perfect but it does help to use the wonderful features of WingIDE. HTH, Tim -- Timothy Cook, MSc Health Informatics Research & Development Services LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook Skype ID == timothy.cook ************************************************************** *You may get my Public GPG key from popular keyservers or * *from this link http://timothywayne.cook.googlepages.com/home* ************************************************************** _________________________________________________ Wing IDE users list http://wingware.com/lists/wingide |
|
|
Re: WingIDE and virtualenvChris Perkins wrote:
> I was wondering if there was planned support for virtualenv any time in > the near future. > > I keep a very bare-bones python install on my machine and keep all my > projects separate. > > Because of this I lose a lot of the benefits of auto-complete/source > assist, because the packages do not exist in the python which runs WingIDE. > > It would be nice to have a 1-to-1 mapping of project to virtualenv, and > when I opened a project, it would use that virtualenv's python for the > prompt, autocompletion, etc. We'll try to look into it. I don't know much yet about virtualenv but it may help, if there is a file that sets sys.path, to set that as the Main Debug File in Wing since Wing tries to parse the sys.path setting and use that in analysis for autocompletion/etc. For the shell, it would only work if there's a way to set the Python Executable in Project Properties to something that runs like Python. Is that possible? if not, another way to deal with that is to import wingdbstub in code running in the virtualenv, set a breakpoint, and then use the Debug Probe as the Python Shell. -- Stephan Deibel Wingware | Python IDE Advancing Software Development www.wingware.com _________________________________________________ Wing IDE users list http://wingware.com/lists/wingide |
|
|
Re: WingIDE and virtualenv"Chris Perkins" <chris@...> writes:
> I was wondering if there was planned support for virtualenv any time in the > near future. I just configured WingIde to use <virtualenvdir>/bin/python as the interpreter, and it seems to work properly... (Project/Properties/Environment/Python Executable) -- ---------------------------------------------------------------------- | Marcin Kasperski | You have the right to peace, fun, and | http://mekk.waw.pl | productive and enjoyable work. (Beck) | | ---------------------------------------------------------------------- _________________________________________________ Wing IDE users list http://wingware.com/lists/wingide |
| Free Forum Powered by Nabble | Forum Help |