Sleepy Cabbage wrote: > I'm scripting a superkaramba theme using python and have intgrated output > from amarok. I have also would like to show the artist and song title from > a radio stream i've added to my playlist. > > If I open a python console and add the following: > > ">>>import urllib2" > ">>>from urllib2 import urlopen" > > ">>>nowplaying = str.split(urlopen('http://www.hearteastmids.co.uk// > jsfiles/NowPlayingDisplay.aspx?f=http%3A%2F%2Frope.ccap.fimc.net%2Ffeeds% > 2Fnowplaying%2FGlobal%2FHeart_Network%2FHeart_East_Midlands% > 2F6854.xml&l=6854&tzc=8&at=HeartEastMids').read(),'>')" > > ">>>print test[4][:-3]" > > this works and displays the artist and song title. > > However, when I add this to my script I get the following errors:
Please give a minimal version of your script that produces the error, not some arbitrary excerpt that you ran successfully on the command line. If I were to guess: you are doing something like import socket socket.socket = socket somewhere, thus confusing the socket class with the module of the same name. Peter -- http://mail.python.org/mailman/listinfo/python-list