diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-03-23 00:03:33 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-03-23 00:03:33 -0400 |
| commit | e8ba7654263c1f3cddfe63dea3d282a739c9778f (patch) | |
| tree | ac0ed0701a7e821f52964f5c989eb2a79f26fa20 /tablib | |
| parent | 57001a546588c7322c2792060dc735d944ea19f0 (diff) | |
| download | tablib-e8ba7654263c1f3cddfe63dea3d282a739c9778f.tar.gz | |
tablib.helpers is not longer needed :cake:
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/helpers.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tablib/helpers.py b/tablib/helpers.py deleted file mode 100644 index f8a5351..0000000 --- a/tablib/helpers.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -""" Tablib - General Helpers. -""" -from __future__ import with_statement - -import sys - - -class Struct(object): - """Your attributes are belong to us.""" - - def __init__(self, **entries): - self.__dict__.update(entries) - - def __getitem__(self, key): - return getattr(self, key, None) - - def dictionary(self): - """Returns dictionary representation of object.""" - return self.__dict__ - - def items(self): - """Returns items within object.""" - return self.__dict__.items() - - def keys(self): - """Returns keys within object.""" - return self.__dict__.keys() - - - -def piped(): - """Returns piped input via stdin, else False.""" - with sys.stdin as stdin: - # TTY is only way to detect if stdin contains data - return stdin.read() if not stdin.isatty() else None - |
