• 1
  • 6
  • 7
  • 8
  • 9(current)
  • 10
Python Inside
thanks for the replies. xbmc.close() did the trick.
has xbmc/xbmcgui been compilied for windows?  i'd like to be able to test code on my pc without pounding out all the dialog/player calls.  can i just create xmbc.py and xmbcgui.py with classes that have the same modules/attributes?   sorry, if this makes no sense, i'm new to python and oo programming in general.

thanks,
brian
Quote:has xbmc/xbmcgui been compilied for windows? i'd like to be able to test code on my pc without pounding out all the dialog/player calls. can i just create xmbc.py and xmbcgui.py with classes that have the same modules/attributes? sorry, if this makes no sense, i'm new to python and oo programming in general.

no, it is compiled for the xbox. this means you have to test it on your xbox to see if your script works
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
i was wondering about dummy "imports" that would just print a list instead of displaying the xmbcgui selection dialog, for example. or even wrap an existing windows python dialog.

anyway i'd more appreciate help with a script thats driving me mad. i'm scraping info from shoutcast and presenting in selection dialogs genres/stations and finally retrieving the audio stream from a pls and passing to xmbc. it's only pulling info from selections made not leaching the whole site at once. this all works but after repeated url requests, network response times slow, current playing song starts skipping. then i start to receive socket read errors and have to recycle xmbc to get network moving again. any suggestions?

url code:

Quote: req = urllib2.request(url)
req.add_header('authorization', 'basic ')
try:
progress.create("attempting to connect to:\n %s" % url)
time.sleep(2)
urlhandle = urllib2.urlopen(req)
remotedata = urlhandle.read()
urlhandle.close()
return remotedata

thanks,
brian
i am just wondering if it would be possible to port bittorrent as a python-script to xbmc?
(bobrooney_78 @ mar. 03 2004,15:13 Wrote:i am just wondering if it would be possible to port bittorrent as a python-script to xbmc?
there's no real interest to do that...
and it would need weeks/months of work
ok, thanks.

i was curious because i read bittorent is programmed in python.
network will eventually start working again if i wait a long time. i'm wondering if there is something else i can do to close the socket connection. i tried adding:

Quote:timeout = 20.0
socket.setdefaulttimeout(timeout)

but i does not seem to improve things.

thanks,
brian

of python: the indentation was killing me at first but i'm liking it now. no more hunts for missing braces :}
(alx5962 @ mar. 03 2004,15:51 Wrote:
(bobrooney_78 @ mar. 03 2004,15:13 Wrote:i am just wondering if it would be possible to port bittorrent as a python-script to xbmc?
there's no real interest to do that...
and it would need weeks/months of work
it wouldn't take that long at all, bittorrent is 100% python. i hacked it up to run on xbmc last month, but it froze xbmc's interface while it was running so it wasn't much use, bittorrent was definitely working though as i could still ftp in to xbmc and watch the downloading file grow in size. considering i know almost no python and got it running in an hour or so, i'm sure someone who knew what they were doing could have it running properly very quickly.

but like you said, there's no real interest in it. i only tried it to see if i could, i don't really have any use for it.
scripts page (in french)

the google script works with english news too, just edit the script!
i was curious and so i looked at the bittorent sources. 10 mn later i was downloading a torrent using xbmc Wink
heh, told you it was easy. :d
very interesting and promising news here...

btw, wouldn't it be more convenient to have a stand-alone python interpreter, i.e. not needing to get in xbmc to execure phyton code? would it be difficult to separate from xbmc so that we can run a .py from whatever dashboard?

gg
my scripts

the bit-torrent client is here, and an english doc included too Smile
this is really great alx !! thanks !

now i have some additions, it would so rock if you could script it..

#1.the updating of the downloading, is it possible to have it sticky somewhere like the red "recording", so that i dont have to go all the way into settings/script/blablabla and press info, then i'm watching a movie or listening to some music..

maybe it should be just under "rec", so that when i record a song, i see them both with the same color (?)
oh man that would be so cool !

#2.it would be great if the bandwidth would update everytime it downloads 10 kb or so.

#3.is it possible to make a bittorrent fileselector so that i don't have to edit the source in the script itself ?
  • 1
  • 6
  • 7
  • 8
  • 9(current)
  • 10

Logout Mark Read Team Forum Stats Members Help
Python Inside0