Skip to content

Commit

Permalink
Closes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
klbostee committed Apr 10, 2009
1 parent aa79c17 commit d0b44c7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dumbo/core.py
Expand Up @@ -472,7 +472,8 @@ def run(mapper,
if os.environ.has_key('stream_map_input') and \
os.environ['stream_map_input'].lower() == 'typedbytes':
print >> sys.stderr, "INFO: inputting typed bytes"
import typedbytes
try: import ctypedbytes as typedbytes
except ImportError: import typedbytes
inputs = typedbytes.PairedInput(sys.stdin).reads()
else:
inputs = loadcode(line[:-1] for line in sys.stdin)
Expand Down Expand Up @@ -520,7 +521,8 @@ def run(mapper,
if os.environ.has_key('stream_map_output') and \
os.environ['stream_map_output'].lower() == 'typedbytes':
print >> sys.stderr, "INFO: outputting typed bytes"
import typedbytes
try: import ctypedbytes as typedbytes
except ImportError: import typedbytes
typedbytes.PairedOutput(sys.stdout).writes(outputs)
else:
for output in dumpcode(outputs):
Expand All @@ -529,7 +531,8 @@ def run(mapper,
if os.environ.has_key('stream_reduce_input') and \
os.environ['stream_reduce_input'].lower() == 'typedbytes':
print >> sys.stderr, "INFO: inputting typed bytes"
import typedbytes
try: import ctypedbytes as typedbytes
except ImportError: import typedbytes
inputs = typedbytes.PairedInput(sys.stdin).reads()
else:
inputs = loadcode(line[:-1] for line in sys.stdin)
Expand All @@ -546,7 +549,8 @@ def run(mapper,
if os.environ.has_key('stream_reduce_output') and \
os.environ['stream_reduce_output'].lower() == 'typedbytes':
print >> sys.stderr, "INFO: outputting typed bytes"
import typedbytes
try: import ctypedbytes as typedbytes
except ImportError: import typedbytes
typedbytes.PairedOutput(sys.stdout).writes(outputs)
else:
for output in dumpcode(outputs):
Expand Down

0 comments on commit d0b44c7

Please sign in to comment.