From d6ef8299981f8154129670dc3baf6b2713a55f74 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 31 Aug 2016 00:30:45 +0200 Subject: [PATCH] python2/3 list/map --- bin/oxtimelines | 6 +++--- oxtimelines/ffmpeg.py | 2 +- oxtimelines/timeline.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/oxtimelines b/bin/oxtimelines index 1a437f1..3ef8f02 100755 --- a/bin/oxtimelines +++ b/bin/oxtimelines @@ -48,10 +48,10 @@ tiles without having to decode the video again. parser.print_help() sys.exit() - opts.videos = map(os.path.abspath, args) + opts.videos = list(map(os.path.abspath, args)) if opts.points: - opts.points = map(float, opts.points.split(',')) + opts.points = list(map(float, opts.points.split(','))) opts.modes = [m.strip() for m in opts.modes.split(',')] - opts.sizes = map(int, opts.sizes.split(',')) + opts.sizes = list(map(int, opts.sizes.split(','))) oxtimelines.Timelines(opts.videos, opts.tiles, opts.cuts, opts.points, opts.modes, opts.sizes, opts.wide, opts.log).render() diff --git a/oxtimelines/ffmpeg.py b/oxtimelines/ffmpeg.py index 2b3df7f..e972258 100644 --- a/oxtimelines/ffmpeg.py +++ b/oxtimelines/ffmpeg.py @@ -177,7 +177,7 @@ class AspectRatio(fractions.Fraction): def __new__(cls, numerator, denominator=None): if not denominator: - ratio = map(int, numerator.split(':')) + ratio = list(map(int, numerator.split(':'))) if len(ratio) == 1: ratio.append(1) numerator = ratio[0] diff --git a/oxtimelines/timeline.py b/oxtimelines/timeline.py index 5947a3d..bc84eca 100644 --- a/oxtimelines/timeline.py +++ b/oxtimelines/timeline.py @@ -321,7 +321,7 @@ class Timelines(): self.log and self.profiler.set_task('_render_audio()') channel_h = int(self.large_tile_h / 2) for self.frame_i, sample_v in enumerate(volume): - sample_v = map(math.sqrt, sample_v) + sample_v = list(map(math.sqrt, sample_v)) large_tile_x = self.frame_i % self.large_tile_w if large_tile_x == 0: large_tile_i = int(self.frame_i / self.large_tile_w)