projects
/
doneit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2692952
)
Removing useless doctest since its dependent on non-existent stuff
author
Ed Page
<epage@Dulcinea.(none)>
Sun, 12 Apr 2009 03:31:46 +0000
(22:31 -0500)
committer
Ed Page
<epage@Dulcinea.(none)>
Sun, 12 Apr 2009 03:31:46 +0000
(22:31 -0500)
src/toolbox.py
patch
|
blob
|
history
diff --git
a/src/toolbox.py
b/src/toolbox.py
index
c0e315a
..
e6dfcbf
100644
(file)
--- a/
src/toolbox.py
+++ b/
src/toolbox.py
@@
-13,18
+13,6
@@
def open_anything(source, alternative=None):
and deal with it in a uniform manner. Returned object is guaranteed
to have all the basic stdio read methods (read, readline, readlines).
Just .close() the object when you're done with it.
and deal with it in a uniform manner. Returned object is guaranteed
to have all the basic stdio read methods (read, readline, readlines).
Just .close() the object when you're done with it.
-
- Examples:
- >>> from xml.dom import minidom
- >>> sock = openAnything("http://localhost/kant.xml")
- >>> doc = minidom.parse(sock)
- >>> sock.close()
- >>> sock = openAnything("c:\\inetpub\\wwwroot\\kant.xml")
- >>> doc = minidom.parse(sock)
- >>> sock.close()
- >>> sock = openAnything("<ref id='conjunction'><text>and</text><text>or</text></ref>")
- >>> doc = minidom.parse(sock)
- >>> sock.close()
"""
if hasattr(source, "read"):
return source
"""
if hasattr(source, "read"):
return source