Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions simpledbf/simpledbf.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import struct
import codecs
import datetime
import os
import codecs
import struct
import warnings

# Check for optional dependencies.
try:
import pandas as pd
except:
print("Pandas is not installed. No support for DataFrames, HDF, or SQL.")
warnings.warn(
"Pandas is not installed. No support for DataFrames, HDF, or SQL.")
else:
try:
import tables as tb
except:
print("PyTables is not installed. No support for HDF output.")
warnings.warn(
"PyTables is not installed. No support for HDF output.")
try:
import sqlalchemy as sql
except:
print("SQLalchemy is not installed. No support for SQL output.")
warnings.warn(
"SQLalchemy is not installed. No support for SQL output.")

sqltypes = {
'sqlite': {'str':'TEXT', 'float':'REAL', 'int': 'INTEGER',
Expand Down