Is this the preferred way to detect if the unicode or non-unicode version of cx_oracle was installed?
Pregunta
I have a custom module that's basically a thin wrapper around a database connection with cx_Oracle. I'd like to re-use this module on computers with both the unicode version of cx_Oracle installed, and with the non-unicode version.
To do this, I need to "detect" the version installed. I could "try" making a connection using a string connection descriptor; and if I get a TypeError back, then assume it's the unicode version installed. This just seems a bit kludgy.
Is there a better/preferred way of doing this?
Thanks.
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow