History

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

Paul Brossier committed 10 years ago

Commit 1c6fe641 parent 333eec11 file · +3 −3Browse files

Showing the changes to python/scripts/aubiocut (1 of 1 file). Show all

Unified · Split

python/scripts/aubiocut+3−3
@@ -134,7 +134,7 @@ def parse_args(): · 133 unmodified lines
134 if len(args) == 1:134 if len(args) == 1:
135 options.source_file = args[0]135 options.source_file = args[0]
136 else:136 else:
137 print "no file name given\n", usage137 print ("no file name given\n", usage)
138 sys.exit(1)138 sys.exit(1)
139 return options, args139 return options, args
140 140
@@ -171,7 +171,7 @@ if __name__ == '__main__': · 30 unmodified lines
171 samples, read = s()171 samples, read = s()
172 if o(samples):172 if o(samples):
173 timestamps.append (o.get_last())173 timestamps.append (o.get_last())
174 if options.verbose: print "%.4f" % o.get_last_s()174 if options.verbose: print ("%.4f" % o.get_last_s())
175 total_frames += read175 total_frames += read
176 if read < hopsize: break176 if read < hopsize: break
177 del s177 del s
@@ -188,7 +188,7 @@ if __name__ == '__main__': · 10 unmodified lines
188 from aubio.slicing import slice_source_at_stamps188 from aubio.slicing import slice_source_at_stamps
189 timestamps_end = None189 timestamps_end = None
190 if options.cut_until_nslices and options.cut_until_nsamples:190 if options.cut_until_nslices and options.cut_until_nsamples:
191 print "warning: using cut_until_nslices, but cut_until_nsamples is set"191 print ("warning: using cut_until_nslices, but cut_until_nsamples is set")
192 if options.cut_until_nsamples:192 if options.cut_until_nsamples:
193 timestamps_end = [t + options.cut_until_nsamples for t in timestamps[1:]]193 timestamps_end = [t + options.cut_until_nsamples for t in timestamps[1:]]
194 timestamps_end += [ 1e120 ]194 timestamps_end += [ 1e120 ]

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t