In Python, how can I convert currency code to its sign?
For example, USD would be converted to $, and JPY would be converted to ¥.
USD
$
JPY
¥
If there isn't a generic way to do this, is there any simple dictionary of these on the Web?
Thanks.
How about Babel?
from babel import numbers print numbers.get_currency_symbol('USD', locale='en') # => $1,500.00 print numbers.get_currency_symbol('GBP', locale='fr_FR') # => 1 500,00 £UK