Opening smb shares from python?
#1
hey!

i'm writing a nifty little script that randomises a index of files in a directory
and then selecting one and load it with xmbc player (random fileplayer). this would be pretty easy if the files were on my xbox harddrive. instead, i have smb mounted a fileserver and i want to get the os.listdir list so i can play them.

but how do i access the smb? i've tried numerous combinations of
smb://computer, \\computer\\my_share etc.

anyone have any suggestions before i do it the hard way?
Reply
#2
maybe should you find a way to create the connection as a path object and use this path object in your os.listdir
not sure if this exists
Reply
#3
there is no smb support in this python version.
http://home.no.net/thor918/xbmc/
playlistwalker is a script i made using a smb library.
there allready exists one modification of this script that generates a playlist, then randomize the list, and then plays.

http://www.xboxmediaplayer.de/cgi-bin....twalker

seems the mod is no longer on that webpage.

one thing that stopped me was that it seems like it's a limit of 30 files and directories on each level.
xbmcapi nad developer is maby in the progress on exposing all xbmcapi to python.when this happens you will not need any librarys.you will then access the smb directly from xbmc python objects.

good luck
Reply

Logout Mark Read Team Forum Stats Members Help
Opening smb shares from python?0