ó
N'—^c           @  sS  d  d l  m Z y d  d l TWn e k
 r; d  d l Tn Xd  d l m Z m Z d  d l Z d e	 f d „  ƒ  YZ
 e d k rOe j d s§ e d	 ƒ e j d ƒ n  e j d Z e ƒ  Z e j e ƒ e e j ƒ d
 k r e d ƒ g  Z x= e j d D] Z e j e j e ƒ ƒ qý Wn e j e ƒ Z e
 e e ƒ j ƒ  e j ƒ  n  d S(   iÿÿÿÿ(   t   print_function(   t   *(   t   Imaget   ImageTkNt   UIc           B  s   e  Z d  „  Z d „  Z RS(   c      	   C  sâ   t  | t ƒ r, | d |  _ |  j d } n	 | |  _ | j d k r_ t j | d d ƒ|  _ n t j | ƒ |  _ t j	 |  | d |  j d d d	 d ƒ|  j
 ƒ  y | j d
 } Wn t k
 rÊ d } n X|  j | |  j ƒ d  S(   Ni   i    t   1t
   foregroundt   whitet   imaget   bgt   blackt   bdt   durationid   (   t
   isinstancet   listt   imt   modeR   t   BitmapImageR   t
   PhotoImaget   Labelt   __init__t   updatet   infot   KeyErrort   aftert   next(   t   selft   masterR   R   (    (    sB   /tmp/pip-unpacked-wheel-ivxKtu/Pillow-3.4.2.data/scripts/player.pyR      s    	%

c         C  sê   t  |  j t ƒ rU y+ |  j d } |  j d =|  j j | ƒ Wqž t k
 rQ d  SXnI y4 |  j } | j | j ƒ  d ƒ |  j j | ƒ Wn t k
 r d  SXy | j	 d } Wn t
 k
 rÈ d } n X|  j | |  j ƒ |  j ƒ  d  S(   Ni    i   R   id   (   R   R   R   R   t   pastet
   IndexErrort   seekt   tellt   EOFErrorR   R   R   R   t   update_idletasks(   R   R   R   (    (    sB   /tmp/pip-unpacked-wheel-ivxKtu/Pillow-3.4.2.data/scripts/player.pyR   /   s&    
	
(   t   __name__t
   __module__R   R   (    (    (    sB   /tmp/pip-unpacked-wheel-ivxKtu/Pillow-3.4.2.data/scripts/player.pyR      s   	t   __main__i   s%   Syntax: python player.py imagefile(s)i   s
   loading...(   t
   __future__R    t   tkintert   ImportErrort   Tkintert   PILR   R   t   sysR   R   R"   t   argvt   printt   exitt   filenamet   Tkt   roott   titlet   lenR   t   appendt   opent   packt   mainloop(    (    (    sB   /tmp/pip-unpacked-wheel-ivxKtu/Pillow-3.4.2.data/scripts/player.pyt   <module>   s,   :
	
