tests/Node.py
def currencyStrToInt(balanceStr):
        """Converts currency string of form "12.3456 MES" to int 123456"""
        assert(isinstance(balanceStr, str))
        balanceStr=balanceStr.split()[0]
        #balance=int(decimal.Decimal(balanceStr[1:])*10000)
        balance=int(decimal.Decimal(balanceStr)*10000)

        return balance
Converts currency string of form "12.3456 MES" to int 123456
Converts currency string of form "12.3456 MES" to int 123456
Converts currency string of form " 12 . 3456 MES " to int 123456
def currencyStrToInt(balanceStr):
        assert(isinstance(balanceStr, str))
        balanceStr=balanceStr.split()[0]
        balance=int(decimal.Decimal(balanceStr)*10000)
        return balance
def currencyStrToInt ( balanceStr ) : assert ( isinstance ( balanceStr , str ) ) balanceStr = balanceStr . split ( ) [ 0 ] balance = int ( decimal . Decimal ( balanceStr ) * 10000 ) return balance
Converts currency string of form "12.3456 MES" to int 123456
Converts currency string of form " 12 . 3456 MES " to int 123456
"""Converts currency string of form "12.3456 MES" to int 123456""" #balance=int(decimal.Decimal(balanceStr[1:])*10000)
balanceStr