2013-03-26, 14:52
Hi,
I'm following the instructions to get a remote debugger working:
http://wiki.xbmc.org/index.php?title=HOW...th_Eclipse
One of the issues is getting XBMC to recognise the path /usr/share/xbmc/system/python/Lib, so that debugging can take place.
I can get the import to work in python:
But it doesn't work in XBMC. A pprint dump of sys.path shows that the path specified in $PYTHONPATH isn't picked up.
Instead I have to use...
...to get the debugger working. I don't like this much.
It may be my misunderstanding of python, but I'd expect paths I add to $PYTHONPATH to be picked up by xbmc.
Also I'm surprised that the path "/usr/share/xbmc/system/python/Lib" isn't already in xbmc's sys.path, since this seems to be somewhere it is reasonable to expect code to be.
I'm following the instructions to get a remote debugger working:
http://wiki.xbmc.org/index.php?title=HOW...th_Eclipse
One of the issues is getting XBMC to recognise the path /usr/share/xbmc/system/python/Lib, so that debugging can take place.
I can get the import to work in python:
Code:
$ export PYTHONPATH="/usr/share/xbmc/system/python/Lib"
$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysrc.pydevd
>>> pysrc.pydevd.__file__
'/usr/share/xbmc/system/python/Lib/pysrc/pydevd.py'
But it doesn't work in XBMC. A pprint dump of sys.path shows that the path specified in $PYTHONPATH isn't picked up.
Instead I have to use...
Code:
sys.path.append('/usr/share/xbmc/system/python/Lib')
...to get the debugger working. I don't like this much.
It may be my misunderstanding of python, but I'd expect paths I add to $PYTHONPATH to be picked up by xbmc.
Also I'm surprised that the path "/usr/share/xbmc/system/python/Lib" isn't already in xbmc's sys.path, since this seems to be somewhere it is reasonable to expect code to be.