fhcrc / seqmagick

An imagemagick-like frontend to Biopython SeqIO
http://seqmagick.readthedocs.org
GNU General Public License v3.0
112 stars 22 forks source link

Commands writing to stdout should exit on SIGPIPE #17

Closed cmccoy closed 13 years ago

cmccoy commented 13 years ago

because this is reasonable thing to do:

(bio)rhino4 orig_trees  ᐅ seqmagick extract-ids gag_query_aln.sto | head -10
C.KE.91.KNH1268.AY945738
C.TZ.02.CO3305.AY734558
C.TZ.02.CO6721.AY734560
C.TZ.01.A207.AY253307
C.TZ.01.A246.AY253308
C.TZ.02.CO178.AY734556
C.TZ.02.CO328.AY734551
C.TZ.01.A388.AY253317
C.TZ.01.BD22_11.AY253321
C.TZ.97.97TZ05.AF361875
Traceback (most recent call last):
  File "/mnt/orca/home/cpb_home/cmccoy/.virtualenvs/bio/bin/seqmagick", line 7, in <module>
    execfile(__file__)
  File "/mnt/orca/home/cpb_home/cmccoy/development/seqmagick/scripts/seqmagick", line 7, in <module>
    sys.exit(cli.main(sys.argv[1:]))
  File "/mnt/orca/home/cpb_home/cmccoy/development/seqmagick/seqmagick/scripts/cli.py", line 29, in main
    return action(arguments)
  File "/mnt/orca/home/cpb_home/cmccoy/development/seqmagick/seqmagick/subcommands/extract_ids.py", line 35, in action
    print >> arguments.output_file, i
IOError: [Errno 32] Broken pipe