def get_known_genres_list(): genres = [] try: connect = ServerProxy("http://127.0.0.1:8001") genres = connect.get_genres_list() except Exception as e: pass return genres
__author__ = 'Oleksandr Korobov' # XmlRpc client code example from xmlrpclib import ServerProxy connect = ServerProxy("http://localhost:8001") print 'Known genre are:', connect.get_genres_list() print 'Your genre is: ', connect.classify_text('Put your english text here...')