![]() |
Python Inside - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Python Inside (/showthread.php?tid=99) |
- Nickman - 2003-11-30 (darkie @ nov. 30 2003,19:21 Wrote:ok, python has the option now to create windows where text and images can be drawn on.great work darkie! now i just have to learn python and start coding. python is most likely to be the scripting language to replace arexx in amigaos 4 ![]() so it won't be a waste of time. ![]() - fonzi - 2003-12-01 (cyan @ nov. 28 2003,09:12 Wrote:in particular, i've written a basic irc bot that comes onto irc (by utilizing the sockets support in python) and can be controlled into doing some very basic things (i.e. playing a particular song/movie, etc.) it works surprisingly well. in the future i plan on writing in dcc support so that the bot can receive/send files to/from xbmc (the idea being, the bot will be able to say "now playing: song x, to download, type /ctcp mybot blah".) although i know that xbmc is alpha software for now, i have a couple of suggestions. i'm sure you guys have thought of some of these already, but without further ado:hi cyan you gived me a great idea with your irc bot, so i tried to program it myself i downloaded the python irclib, edited the testbot example so it doesn't need sys library. but the script works on my windows pc but not on xbmc(it does not give any errors but doesn't connect to irc) can you tell me what you used for your bot,or did you wtite it from scratch or can you public the source code fonzi - Cyan - 2003-12-02 since i'm very familiar with irc (i've been on irc in one form or another for almost ten years, now,) it was really simple for me to write my own code. i thought that there might be an existing irclib for python, but i didn't know enough about the language and how its module system worked to try to use it. without further ado, here's the basics of it, although excuse any sloppy/incorrect code, as it's my first attempt at a python script. i've stripped out some code as to keep the post short, but, it's obvious as to how it should work. i've added comments at the bottom of the post. Quote:# * i know the '999999' thing is lame, and there must be some other way to mean "all the way to the end of the string," but i couldn't find it. * the ^a is an actual control-a character. i wasn't sure how to insert it into python (i.e. by \0x01, \001, \1 or otherwise) this is used for ctcp. * i can typically be found on irc.synchro.net as "cyan" in #rrx * commands in the channel are sent like this: "xb version", and the response is thus put into the channel. commands in msg are sent like this: "/msg xbox version" and then the response is msg'd back to you. * please email me or talk to me on irc if you make any changes or if you're using this code. it's just a skeleton for now, but it should be enough to get everyone going :) - Hullebulle - 2003-12-03 thanx for the sample cyan. ![]() - kraqh3d - 2003-12-03 first, let me say great work so far on xmbc. since it seems like progress on xbmp is slowing down so i figured it was time to register over here ![]() i cant wait to start playing with python. i just installed the 11-29 xbins cvs snapshot. is this sufficient to start displaying information to a window? ideally, python is the way to get the my weather, tv guide, and other fringe features implemented. and cyan... you can leave off the number after the colon uin the string index... ie: remainder = remainder[test_remainder+2:] - darkie - 2003-12-03 just did another update to python. actions are now send to a window created with python. this means that when you press back on your remote control, the script will recieve action_previous_menu which is defined in keymap.xml. i have updated windowexample.py to give you some idea. - cyberplague - 2003-12-03 cyan - thanks for the script darkie- keep up the good work now i am in no way a python guru, so i need some help. as i stated before i am trying to contact and control my replaytv from my xbox. now i found a script that is written in python, however it uses wxpython for the gui part. which we don't have on this version. basically if someone could shove me in the right direction as how to handle this i would be greatful. the main section that i need from the link below is this one: Quote:############################################################################## that sends a broadcast out, and any replaytv will reply. just a shove, and if i get a rtfm comment it is ok. thanks in advance for whatever help you maybe. http://www.flyingbuttmonkeys.com/replay/replaytvclient.py ^ is what i am basing this off of at the moment, i have a feeling that i just need to start from scratch but i am not sure. thanks, cp - burriko - 2003-12-10 darkie, should the zlib module be working? i get the error "importerror: no module named zlib" when trying to import it. thanks. - darkie - 2003-12-10 zlib isn't added to python yet. but it is on my todo list. darkie - adrianmak - 2003-12-21 how powerful python script can be developed used on xbox ? - Hullebulle - 2003-12-21 (adrianmak @ dec. 21 2003,10:59 Wrote:how powerful python script can be developed used on xbox ?what? - Kuranes - 2003-12-22 i just wanted to say i'm really excited to see python support in xbmc. i'd love to write some custom code for my xbox, but i don't want to fiddle with proprietary sdks or god-forsaken c++ code. i'm optimistic that xbmc will be a great place for me to host my own hacks! the real trick will be the nature of the interfaces between xbmc and python. i'd love to be able to implement a new media streaming protocol, put stuff on the screen, write new ui options, etc. - gremlin - 2004-01-03 hey including python is very very cool... now i can dabble a little more :-) one question about what ya can n can't do with python on the xbmc.... can i.. 1) write a program which plays a song (mp3) at a predefined time (ie an alarm clock ). if so, where's the best place to start? (ok oo knowledge / never looked @ python specifically) thanks! - adrianmak - 2004-01-09 are all python functions call can be used on xbmc ? - darkie - 2004-01-10 yes, all functions are supported now (except the tk gui module). Quote:1) write a program which plays a song (mp3) at a predefined time (ie an alarm clock ). if so, where's the best place to start? (ok oo knowledge / never looked @ python specifically)you could use a timer for that, there is more info on that at http://www.python.org and for the people that don't know yet, zlib is already available in the latest cvs version |