Code Documentation

client Module

Twisted based VNC client protocol and factory

  1. 2010 Marc Sibson

MIT License

exception vncdotool.client.AuthenticationError

Bases: exceptions.Exception

VNC Server requires Authentication

class vncdotool.client.VNCDoToolClient

Bases: vncdotool.rfb.RFBClient

SPECIAL_KEYS_US = '~!@#$%^&*()_+{}|:"<>?'
bell()
buttons = 0
captureRegion(filename, x, y, w, h)

Save a region of the current display to filename

captureScreen(filename)

Save the current display to filename

cmask = None
commitUpdate(rectangles)
connectionMade()
copy_text(text)
cursor = None
deferred = None
drawCursor()
encoding = 0
expectRegion(filename, x, y, maxrms=0)

Wait until a portion of the screen matches the target image

The region compared is defined by the box (x, y), (x + image.width, y + image.height)

expectScreen(filename, maxrms=0)

Wait until the display matches a target image

filename: an image file to read and compare against maxrms: the maximum root mean square between histograms of the

screen and target image
keyDown(key)
keyPress(key)

Send a key press to the server

key: string: either [a-z] or a from KEYMAP

keyUp(key)
mouseDown(button)

Send a mouse button down at the last set position

button: int: [1-n]

mouseDrag(x, y, step=1)

Move the mouse point to position (x, y) in increments of step

mouseMove(x, y)

Move the mouse pointer to position (x, y)

mousePress(button)

Send a mouse click at the last set position

button: int: [1-n]

mouseUp(button)

Send mouse button released at the last set position

button: int: [1-n]

paste(message)
pause(duration)
screen = None
updateCursor(x, y, width, height, image, mask)
updateDesktopSize(width, height)
updateRectangle(x, y, width, height, data)
vncConnectionMade()
vncRequestPassword()
x = 0
y = 0
class vncdotool.client.VNCDoToolFactory

Bases: vncdotool.rfb.RFBFactory

clientConnectionFailed(connector, reason)
clientConnectionLost(connector, reason)
clientConnectionMade(protocol)
force_caps = False
nocursor = False
password = None
protocol

alias of VNCDoToolClient

pseudocursor = False
pseudodesktop = True
shared = True