Python Dev Tool: XBMC Emulator scripts
#31
alex, did you already add the dialogprogress to the emulator? i'm trying to emulate the yarssr script but get the following message:
traceback (most recent call last):
file "c:\python23\yarssr.py", line 38, in -toplevel-
dialog = xbmcgui.dialogprogress()
attributeerror: 'module' object has no attribute 'dialogprogress'
Reply
#32
actually, funny timing. no, it's not in there, but i've just been wrestling with that this week (after not really doing any work on the emulator in several months). i never quite figured out how the xbox progress dialog works, so when i built the emulator i didn't immediately know how to incorporate that, and it just got postponed (amid everything else that needed doing).

i'm looking into it now. i've got a very busy weekend ahead, but i might have something for you early next week. if you want, you can always stub out the class and function calls in the meantime (if you know how).

sorry for the inconvenience. i'll get to it as quickly as i can.

alexpoet
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#33
nice emulator! first a few remarks on the setup.
to create a virtual drive q, you don't need to bother with creating and mapping network drives/shares. simply open a command prompt and type "subst q: <path>''

if you don't want to install the emulator files in your "python/lib" directory, your can install it elsewhere as well. say, you want to install it in 'e:\sources\xmbc\python\lib'. you can use the environment variable pythonpath to specify additional libraries. thus, type "set pythonpath=e:\sources\xmbc\python\lib" or add it to the environment with "my computer properties/advanced/environment variables"

to make sure the file "controller.gif" can still be found. change the following code in "xmbcgui.py" (line 52).
Quote: self.ctrlpic = photoimage(file = sys.prefix + "/lib/controller.gif")
Quote: for path in sys.path:
controllerfilename = path + "/controller.gif"
if os.access(controllerfilename,os.f_ok):
break
self.ctrlpic = photoimage(file = controllerfilename)

to bypass a few functions that aren't implemented yet (such as dialogprogress) with a quick hack, add the following to "xmbcgui.py".
Quote:def lock():
return none
def unlock():
return none
class dialogprogress:
def create(self,str0=none,str1=none,str2=none,str3=none):
return none
def close(self):
return none
def iscanceled(self):
return false
and add the following to "xmbc.py".
Quote:def log(string):
print string

greetz,
piscator
Reply
#34
alex,

thanks for the fine utility.

only problem i have had with it is that win i execute a program from pythonwin, i can only execute it once. after i quit the script, i keep getting tkl errors keeping me from running the script again. all i can do is quit pythonwin and restart it.

any work arounds?

thanks
Reply
#35
(deadken @ dec. 27 2004,21:12 Wrote:only problem i have had with it is that win i execute a program from pythonwin, i can only execute it once. after i quit the script, i keep getting tkl errors keeping me from running the script again. all i can do is quit pythonwin and restart it.
you can also run python scripts directly from the command prompt. e.g. "myscript.py" if you have .py associated with python. or "python myscript.py" if you haven't.

greetz,
piscator
Reply
#36
i just downloaded python 2.4 for windows, and pil which your script requires only installs up to version 2.3. took some serious digging but i found pil for 2.4 here:

http://effbot.org/downloads/#pil

just wanted to save the next person the trouble. Smile
Reply
#37
first to grey night: dang i just found your link and well i was digging for that last night. but i just ramped back my install of python to get it working. Smile
no i have to upgrade again Smile
--
alex, first off thanks, your tut was a great help,
and the emu is great there is just one thing my newb arse cant figure out.
what is the base dir for the scripts. (ie where on my pc) everytime a script calls for a background image it says it cant find it?
any help would be grand
jt
Reply
#38
depends where your script is looking for the pic !
in my scripts i always use relative path to know everytime where are the pics (whatever path the script is located)
home=os.getcwd()
if not(emulateur):
home=home[:-1]
home=home+'\\'

this make the var 'home' get the actual dir where the script is launched from. then if i need pics :
pics_dir=home+'pics\\'
now pics_dir is a var pointing in %home%/pics/
then when i need to show a pic :
pics_dir+'picture.png'
picture.png is a pic file in the %home%/pics/

i think we should all scripters use such a trick. that way, we don't care where user install the script. as far as i am concerned, i install all my scripts in the q:\scripts\%scriptdir%\
where %scriptdir% is the name of script and content all files for script.
Reply
#39
here are some xbmcgui.py additions i've had to make to make my script run:


Quote:def lock():
       print('xbmcgui.lock()')
def unlock():
       print('xbmcgui.unlock()')

class windowdialog(window):
       pass

class dialogprogress:
       def create(self, title, line1, line2 = "", line3 = ""):
               print('xbmcgui.progress.create:'+line1)
       def update(self, pct):
               print('xbmcgui.progress:'+str(pct))
       def close(self):
               pass
def iscanceled(self):
return false
Reply
#40
(grey_knight @ jan. 16 2005,00:49 Wrote:yadda yadda py2.4 for windows yadda yadda problems...
http://effbot.org/downloads/#pil

just wanted to save the next person the trouble.

awesome, thanks for this link - very helpful. i'm just getting started with python and xbmc scripting. (coming from perl)
the emulator is also a great tool, thanks alex.
Reply
#41
hi,

i've been searching and searching for these xbmc emulator scripts for a couple of days now. since alex's site has completely disappeared and the scripts don't appear to exist anywhere else on the net would someone here be able to make available the latest version of these scripts?

thanks in advance for your help.

regards,
michal
Reply
#42
like michal (above), i am also searching for these emulator scripts.

i'm using activestate python 2.4? i'd appreciate any info on using it for xbox scripting and how it works with these emulator files. if scripters prefer another version of python, please name it.

i have revised the old tvtome script. for the curious, it can download the (now defunct) tvtome website from archive.org. it has helped me debug a new version, one intended to work with epguides.com but using tv.com to retrieve episode listings.
Reply
#43
isn't there aybody out there who would be willing to provide me with the scripts?

i was working on a script that would automatically name and display in a show -> season - > episode tree all tv shows based on their filenames but i havn't been able to do any work in a week now as i cannot access my xbox for testing 99% of the time.

if anyone has any interest in such a script or even if you don't but can still provide me with the xbmc emulator scripts then i would appreciate it very much.

regards,
michal
Reply
#44
http://cvs.sourceforge.net/viewcvs....tor.rar

found the files laying on my hdd hope they are of some use... they will be up'd there to that link in a few days... :fixed:
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
Reply
#45
(teknojuce @ oct. 21 2005,10:47 Wrote:found the files laying on my hdd hope they are of some use... they will be up'd there to that link in a few days... :fixed:
thanks. link works, got the files.
Reply

Logout Mark Read Team Forum Stats Members Help
Python Dev Tool: XBMC Emulator scripts0