Share and Money Management  0.16
Classes | Namespaces | Functions | Variables
helper.py File Reference

Functions and classes to simplify recurring actions. More...

Classes

class  gui.helper.ReverseDict
 A dictionary which can lookup values by key, and keys by value. More...
 

Namespaces

 gui.helper
 Functions to support GUI functions e.g.
 

Functions

def gui.helper.formatShareNotesShort (share, max_len=25)
 Returns additional note to a share - short formatted. More...
 
def gui.helper.formatShareNotesLong (share)
 Returns additional note to a share - long formatted. More...
 
def gui.helper.formatCurrencySign (currency)
 Returns the sign of a currency or an empty string. More...
 
def gui.helper.formatCurrencyShort (currency)
 Returns the currency sign or code or an empty string. More...
 
def gui.helper.formatCurrencyLong (currency)
 Returns the formatted currency or an empty string. More...
 
def gui.helper.formatDate (date, fmt='%d.%m.%Y')
 Returns the formatted date or an empty string. More...
 
def gui.helper.formatDecimal (value, places=2, grouping=True)
 Returns the formatted decimal value or an empty string. More...
 
def gui.helper.formatDuration (duration)
 Returns the given duration formatted. More...
 
def gui.helper.formatDailyQuoteEvent (quote)
 Returns the DailyQuote.event formatted. More...
 
def gui.helper.formatExchange (exchange)
 Returns the formatted exchange or an empty string. More...
 
def gui.helper.formatMoney (value, currency, places=3, grouping=True)
 Returns the formatted decimal value incl. More...
 
def gui.helper.formatPercent (value, places=3)
 Returns the formatted decimal value incl. More...
 
def gui.helper.formatPosition (pos)
 Returns the formatted position or an empty string. More...
 
def gui.helper.formatShare (share)
 Returns the formatted share or an empty string. More...
 
def gui.helper.formatShareShort (share)
 Returns the formatted share or an empty string. More...
 
def gui.helper.formatShareKind (share)
 Returns the type of the share or an empty string. More...
 
def gui.helper.formatTransactionKind (transaction)
 Returns the transaction type as a string or an empty string. More...
 
def gui.helper.moneyfmt (value, places=2, curr='', sep=', dp='.', pos='', neg='-', trailneg='')
 Convert Decimal to a money formatted string. More...
 
def gui.helper.wxdate2pydate (wxdate)
 Convert a date from wxDateTime to Python datetime.date. More...
 
def gui.helper.pydate2wxdate (pydate)
 Convert a date from Python datetime.date to wxDateTime. More...
 
def gui.helper.formatTransactionElements (transaction)
 Format all attributes of a Transaction for showing and sorting. More...
 

Variables

 gui.helper.RE_WHITESPACES = re.compile(r'\s{2,}|[\r\n]')
 Precompiled RE pattern to match two or more white spaces or single linebreak characters. More...
 
 gui.helper.DAYS_PER_YEAR = decimal.Decimal('365')
 Number of days in a year. More...
 

Detailed Description

Functions and classes to simplify recurring actions.