XBMC Community Forum  

Go Back   XBMC Community Forum > Development > XBMC Development

XBMC Development Developers forums for XBMC related development. Programmers/Coders only!
No end-user support, no bug reports, and no feature/function requests here!
Please, add platform prefix for suggestions that are not platform-independent!:
Thread prefixes; "[LINUX]", "[LIVE]", "[MAC]", "[WINDOWS]", and "[XBOX]"

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 2003-10-07, 20:17   #1
Blackbelt
Junior Member
 
Join Date: Oct 2003
Location: North Carolina
Posts: 4
Blackbelt is on a distinguished road
Default

i noticed that a ported version of python is included in the xbmc source. this is great as python is a simple and powerful object oriented scripting language. so how is python used by xbmc? are scripts used as a part of the application or is the intent only to execute external utility scripts?

the ability to tweak scripts and see the results without recompiling and downloading to the xbox would sure be nice...
Blackbelt is offline  
Old 2003-10-08, 01:51   #2
Hullebulle
Fan
 
Join Date: Sep 2003
Posts: 1,972
Hullebulle is on a distinguished road
Default

you can select the scripts like a program or movie and start it.

too bad that i have no idea of python.
__________________
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Hullebulle is offline  
Old 2003-10-08, 19:51   #3
Zealot
Junior Member
 
Join Date: Oct 2003
Location: Ottawa, Ontario
Posts: 7
Zealot is on a distinguished road
Send a message via ICQ to Zealot Send a message via AIM to Zealot Send a message via MSN to Zealot Send a message via Yahoo to Zealot
Default

i'm really wondering the same thing. i've looked through the forums and docs on the xbmp site, and i couldn't find a definite answer.

does xbmc have a full embedded python interpreter, or is it a limited set of functionality? is there socket support? like, would i be able to build a web service / client in python?
Zealot is offline  
Old 2003-10-08, 21:36   #4
Hullebulle
Fan
 
Join Date: Sep 2003
Posts: 1,972
Hullebulle is on a distinguished road
Default

Quote:
does xbmc have a full embedded python interpreter, or is it a limited set of functionality?
full

Quote:
is there socket support?
yes

Quote:
like, would i be able to build a web service / client in python?
yes



__________________
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Hullebulle is offline  
Old 2003-10-09, 13:33   #5
burriko
Senior Member
 
Join Date: Oct 2003
Posts: 199
burriko is on a distinguished road
Default

can any of the devs give a bit more info on this? as it sounds very interesting.
how do the scripts interact with xbmc? how exactly do you execute scripts? i tried selecting a small test script in xbmc, but it didn't seem to have any effect.
burriko is offline  
Old 2003-10-09, 17:19   #6
darkie
Team-XBMC Developer
 
Join Date: Sep 2003
Posts: 530
darkie is on a distinguished road
Default

first of all 'python 2.3' is embedded into xbmc and you the need to do the following to get it working

extract the directories from python.rar (cvs\xbmc\python\python.rar)
to "xbmc home dir\python\"
and if you want some examples you should extract scripts.rar(cvs\xbmc\scripts\scripts.rar)
to "xbmc home dir\scripts\"

you will now have the next directory structure in xbmc
xbmc
* python
* * * lib
* * * temp
* * * www
* scripts
* * * medusa

you execute scripts thrue the myscripts gui which is under settings->scripts.
currently there is no interaction with xbmc, for example you can't see any output from the python interpreter (this will be added because it's the only way to see where the script stops when an error occours)

included in scripts.rar are the next files
Quote:
chat-server.py: runs a chat server on port 4000
download_apleasure_zip.py: downloads a file from ftp and places it in your xbmc home dir
download_xskit303_exe.py: downloads another file from ftp
echo_server_port_50007.py: runs an echo server on port 50007
mp3.py: only used for testing and doesn't work
url_fetcher_asyncore.py: used for testing and doesn't work
weather.py: used for testing and doesn't work

medusa\start_medusa: runs an ftp / web and chat server on the ports 8021, 8080 and 8888
if you need any documentation or need more scripts examples you can try the official python website http://www.python.org
__________________
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.


darkie is offline  
Old 2003-10-10, 13:12   #7
Gamester17
Team-XBMC Project Manager
 
Gamester17's Avatar
 
Join Date: Sep 2003
Location: Sweden
Posts: 10,582
Gamester17 will become famous soon enough
Question

darkie, as the coder of xbmc's python interpreter can you tell us all a little more about the techical aspects behind it, things like; is it loaded into a pragma section?, is it or will it be loaded by default?, how much ram does it use?, once the python interpreter is loaded into memory will/can it be unloaded when not used anymore or is reboot nessesary?, once a python script is loaded into memory will/can it be unloaded when not running anymore?, where are you planning to take this development wise?, and how do you plan to implement it in the gui, now & later?

...and other things like that, tia
__________________
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.
Gamester17 is offline  
Old 2003-10-10, 22:14   #8
windragz
Junior Member
 
Join Date: Oct 2003
Location: Australia
Posts: 17
windragz is on a distinguished road
Send a message via MSN to windragz
Default

a dream becomes to be a reality!!
yes, yes. i want develop some webservice, so dear python dev implementator tell us anything is possibile about this wonderful part

it's clear that i'm excited? :d
__________________
windragz
it difficult to break 2048 bit as try to find a sock at morning, it's just matter of time.
windragz is offline  
Old 2003-10-11, 11:46   #9
Frodo
Team MediaPortal
 
Join Date: Sep 2003
Posts: 509
Frodo is on a distinguished road
Default

>is it loaded into a pragma section?
yes it is

>is it or will it be loaded by default?
no

>how much ram does it use?
when loaded about 350kbyte

> once the python interpreter is loaded into memory will/can it be unloaded when not used anymore
no, sorry?,

>once a python script is loaded into memory will/can it be unloaded when not running anymore?
yes
frodo
__________________
XBMC Project Founder (Retired), now head programmer of MediaPortal
Frodo is offline  
Old 2003-10-11, 14:57   #10
Gamester17
Team-XBMC Project Manager
 
Gamester17's Avatar
 
Join Date: Sep 2003
Location: Sweden
Posts: 10,582
Gamester17 will become famous soon enough
Unhappy

Quote:
Originally Posted by (frodo @ oct. 11 2003,09:46)
> once the python interpreter is loaded into memory will/can it be unloaded when not used anymore
no, sorry?
why? i mean it must be possible somehow, or isn't? this will be a challange for all you devs to figure out
__________________
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.
Gamester17 is offline  
Closed Thread

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SFV/MD5 checker inside the FTP-Server MidKnight XBMC Feature Suggestions 5 2006-05-07 11:12
Python Interpreter Development "Python Inside" darkie Plugin/Script (Python) Development 42 2005-09-19 09:07
Ive finally done it..+a little help inside hitman_uk XBMC for Xbox Specific Support 0 2004-03-17 09:28
SRT subtitles inside a 3ivX MOV silentyl XBMC Feature Suggestions 6 2004-02-07 03:37
Subtitles inside AVI is not showing w0rd48 XBMC Feature Suggestions 2 1970-01-01 02:00


All times are GMT +2. The time now is 15:42.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2008, XBMC Project