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

Functions

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 main.py.

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

number:
The number to get the absolute value for

Definition at line 147 of file main.py.

def ros.main.availchar (   charactertype)

Definition at line 677 of file main.py.

def ros.main.bintobool (   integer)

Definition at line 238 of file main.py.

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

colourcode:
The colour code representing the colour to convert from.

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

amount:
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 main.py.

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

startcolourcode:
Set the colour code to convert from

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

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

Definition at line 54 of file main.py.

def ros.main.comparenum (   value1,
  value2,
  comparison 
)

Definition at line 335 of file main.py.

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

Definition at line 657 of file main.py.

def ros.main.convertbinary (   value,
  argument 
)

Definition at line 564 of file main.py.

def ros.main.convertstring (   value)

Definition at line 396 of file main.py.

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

Definition at line 495 of file main.py.

def ros.main.decintfix (   decorint = 0)

Definition at line 796 of file main.py.

def ros.main.delay (   seconds)

Definition at line 381 of file main.py.

def ros.main.difference (   num1,
  num2 
)

Definition at line 462 of file main.py.

def ros.main.divisable (   num1,
  num2 
)

Definition at line 469 of file main.py.

def ros.main.enum (   arguments)

Definition at line 712 of file main.py.

def ros.main.evaluate (   evaluation)

Definition at line 627 of file main.py.

def ros.main.execute (   execution)

Definition at line 634 of file main.py.

def ros.main.genipsum ( )

Definition at line 229 of file main.py.

def ros.main.getletter (   variable,
  letternumber 
)

Definition at line 525 of file main.py.

def ros.main.getstored ( )

Definition at line 374 of file main.py.

def ros.main.gettype (   value)

Definition at line 641 of file main.py.

def ros.main.happybirthday (   person)

Definition at line 449 of file main.py.

def ros.main.isboolean (   value)

Definition at line 442 of file main.py.

def ros.main.isdecimal (   value)

Definition at line 414 of file main.py.

def ros.main.isempty (   variable)

Definition at line 476 of file main.py.

def ros.main.isinteger (   value)

Definition at line 435 of file main.py.

def ros.main.isstring (   variable)

Definition at line 421 of file main.py.

def ros.main.istype (   variable,
  typeexpected 
)

Definition at line 428 of file main.py.

def ros.main.jointext (   firststring,
  secondstring 
)

Definition at line 539 of file main.py.

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

number:
The number to add the leading zeros to

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

Definition at line 131 of file main.py.

def ros.main.length (   value)

Definition at line 483 of file main.py.

def ros.main.letternum (   letter)

Definition at line 734 of file main.py.

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

Definition at line 274 of file main.py.

def ros.main.modulereload (   modulename)

Definition at line 249 of file main.py.

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

Definition at line 760 of file main.py.

def ros.main.onlist (   listtocheck,
  item 
)

Definition at line 532 of file main.py.

def ros.main.opposite (   boolean)

Definition at line 403 of file main.py.

def ros.main.pingtest (   returntrue = False)

Definition at line 648 of file main.py.

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

Definition at line 222 of file main.py.

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

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

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

Definition at line 200 of file main.py.

def ros.main.pyname (   ifmain = False)

Definition at line 555 of file main.py.

def ros.main.replacetext (   string,
  texttofind,
  texttoreplace 
)

Definition at line 600 of file main.py.

def ros.main.reverselist (   listtoreverse)

Definition at line 593 of file main.py.

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

Definition at line 580 of file main.py.

def ros.main.roslicense (   raw = False)

Definition at line 805 of file main.py.

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

Definition at line 282 of file main.py.

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

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

splitpart:
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 main.py.

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

listtosort:
The list which will be sorted

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

reverse:
If to sort backwards. The default is False.

Definition at line 181 of file main.py.

def ros.main.spacelist (   listtospace)

Definition at line 746 of file main.py.

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

string:
The string to split

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

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

Definition at line 160 of file main.py.

def ros.main.store (   value)

Definition at line 366 of file main.py.

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

Definition at line 780 of file main.py.

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

Definition at line 722 of file main.py.

def ros.main.throwerror (   errortext)

Definition at line 359 of file main.py.

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

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

Definition at line 607 of file main.py.

def ros.main.wait_enter (   times = 1)

Definition at line 388 of file main.py.

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

Definition at line 256 of file main.py.

def ros.main.wordvalue (   word)

Definition at line 702 of file main.py.