python2/3 list/map
This commit is contained in:
parent
3af06a1e1d
commit
d6ef829998
3 changed files with 5 additions and 5 deletions
|
@ -48,10 +48,10 @@ tiles without having to decode the video again.
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
opts.videos = map(os.path.abspath, args)
|
opts.videos = list(map(os.path.abspath, args))
|
||||||
if opts.points:
|
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.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()
|
oxtimelines.Timelines(opts.videos, opts.tiles, opts.cuts, opts.points, opts.modes, opts.sizes, opts.wide, opts.log).render()
|
||||||
|
|
|
@ -177,7 +177,7 @@ class AspectRatio(fractions.Fraction):
|
||||||
|
|
||||||
def __new__(cls, numerator, denominator=None):
|
def __new__(cls, numerator, denominator=None):
|
||||||
if not denominator:
|
if not denominator:
|
||||||
ratio = map(int, numerator.split(':'))
|
ratio = list(map(int, numerator.split(':')))
|
||||||
if len(ratio) == 1:
|
if len(ratio) == 1:
|
||||||
ratio.append(1)
|
ratio.append(1)
|
||||||
numerator = ratio[0]
|
numerator = ratio[0]
|
||||||
|
|
|
@ -321,7 +321,7 @@ class Timelines():
|
||||||
self.log and self.profiler.set_task('_render_audio()')
|
self.log and self.profiler.set_task('_render_audio()')
|
||||||
channel_h = int(self.large_tile_h / 2)
|
channel_h = int(self.large_tile_h / 2)
|
||||||
for self.frame_i, sample_v in enumerate(volume):
|
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
|
large_tile_x = self.frame_i % self.large_tile_w
|
||||||
if large_tile_x == 0:
|
if large_tile_x == 0:
|
||||||
large_tile_i = int(self.frame_i / self.large_tile_w)
|
large_tile_i = int(self.frame_i / self.large_tile_w)
|
||||||
|
|
Loading…
Reference in a new issue