diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-07 01:31:39 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-07 01:31:39 +0000 |
commit | 8fcf4df8488130bdd5285a97dd2f2de8c87d7f55 (patch) | |
tree | 01bb8b6e7493cf82c168345c309ce26ea870d13e /fs/memoryfs.py | |
parent | 739272ca040326f392917ba2540c14058e10f61b (diff) | |
download | pyfilesystem-git-8fcf4df8488130bdd5285a97dd2f2de8c87d7f55.tar.gz |
add module "fs.filelike" with utils for building file-like objects.
This is a local copy of the guts of my "filelike" module, re-licensed under
the MIT license.
This commit also uses it to fix a few edge-cases in various filesystem
implementations (e.g. truncating StringIO objects).
Diffstat (limited to 'fs/memoryfs.py')
-rw-r--r-- | fs/memoryfs.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/memoryfs.py b/fs/memoryfs.py index 38244ad..e4f0943 100644 --- a/fs/memoryfs.py +++ b/fs/memoryfs.py @@ -16,11 +16,7 @@ from fs.path import iteratepath, pathsplit, normpath from fs.base import *
from fs.errors import *
from fs import _thread_synchronize_default
-
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
+from fs.filelike import StringIO
def _check_mode(mode, mode_chars):
|