def slide_in(clip, duration, side):
 (w, h) = clip.size
 pos_dict = {'left': (lambda t: (min(0, (w * ((t / duration) - 1))), 'center')), 'right': (lambda t: (max(0, (w * (1 - (t / duration)))), 'center')), 'top': (lambda t: ('center', min(0, (h * ((t / duration) - 1))))), 'bottom': (lambda t: ('center', max(0, (h * (1 - (t / duration))))))}
 return clip.set_pos(pos_dict[side])

def slide_in ( clip , duration , side ) : ( w , h ) = clip . size pos_dict = { 'left' : ( lambda t : ( min ( 0 , ( w * ( ( t / duration ) - 1 ) ) ) , 'center' ) ) , 'right' : ( lambda t : ( max ( 0 , ( w * ( 1 - ( t / duration ) ) ) ) , 'center' ) ) , 'top' : ( lambda t : ( 'center' , min ( 0 , ( h * ( ( t / duration ) - 1 ) ) ) ) ) , 'bottom' : ( lambda t : ( 'center' , max ( 0 , ( h * ( 1 - ( t / duration ) ) ) ) ) ) } return clip . set_pos ( pos_dict [ side ] )
makes the clip arrive from one side of the screen .