diff options
author | Raymond Hettinger <python@rcn.com> | 2004-12-31 19:15:26 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-12-31 19:15:26 (GMT) |
commit | a617271dbd150549b021a5161d009869ad62f7b2 (patch) | |
tree | 764221870afed35cab4c4bc8e07d31964a794fc4 /Lib/SimpleHTTPServer.py | |
parent | 54266fce8db4c303a2c5ae84ecd0db493b400625 (diff) | |
download | cpython-a617271dbd150549b021a5161d009869ad62f7b2.zip cpython-a617271dbd150549b021a5161d009869ad62f7b2.tar.gz cpython-a617271dbd150549b021a5161d009869ad62f7b2.tar.bz2 |
Use cStringIO where available.
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
-rw-r--r-- | Lib/SimpleHTTPServer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 93662ab..93af109 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -17,7 +17,10 @@ import urllib import cgi import shutil import mimetypes -from StringIO import StringIO +try: + from cStringIO import StringIO +except ImportError: + from StringIO import StringIO class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): |