ROS Code
 All Classes Namespaces Files Functions Variables
ros.main Namespace Reference


def shellinput
def colourcode
def changecolour
def leadingzero
def absolutenum
def splitstring
def sort
def pykeyword
def prettyprinter
def genipsum
def bintobool
def modulereload
def warnconfig
def message_print
def shapesides
def comparenum
def throwerror
def store
def getstored
def delay
def wait_enter
def convertstring
def opposite
def isdecimal
def isstring
def istype
def isinteger
def isboolean
def happybirthday
def difference
def divisable
def isempty
def length
def cowsay
def getletter
def onlist
def jointext
def about
def pyname
def convertbinary
def reversetext
def reverselist
def replacetext
def userinput
def evaluate
def execute
def gettype
def pingtest
def convertascii
def availchar
def wordvalue
def enum
def textbetween
def letternum
def spacelist
def numlistbetween
def textalign
def decintfix
def roslicense

Detailed Description

ROS Code Commands
This file contains all the commands in ROS Code

Function Documentation

def ros.main.about ( )

Definition at line 546 of file

def ros.main.absolutenum (   number)
Get the absolute value for a number

The number to get the absolute value for

Definition at line 147 of file

def ros.main.availchar (   charactertype)

Definition at line 677 of file

def ros.main.bintobool (   integer)

Definition at line 238 of file

def ros.main.changecolour (   colourcode,
  amount = 100 
Modify a parameter of a colour code

The colour code representing the colour to convert from.

The action to perform on the colour. Possible options are red, blue, green, hue, sat, lum

The percentage of the action to perform. For example, 100 means apply 100% of the colour (no change). The default is 100.

Definition at line 94 of file

def ros.main.colourcode (   startcolourcode,
  longhex = False 
Convert a colour code from one format to another

Set the colour code to convert from

Set the colour code type to convert to. Possible options are HEX, HSL, RGB, red, blue, green, hue, sat and lum

If converting to hex, provided the long and unsimplified version. The default is False.

Definition at line 54 of file

def ros.main.comparenum (   value1,

Definition at line 335 of file

def ros.main.convertascii (   value,
  command = 'to' 

Definition at line 657 of file

def ros.main.convertbinary (   value,

Definition at line 564 of file

def ros.main.convertstring (   value)

Definition at line 396 of file

def ros.main.cowsay (   text = '',
  align = 'centre' 

Definition at line 495 of file

def ros.main.decintfix (   decorint = 0)

Definition at line 796 of file

def ros.main.delay (   seconds)

Definition at line 381 of file

def ros.main.difference (   num1,

Definition at line 462 of file

def ros.main.divisable (   num1,

Definition at line 469 of file

def ros.main.enum (   arguments)

Definition at line 712 of file

def ros.main.evaluate (   evaluation)

Definition at line 627 of file

def ros.main.execute (   execution)

Definition at line 634 of file

def ros.main.genipsum ( )

Definition at line 229 of file

def ros.main.getletter (   variable,

Definition at line 525 of file

def ros.main.getstored ( )

Definition at line 374 of file

def ros.main.gettype (   value)

Definition at line 641 of file

def ros.main.happybirthday (   person)

Definition at line 449 of file

def ros.main.isboolean (   value)

Definition at line 442 of file

def ros.main.isdecimal (   value)

Definition at line 414 of file

def ros.main.isempty (   variable)

Definition at line 476 of file

def ros.main.isinteger (   value)

Definition at line 435 of file

def ros.main.isstring (   variable)

Definition at line 421 of file

def ros.main.istype (   variable,

Definition at line 428 of file

def ros.main.jointext (   firststring,

Definition at line 539 of file

def ros.main.leadingzero (   number,
Add leading zeros to a number

The number to add the leading zeros to

If the number is shorter than this length than add leading zeros to make the length correct

Definition at line 131 of file

def ros.main.length (   value)

Definition at line 483 of file

def ros.main.letternum (   letter)

Definition at line 734 of file

def ros.main.message_print (   text,
  amount = 1 

Definition at line 274 of file

def ros.main.modulereload (   modulename)

Definition at line 249 of file

def ros.main.numlistbetween (   num1,
  option = 'list',
  listoption = 'string' 

Definition at line 760 of file

def ros.main.onlist (   listtocheck,

Definition at line 532 of file

def ros.main.opposite (   boolean)

Definition at line 403 of file

def ros.main.pingtest (   returntrue = False)

Definition at line 648 of file

def ros.main.prettyprinter (   listtoprint,
  stream = None,
  indent = 1,
  width = 80,
  depth = None 

Definition at line 222 of file

def ros.main.pykeyword (   operation = 'list',
  keywordtotest = None 
Check if a keyword exists in the Python keyword dictionary

Whether to list or check the keywords. Possible options are list and check. The default is 'list'.

The keyword to test for if the operation is 'check'. The default is None.

Definition at line 200 of file

def ros.main.pyname (   ifmain = False)

Definition at line 555 of file

def ros.main.replacetext (   string,

Definition at line 600 of file

def ros.main.reverselist (   listtoreverse)

Definition at line 593 of file

def ros.main.reversetext (   texttoreverse,
  ignoretype = False 

Definition at line 580 of file

def ros.main.roslicense (   raw = False)

Definition at line 805 of file

def ros.main.shapesides (   inputtocheck,
  inputtype = 'shape' 

Definition at line 282 of file

def ros.main.shellinput (   initialtext = '>> ',
  splitpart = ' ' 
Give the user a shell-like interface to enter commands which are returned as a multi-part list containing the command and each of the arguments

Set the text to be displayed as the prompt. Default is '>>'.

The character to split when generating the list item. The default is ' '. Set to '' or None to skip splitting.

Definition at line 27 of file

def ros.main.sort (   listtosort,
  key = None,
  reversesort = False 
Sort a list alphabetically

The list which will be sorted

The key to use when sorting. The default is None.

If to sort backwards. The default is False.

Definition at line 181 of file

def ros.main.spacelist (   listtospace)

Definition at line 746 of file

def ros.main.splitstring (   string,
  split_character = ' ',
  part = None 
Split a string based on a character and get the parts as a list

The string to split

The character to split for the string. The default is ' '.

Get a specific part of the list. The default is None.

Definition at line 160 of file

def (   value)

Definition at line 366 of file

def ros.main.textalign (   text,
  align = 'left' 

Definition at line 780 of file

def ros.main.textbetween (   variable,
  firstnum = None,
  secondnum = None,
  locationoftext = 'regular' 

Definition at line 722 of file

def ros.main.throwerror (   errortext)

Definition at line 359 of file

def ros.main.userinput (   prompttext = "")
Get the input of the user via a universally secure method

The text to display while receiving the data. The default is "".

Definition at line 607 of file

def ros.main.wait_enter (   times = 1)

Definition at line 388 of file

def ros.main.warnconfig (   action = 'default')

Definition at line 256 of file

def ros.main.wordvalue (   word)

Definition at line 702 of file