Package goby :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

General purpose utiliies used by Goby.

Functions [hide private]
string
commify(num, separator=',')
Return a string representing the number num with separator inserted for every power of 1000.
source code
Variables [hide private]
  commify_regex = re.compile(r'^(-?\d+)(\d{3})')
  __package__ = 'goby'
Function Details [hide private]

commify(num, separator=',')

source code 

Return a string representing the number num with separator inserted for every power of 1000. Separator defaults to a comma. E.g., commify(1234567) -> '1,234,567'

Returns: string