summaryrefslogtreecommitdiff
path: root/tablib
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2010-10-06 13:42:26 -0400
committerKenneth Reitz <me@kennethreitz.com>2010-10-06 13:42:26 -0400
commita54949bc08e7323bb7b276d8b8acd7ab0ec5a397 (patch)
tree41854dc9a0e0aa1073a2516110b657525ce748e7 /tablib
parented686c23914d42dec69fcc9e8e8fc52a727095eb (diff)
downloadtablib-a54949bc08e7323bb7b276d8b8acd7ab0ec5a397.tar.gz
Removed external dependencies, but utilize them if
available.
Diffstat (limited to 'tablib')
-rw-r--r--tablib/formats/_json.py4
-rw-r--r--tablib/formats/_xls.py6
-rw-r--r--tablib/formats/_yaml.py4
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