rs2.utilities package
rs2.utilities.ApplicationManager module
- class rs2.utilities.ApplicationManager.ApplicationManager
Bases:
object
- minimumPort = 49152
- maximumPort = 65535
- defaultTimeout = 30
- startApplication(pathToExecutable: str, port: int, timeout: float = 30)
Starts the application specified by pathToExecutable and starts the python server on the given port. Returns when the server is ready to accept requests. Throws TimeoutError exception if the server is not ready within that time.
- Parameters:
pathToExecutable – the full path to the executable of the application you want to start.
port – the port number you want the python server to bind to.
timeout – time in seconds before we stop trying to start the application
- Raises:
ValueError – Port range must be between 49152 and 65535, otherwise ValueError is raised TimeoutError: if timeout is provided, raises TimeoutError if not able to connect to the server within that time.
rs2.utilities.ColorPicker module
- class rs2.utilities.ColorPicker.ColorPicker
Bases:
object
- Black = 0
- Brown = 10917
- Dark_Olive_Green = 4210688
- Dark_Green = 21760
- Dark_Teal = 6160384
- Dark_Blue = 9109504
- Indigo = 8519755
- Dark_Grey = 2631720
- Dark_Red = 139
- Orange = 2124031
- Dark_Yellow = 35723
- Green = 37632
- Teal = 9342520
- Blue = 16711680
- Blue_Grey = 12614523
- Grey_40 = 6710886
- Red = 255
- Light_Orange = 6008319
- Lime = 3329330
- Sea_Green = 7451452
- Aqua = 13959039
- Light_Blue = 12623485
- Violet = 8388736
- Grey_50 = 8355711
- Pink = 13353215
- Gold = 55295
- Yellow = 65535
- Bright_Green = 65280
- Turquoise = 13688896
- Skyblue = 16777152
- Plum = 4718664
- Light_Grey = 12632256
- Rose = 14804223
- Tan = 9221330
- Light_Yellow = 14745599
- Pale_Green = 10025880
- Pale_Turquoise = 15658671
- Pale_Blue = 9143144
- Lavender = 16443110
- White = 16777215
- getRGBFromColor()
Returns the RGB representation of a color from its int value
- Params:
color (int) : int representing the color
Returns: tuple containing red, green and blue values of the color. Each of red, green and blue are between 0 and 255 inclusive
- getColorFromRGB(green: int, blue: int)
Returns the int representation of a color from its R, G, B values
- Params:
red (int) : int representing red value of the color. Must be between 0 and 255 inclusive green (int) : int representing green value of the color. Must be between 0 and 255 inclusive blue (int) : int representing blue value of the color. Must be between 0 and 255 inclusive
Returns: int representation of color formed combining rgb values