def endCallback(self,event):
sys.stdout.write('\n\r endCallback')
sys.stdout.flush()
self._mainbox.remove(self.vlc)
self.vlc = None
self.vlc = DecoratedVLCWidget()
sys.stdout.write('\n\r recreatePlayer')
sys.stdout.flush()
fname = vlc_controller.GetNextTrack()['url']
self.vlc.player.set_media(instance.media_new(fname,'--network-caching 60000'))
sys.stdout.write('\n\r after set_media')
sys.stdout.flush()
self.vlc.player.play()
sys.stdout.write('\n\r afterplay')
sys.stdout.flush()
>>> import httplib, urllib
>>> params = urllib.urlencode({'@number': 12524, 'type': 'issue', 'action': 'show'})
>>> headers = {"Content-type": "application/x-www-form-urlencoded",
... "Accept": "text/plain"}
>>> conn = httplib.HTTPConnection("bugs.python.org")
>>> conn.request("POST", "", params, headers)
>>> response = conn.getresponse()
>>> print response.status, response.reason
302 Found
>>> data = response.read()
>>> data
'Redirecting to http://bugs.python.org/issue12524'
>>> conn.close()