#!/usr/bin/env python import sys cat, name = sys.argv[1], sys.argv[2] print '' print '' print '' print '' print ' %s' % name f = open('%s.txt' % cat) for i, line in enumerate(f): line = line.rstrip('\r\n') num, ra, dec = line.split(' ') ra = round(float(ra) - 180, 5) print ' ' print ' %s %s' % (cat, num) print ' ' print ' %s,%s' % (ra, dec) print ' ' print ' ' f.close() print '' print '' print ''