Python and Samba
#1
hi,
in the last days playd a bit with python and it works really fine. but one thing i couldn´t get work, was to play an mediafile over an samba share.
is it possible to acces samba-shares with python?
i tried this(from the example scrpit):
Quote:import xbmc, xbmcgui, nt

dir = 'smb:\\user:[email protected]\video\'
list = nt.listdir(dir)

dialog = xbmcgui.dialog()
selected = dialog.select('select a song to play, no directory!!!', list)
filename = list[selected]

xbmc.mediaplay(dir + filename)

in xbmc samba is working great, bit with python i did not get it work.

scooba77
Reply
#2
python can't access samba directly, the same goes for relax.

you could use xbmc.player().play("smb://server/share/file.mp3") but that is all for now
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
thanks for your answer, but this does not work.
i tested:
Quote:xbmc.player().play("smb://192.168.66.7/videoz/01.mpg")
and:
Quote:xbmc.player().play("smb://xbox:[email protected]/videoz/01.mpg")

192.168.66.7 is the ip of my pc(winxp) and xbox:xbox is user:pass for the xbox-user

or is there any alternative to play an mpg from an other pc with python?

scooba77
Reply
#4
moving to "development". Smile
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!
Reply
#5
xbmc.player().play("smb://192.168.66.7/videoz/01.mpg") is only for xbmc after 06-02-2004

before that date you should use xbmc.mediaplay("smb://192.168.66.7/videoz/01.mpg")

and you could always press the info button after running the script to get some more information
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

Logout Mark Read Team Forum Stats Members Help
Python and Samba0