# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
+from __future__ import print_function
import sys
import argparse
args = parser.parse_args()
if not args.out:
- print >> sys.stdout, "No output file was specified to write the model to."
- print >> sys.stdout, "Please specify a filename using the --out option."
+ print("No output file was specified to write the model to.", file=sys.stdout)
+ print("Please specify a filename using the --out option.", file=sys.stdout)
return
if args.SUMMARY_FILE is sys.stdin:
- print >> sys.stderr, "reading from STDIN..."
+ print("reading from STDIN...", file=sys.stderr)
(conversations,
interval,
dns_mode=args.dns_mode)
model = traffic.TrafficModel()
- print >> sys.stderr, "learning model"
+ print("learning model", sys.stderr)
if args.dns_mode == 'count':
model.learn(conversations, dns_counts)
else: