Kodi Community Forum
Python Scripts Development - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Python Scripts Development (/showthread.php?tid=2045)

Pages: 1 2 3 4 5 6 7 8


- darkie - 2004-01-11

python uses the image library from xbmc which does support gif and other formats


- alx5962 - 2004-01-11

(darkie @ jan. 11 2004,18:48 Wrote:python uses the image library from xbmc which does support gif and other formats
sorry but i tried to load a gif image, but nothing came on screen. i used the windowexample.py code and replaced it with a gif  image at first to try if gif worked.but it didn't...

update: it works with jpg too so maybe there's a bug here ?
so if it's one i hope it will be fixed soon.
anyway, i'm very happy for now to be able to be able to use python on my xbox !


- rayban - 2004-01-12

is it possible to call picture show or picture slideshow with python script?

cheers, Smile


- alx5962 - 2004-01-13

so i decided to bypass the gif file for now and choose a jpg one.

do you plan to make a documentation available about the xmbc and xbmcgui librairies soon?

also, i'd like to know how to change font colours and if special effects on it are possible?

last question : it's not possible for now to add a button? from what i read here it was planned but not yet added but i may be wrong...

keep the good work!


- darkie - 2004-01-13

there is a small txt file called python.txt in cvs\docs\ with some library information. and no, buttons are not supported yet.


- alx5962 - 2004-01-14

(darkie @ jan. 13 2004,18:58 Wrote:there is a small txt file called python.txt in cvs\docs\ with some library information. and no, buttons are not supported yet.
thank you very much for the info!

i'm very impatient to see buttons supported!
i've started to work hard on a meteo script but as i'm new to python it takes me a long time!

anyway, thank you again for your great work!


- fonzi - 2004-01-16

is playing an m3u file supported or am i doing something wrong
with mediaplay()

regards,
fonzi


- darkie - 2004-01-16

mediaplay can only be used to play a media file, you can't use it to open a playlist


- Hullebulle - 2004-01-16

but you should be able to get the infos you need out of the m3u file with python i think.


- darkie - 2004-01-16

Quote:but you should be able to get the infos you need out of the m3u file with python i think.
that is what i suggested before Smile


- alx5962 - 2004-01-19

hi darkie!
how do you type the colour hexstring for text? i tried '#ffffff' and without # too but no colour change, just no more text on screen Huh
also i tried to use the black joypad button and so i i looked for the code in the keymal.xml file but it doesn't work, and i think i need a special label (like the show_more_info for the white button in windowexample). so tell me if i'm wrong or not Image

thanks

alex


- cyberplague - 2004-01-19

what (python) libraries are available (i'm thinking specifically of xml parsers and xpath processors)?

if they are unavailible, what are my options as far as getting them included? ie write myself, import current libraries...etc

thanks for the great work, also i would like to help get some documentation up about xbmc as well as the python support. maybe a wiki? let me know.

cp


- darkie - 2004-01-20

try 0xffffffff for white text, and 0xffff0000 for red text.
the first ff is for alpha and the next are for rgb.

as for the black joypad button. you could try the next.
Quote:  def onaction(self, action):
   print('recieved action with number:' + str(action))
when you use the black button python will now print the action number to "scripts output". now, when you have that number you could use that to create your "label".

to cyberplague: a list of all python libraries avaiable is somewhere at http://www.python.org
the only library that is not supported by xbmc is the tk inter lib, which is used for drawing on screen.
if you need some other libraries, use google or something to find them. there are a lot of extra libraries available on the net.


- alx5962 - 2004-01-20

thank you very much darkie!

your help is really appreciated!


- fonzi - 2004-01-23

ok , i parsed the playlist file, but how can i play all the files one after one.

this is the code, but it just plays the last file in the list

Quote:# loop until eof
for x in lines:
if x.find("#ext") == 0:
continue
print x
xbmc.mediaplay(x)

any sugestions how to program it