Skip to content

Commit

Permalink
Use imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigc committed Jan 29, 2017
1 parent 099737d commit 77b95e9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/core/howto/tutorial/listings/finger/fingerXRclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

try:
# Python 3
import xmlrpc.client
Server = xmlrpc.client.Server
from xmlrpc.client import Server
except ImportError:
# Python 2
import xmlrpclib
Server = xmlrpclib.Server
from xmlrpclib import Server

import xmlrpc.client
server = Server('http://127.0.0.1:8000/RPC2')
print(server.getUser('moshez'))

0 comments on commit 77b95e9

Please sign in to comment.