On Wed, Apr 18, 2012 at 1:27 PM, Marco Milanesi wrote:
>> Pyclewn (and therefore the python program it is debugging with pdb)
>> runs with the python instance that it has been installed with. Check
>> the first line of the pyclewn script which may say for example:
>>
>> #!/usr/local/bin/python3
>>
>> This is why pyclewn is not seeing the packages of your virtualenv,
>> hence the import error.
>
> Maybe you can use the "env trick"?
>
> Like #!/usr/bin/env python
>
> I have not tested it but could work
Hi Marco,
Yes it should work. If you start pyclewn from the command line
and not from Vim, running the following command should also work in a
virtualenv:
python pyclewn ....
The "#!/usr/local/bin/python3" line is actually edited in the script
by distutils itself when building the pyclewn package, see:
http://docs.python.org/distutils/setupscript.html#installing-scripts
This offers a certain level of protection (for example a python3
pyclewn implementation will run with a python3 interpreter, and not a
python2 one) which is useful when pyclewn is started from within Vim
where debugging startup errors is not easy.
>> I don't know venv, but it is likely that venv provides a way to run
>> pyclewn in your virtualenv. Otherwise you can still change sys.path
>> before the imports, to fit your virtualenv, or install pyclewn inside
>> your virtualenv.
>
>I haven't yet had the time to try, but thanks for the hints -- pyclewn
>looks very promising thanks!
When pyclewn has been installed using a local installation, there is
no need to change sys.path as it is already updated in the pyclewn
script.
--
Xavier
Les Chemins de Lokoti: http://lokoti.alwaysdata.net
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Pyclewn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyclewn-general