def show(arg=None, timeout=5): global _g cmd = "" # show a list of steps if isinstance(arg, list) or isinstance(arg, tuple): _show_steps(arg, timeout) # show a single step elif callable(arg): arg() cmd = _g.showNow(timeout) # show for some period of time elif isinstance(arg, float) or isinstance(arg, int): cmd = _g.showNow(arg) # show else: cmd = _g.showNow() _g = Guide() return cmd
from org.sikuli.guide import SxAnchor from org.sikuli.guide import SxArea from org.sikuli.guide import SxArrow from org.sikuli.guide import SxBracket from org.sikuli.guide import SxButton from org.sikuli.guide import SxCallout from org.sikuli.guide import SxCircle from org.sikuli.guide import SxClickable from org.sikuli.guide import SxFlag from org.sikuli.guide import SxHotspot from org.sikuli.guide import SxImage from org.sikuli.guide import SxRectangle from org.sikuli.guide import SxSpotlight from org.sikuli.guide import SxText _g = Guide() ####################### # Core API # ####################### #================ # Basic Elements #================ def rectangle(target, **kwargs): comp = _g.rectangle() return _addComponentHelper(comp, target, side='over', **kwargs)