Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't convert symbol to currency code? #47

Closed
tmavre opened this issue Aug 24, 2018 · 3 comments
Closed

Can't convert symbol to currency code? #47

tmavre opened this issue Aug 24, 2018 · 3 comments

Comments

@tmavre
Copy link
Contributor

tmavre commented Aug 24, 2018

Is it possible to get something like:
get_currency_code("$") to return "USD" ?

@IssueHuntBot
Copy link

@haqqer has started working. Visit this issue on Issuehunt

@IssueHuntBot
Copy link

@haqqer has stopped working. Visit this issue on Issuehunt

@ravigadila
Copy link

In new version(1.2) you will get currency name with symbol.
but it will return first occurrence of symbol. see below

In [14]: from forex_python.converter import CurrencyCodes

In [15]: c = CurrencyCodes()

In [16]: c.get_currency_code_from_symbol('$')
Out[16]: 'ARS'

In [17]: c.get_currency_code_from_symbol(u'\xa3')
Out[17]: 'EGP'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants