Ignore:
Timestamp:
May 16, 2016, 3:16:00 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
dc654f8
Parents:
416ddd1
Message:

python/demos: python3 and double precision compatibility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/demos/demo_slicing.py

    r416ddd1 r4120fbc  
    77if __name__ == '__main__':
    88    if len(sys.argv) < 3:
    9         print 'usage: %s <inputfile> <duration>' % sys.argv[0]
     9        print('usage: %s <inputfile> <duration>' % sys.argv[0])
    1010        sys.exit(1)
    1111    source_file = sys.argv[1]
     
    4545    total_duration = total_frames_written / float(samplerate)
    4646    slice_n += 1
    47     print 'created %(slice_n)s slices from %(source_base_name)s%(source_ext)s' % locals(),
    48     print ' (total duration %(total_duration).2fs)' % locals()
     47    outstr = 'created %(slice_n)s slices from %(source_base_name)s%(source_ext)s' % locals()
     48    outstr += ' (total duration %(total_duration).2fs)' % locals()
     49    print(outstr)
    4950    # close source and sink files
    5051    del f, g
Note: See TracChangeset for help on using the changeset viewer.