python2/3 list/map

This commit is contained in:
j 2016-08-31 00:30:45 +02:00
parent 3af06a1e1d
commit d6ef829998
3 changed files with 5 additions and 5 deletions

View file

@ -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()

View file

@ -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]

View file

@ -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)