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.VMWareClient

Bases: vncdotool.client.VNCDoToolClient

dataReceived(data)
class vncdotool.client.VMWareFactory

Bases: vncdotool.client.VNCDoToolFactory

protocol

alias of VMWareClient

class vncdotool.client.VNCDoToolClient

Bases: vncdotool.rfb.RFBClient

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

Save a region of the current display to filename

captureScreen(filename, incremental=0)

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
image_mode = 'RGBX'
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)
refreshScreen(incremental=0)
screen = None
setImageMode()

Extracts color ordering and 24 vs. 32 bpp info out of the pixel format information

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
vncdotool.client.factory_connect(factory, host, port, family)