You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

odbcinst

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odbcinst

return output from unixODBC `odbcinst` command

1.0.1
PyPI
Maintainers
1

odbcinst

return output from unixODBC odbcinst command

Installation

pip install odbcinst

Usage

The .j() function executes odbcinst -j. If called with no argument it returns a dict. If called with a str argument it returns the specified value.

from pprint import pprint

import odbcinst

pprint(odbcinst.j())
"""console output:
{'DRIVERS': '/etc/odbcinst.ini',
 'FILE DATA SOURCES': '/etc/ODBCDataSources',
 'SQLLEN Size': '8',
 'SQLSETPOSIROW Size': '8',
 'SQLULEN Size': '8',
 'SYSTEM DATA SOURCES': '/etc/odbc.ini',
 'USER DATA SOURCES': '/home/gord/.odbc.ini',
 'unixODBC': '2.3.4'}
"""

print(repr(odbcinst.j("unixODBC")))
# '2.3.4'

If unixODBC is not installed then the results are

pprint(odbcinst.j())
"""console output:
{'unixODBC': None}
"""

print(repr(odbcinst.j("SYSTEM DATA SOURCES")))
# None

Keywords

unixODBC

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts