summaryrefslogtreecommitdiff
path: root/tablib
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2010-09-13 16:06:37 -0400
committerKenneth Reitz <me@kennethreitz.com>2010-09-13 16:06:37 -0400
commit3da34af76fdb2357e571bb8091ec61a84a86aa49 (patch)
tree6bd8fa3ce9da72828f211d44f8d9b53185c68841 /tablib
parent5b42824871b357bcd6531845b2bb8ac5a4436572 (diff)
downloadtablib-3da34af76fdb2357e571bb8091ec61a84a86aa49.tar.gz
Removed un-implimented junk from core.py
Diffstat (limited to 'tablib')
-rw-r--r--tablib/core.py39
1 files changed, 2 insertions, 37 deletions
diff --git a/tablib/core.py b/tablib/core.py
index f555bd0..fa8c797 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -11,17 +11,14 @@ import csv
import cStringIO
import random
-
-from helpers import *
import simplejson as json
-
-
import xlwt
import yaml
+from helpers import *
-__all__ = ['Dataset', 'DataBook', 'source']
+__all__ = ['Dataset', 'DataBook']
__name__ = 'tablib'
__version__ = '0.6.1'
@@ -31,10 +28,6 @@ __license__ = 'MIT'
__copyright__ = 'Copyright 2010 Kenneth Reitz'
-FILE_EXTENSIONS = ('csv', 'json', 'xls', 'yaml')
-
-
-
class Dataset(object):
"""Epic Tabular-Dataset object. """
@@ -184,28 +177,6 @@ class Dataset(object):
self._validate(row)
self._data.insert(i, tuple(row))
- def sort_by(self, key):
- """Sorts datastet by given key"""
- # todo: accpept string if headers, or index nubmer
- pass
-
- def save(self, filename=None, format=None):
- """Saves dataset"""
- if not format:
- format = filename.split('.')[-1].lower() # set format from filename
-
- if format not in FILE_EXTENSIONS:
- raise UnsupportedFormat
-
-
- # note export format
- # open file, save the bitch
-
-
- def export(self):
- """Exports Dataset to given filename or file-object."""
- pass
-
class DataBook(object):
"""A book of Dataset objects.
@@ -282,9 +253,3 @@ class InvalidDimensions(Exception):
class UnsupportedFormat(NotImplementedError):
"Format is not supported"
-
-
-def source(src=None, file=None, filename=None):
- """docstring for import"""
- #open by filename
- pass \ No newline at end of file