shithub: aubio

Download patch

ref: 1c6fe64f5d251e305db3a7bb2f710a20cb00d8d2
parent: 333eec1d3baef761a7a24c8bcaf650e2c0cabcf6
author: Paul Brossier <piem@piem.org>
date: Mon Apr 18 19:23:58 EDT 2016

python/scripts/aubiocut: prepare for python3 (see #33)

--- a/python/scripts/aubiocut
+++ b/python/scripts/aubiocut
@@ -134,7 +134,7 @@
         if len(args) == 1:
             options.source_file = args[0]
         else:
-            print "no file name given\n", usage
+            print ("no file name given\n", usage)
             sys.exit(1)
     return options, args
 
@@ -171,7 +171,7 @@
         samples, read = s()
         if o(samples):
             timestamps.append (o.get_last())
-            if options.verbose: print "%.4f" % o.get_last_s()
+            if options.verbose: print ("%.4f" % o.get_last_s())
         total_frames += read
         if read < hopsize: break
     del s
@@ -188,7 +188,7 @@
         from aubio.slicing import slice_source_at_stamps
         timestamps_end = None
         if options.cut_until_nslices and options.cut_until_nsamples:
-            print "warning: using cut_until_nslices, but cut_until_nsamples is set"
+            print ("warning: using cut_until_nslices, but cut_until_nsamples is set")
         if options.cut_until_nsamples:
             timestamps_end = [t + options.cut_until_nsamples for t in timestamps[1:]]
             timestamps_end += [ 1e120 ]