Dumb argv issue
#1
anything wrong with this code..?

import sys
if len(sys.argv) < 3:
print "error: need two parameters, host and port to listen"
sys.exit(4)

i get this error:


25-05-2005 19:39:31 info traceback (most recent call last):
25-05-2005 19:39:31 info file "q:\scripts\test2.py", line 12, in ?
25-05-2005 19:39:31 info
25-05-2005 19:39:31 info if len(sys.argv) < 3:
25-05-2005 19:39:31 info attributeerror
25-05-2005 19:39:31 info :
25-05-2005 19:39:31 info 'module' object has no attribute 'argv'


xmbc-2005-05-22 in case this info is needed, any other script is working.

cheers
gg
Reply
#2
argv is used for giving additional arguments to a script when strating it. and since on the xbox you can only click on a script and cannot give any arguments with it, i disabled it.

so nothing wrong with it, it is just not supported
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
#3
that's a pity, since scripts can be invoked by other scripts or by ad-hoc entries in the main screen submenu...

any chance to have you change your mind concerning this? :)

gg
Reply
#4
ofcourse. if its really usefull i can allways add it (and that is after the dvd player is finished Smile)
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
#5
>and that is after the dvd player is finished
i second that, the dvd player is definitively more important!
nevertheless, remember to include this into your todo list, pls...
cheers
gg
Reply

Logout Mark Read Team Forum Stats Members Help
Dumb argv issue0