summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <distutils-sig@python.org>2005-03-24 19:26:54 +0000
committerBob Ippolito <distutils-sig@python.org>2005-03-24 19:26:54 +0000
commitf58bc069bff975850773108bb7c52848290d64c0 (patch)
treed72c1ebac9b23f34599cfaa2c589a5d711761cb8
parenta188a950c9677396382ea3a79392cbb24ca8210d (diff)
downloadpython-setuptools-git-f58bc069bff975850773108bb7c52848290d64c0.tar.gz
import StringIO at module level
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040996
-rw-r--r--pkg_resources.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 0de4fdbd..15fc862e 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -18,6 +18,10 @@ import sys
import os
import time
import zipimport
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
__all__ = [
'register_loader_type', 'get_provider', 'IResourceProvider',
@@ -312,7 +316,6 @@ class ZipProvider(DefaultProvider):
return self.loader.get_data(path)
def get_resource_stream(self, manager, resource_name):
- from cStringIO import StringIO
return StringIO(self.get_resource_string(manager, resource_name))
def _extract_resource(self, manager, resource_name):