I think that's already possible by adding libraries into XBMC\system\python\lib, that's what the readme.txt in there says:
Lib dir:
Library directory used by python.
Here can new packages or modules be installed by the user.
But still, who's going to maintain those libraries, build them and make sure they they work for each platform?
Dan Dare
http://www.xbmc4xbox.org Joined: Sep 2004 Reputation: 146 |
2009-10-25 19:15
Post: #11
Video plugins: Microsoft Channel 9 Videos | GameSpot | Eurogamer TV | GameTrailers | Games On Net | OpenSubtitles | Sublight Program plugins: Notepad |
| find quote |
queeup
Fan Joined: Feb 2009 Reputation: 15 |
2009-10-25 23:04
Post: #12
Yes I know that but if we need to install with SVN repo we need special://home/system/python for that. On special://xbmc/system/python users not have permission on Linux and Windows without admin account.
Quote:But still, who's going to maintain those libraries, build them and make sure they they work for each platform?It's not a big deal. I have already lxml for all platforms and for python 2.4 I mean working with XBMC. Not to many libraries need it. Like i said. Most important libraries are Feedparser, BeautifulSoup and lxml (Its my opinion.) If we do it we don't need librarys in our plugins. Your and mine plugins have same Beautifulsoup library and we have total 10-12 same library installed on our harddisk. |
| find quote |
Dan Dare
http://www.xbmc4xbox.org Joined: Sep 2004 Reputation: 146 |
2009-10-25 23:39
Post: #13
@queeup
I completely agree with you on that, but what happens if two plugins need two versions of the library? I have a couple of plugins that don't work with the latest version of BeautifulSoup, I had to revert to using the previous one.I agree though, it would be much easier if these libraries would be delivered with XBMC, or why not even your enhancement would work. Video plugins: Microsoft Channel 9 Videos | GameSpot | Eurogamer TV | GameTrailers | Games On Net | OpenSubtitles | Sublight Program plugins: Notepad |
| find quote |
queeup
Fan Joined: Feb 2009 Reputation: 15 |
2009-10-26 01:42
Post: #14
Yes I prefer BeautifulSoup 3.0.7a also.
Quote:but what happens if two plugins need two versions of the library?If your plugin need it never version, you can always add in to your plugin folder and import from there. Am I wrong? |
| find quote |
rwparris2
Team-XBMC Python Developer Posts: 1,341 Joined: Jan 2008 Reputation: 2 Location: US |
2009-10-26 01:58
Post: #15
The current way of doing it is the safest.
10 copies of BeautifulSoup is less than 1mb... Always read the XBMC online-manual, FAQ and search and search the forum before posting. For troubleshooting and bug reporting please read how to submit a proper bug report. If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/ |
| find quote |
cancan101
Donor Posts: 46 Joined: Sep 2010 Reputation: 0 |
2012-02-26 05:58
Post: #16
I was able to get lxml to work on Dharma + Ubuntu 11.10 x86-64 by extracting the contents of the following RPM to /usr/share/xbmc/system/python/lib/python2.4/ (specifically the directory within the RPM: /./usr/lib64/python2.4/site-packages/lxml/)
I tried a few other RPMs that I found but they either were rejected by python (ImportError) or they caused XBMC to die. This one works like a charm. I would prefer to not need lxml, unfortunately I am using a library that depends upon it. I would be willing to sacrifice speed for a full python implementation. In Python 2.5 (Dharma is 2.4), there is xml.etree.ElementTree.fromstring for XML parsing, but there is no comparable lxml.html.document_fromstring. BeautifulSoup is a great library, unfortunately the API is different from lxml so it is not a drop in replacement. Any thoughts on a full python implementation of lxml's API (especially lxml.html)? |
| find quote |
giftie
Skilled Python Coder Posts: 2,036 Joined: Mar 2010 Reputation: 35 |
2012-02-26 20:11
Post: #17
cancan101 Wrote:I was able to get lxml to work on Dharma + Ubuntu 11.10 x86-64 by extracting the contents of the following RPM to /usr/share/xbmc/system/python/lib/python2.4/ (specifically the directory within the RPM: /./usr/lib64/python2.4/site-packages/lxml/) Since this is an external library(it is not part of the default python) there is two ways to bring the module into your addon. First you can physically add it to your addon(ie resources/lib/lxml/) or secondly XBMC has an addon called script.module, this is where you can put the module into. This is how BeautifulSoup is created. ![]() For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script. Cinema Experience Cinema Experience Wiki cdART Manager fanart.tv |
| find quote |
cancan101
Donor Posts: 46 Joined: Sep 2010 Reputation: 0 |
2012-02-26 20:16
Post: #18
My question is if anyone knows of a Python implementation of the lxml API?
I just wanted to see if it were possible to use the binary lxml library from XBMC and it is possible, but this is not a good solution (I would need to distribute binaries of that library with the plugin). What I want is something like BeautifulSoup that I can use as a drop in replacement for lxlml. |
| find quote |
queeup
Fan Joined: Feb 2009 Reputation: 15 |
2012-02-26 23:31
Post: #19
some discussions:
http://trac.xbmc.org/ticket/11189 http://forum.xbmc.org/showthread.php?tid...light=lxml |
| find quote |
giftie
Skilled Python Coder Posts: 2,036 Joined: Mar 2010 Reputation: 35 |
2012-02-26 23:57
Post: #20
queeup Wrote:some discussions: This looks like it needs to be moved to a pull request. ![]() For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script. Cinema Experience Cinema Experience Wiki cdART Manager fanart.tv |
| find quote |

I have a couple of plugins that don't work with the latest version of BeautifulSoup, I had to revert to using the previous one.
![[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]](http://www.mediafire.com/conv/e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e4d2fe70f903275f93e5e4c076g.jpg)
Search
Help