diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-10-06 13:42:26 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-10-06 13:42:26 -0400 |
| commit | a54949bc08e7323bb7b276d8b8acd7ab0ec5a397 (patch) | |
| tree | 41854dc9a0e0aa1073a2516110b657525ce748e7 /tablib | |
| parent | ed686c23914d42dec69fcc9e8e8fc52a727095eb (diff) | |
| download | tablib-a54949bc08e7323bb7b276d8b8acd7ab0ec5a397.tar.gz | |
Removed external dependencies, but utilize them if
available.
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/formats/_json.py | 4 | ||||
| -rw-r--r-- | tablib/formats/_xls.py | 6 | ||||
| -rw-r--r-- | tablib/formats/_yaml.py | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tablib/formats/_json.py b/tablib/formats/_json.py index 843da90..5619316 100644 --- a/tablib/formats/_json.py +++ b/tablib/formats/_json.py @@ -4,9 +4,9 @@ """ try: - import json + import json except ImportError: - import simplejson as json + import simplejson as json import tablib.core diff --git a/tablib/formats/_xls.py b/tablib/formats/_xls.py index f7be4a4..97a9580 100644 --- a/tablib/formats/_xls.py +++ b/tablib/formats/_xls.py @@ -3,9 +3,13 @@ """ Tablib - XLS Support. """ -import xlwt import cStringIO +try: + import xlwt +except ImportError: + import tablib.packages.xlwt as xlwt + title = 'xls' extentions = ('xls',) diff --git a/tablib/formats/_yaml.py b/tablib/formats/_yaml.py index ab96b61..59d49a0 100644 --- a/tablib/formats/_yaml.py +++ b/tablib/formats/_yaml.py @@ -4,9 +4,9 @@ """ try: - import yaml + import yaml except ImportError: - import tablib.packages.yaml as yaml + import tablib.packages.yaml as yaml import tablib |
