projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d88ea06
)
add support for text file from stdin
author
Paul Brossier
<piem@altern.org>
Fri, 29 Sep 2006 14:57:54 +0000
(14:57 +0000)
committer
Paul Brossier
<piem@altern.org>
Fri, 29 Sep 2006 14:57:54 +0000
(14:57 +0000)
add support for text file from stdin
python/aubio/txtfile.py
patch
|
blob
|
history
diff --git
a/python/aubio/txtfile.py
b/python/aubio/txtfile.py
index fabafa550d22082e654e6a64fb108bb5e981a3c6..2ce9f264317317398c25e0563e9f4ed2e3abb6cb 100644
(file)
--- a/
python/aubio/txtfile.py
+++ b/
python/aubio/txtfile.py
@@
-22,7
+22,11
@@
__LICENSE__ = """\
def read_datafile(filename,depth=-1):
"""read list data from a text file (columns of float)"""
- fres = open(filename,'ro')
+ if filename == '--' or filename == '-':
+ import sys
+ fres = sys.stdin
+ else:
+ fres = open(filename,'ro')
l = []
while 1:
tmp = fres.readline()