î
•’5QÀ  ã               @   s>   d  d „  Z  e d ƒ Z e d e  e ƒ d ƒ e d ƒ d S)c             C   sË   y t  |  d d d ƒ} Wn t d |  d ƒ Yn” Xd } d } | j ƒ  } xj | d k r¸ | d d
 … j ƒ  } x5 | D]- } t | ƒ | k rx t | ƒ } | } qx qx W| j ƒ  } qO W| j ƒ  | Sd S)zX
    plusLong(str source) --> str
    Retourne le plus long mot du fichier <source>
    ÚrÚencodingzutf-8z
Le fichierzn'existe pas.é    Ú Né   éÿÿÿÿ)ÚopenÚprintÚreadlineÚsplitÚlenÚclose)ÚsourceZfichierZmaxLongZresultatZligneZmotsÚm© r   úl/Users/jerome 1/Documents/College/Informatique/OC/1_Site/1_Programmation/7_Fichiers/Exercices/Ex7_6/ex7_6.pyÚplusLong   s     
r   u&   Entrez le nom du fichier Ã  analyser: z$Le mot le plus long du fichier est 'z'.z/Appuyez sur une touche pour fermer la fenetre !N)r   ÚinputÚfileNamer   r   r   r   r   Ú<module>   s   