B
    u9a                 @   sN   d dl Z d dlZd dlZd dlZdd Zdd Zdd Zdd
dZdd Z	dS )    Nc             C   s   t | d }t|d\} }t| d\}} t|d\}}g }|rN|d|  |r`|d|  | rr|d|   |r|d|  |sdS |d d	 }d
|S )Ng     @@i  <   z%s hourz%s minz%s secz%s msz0 ms    )mathZceildivmodappendjoin)ZsecondsmsZminutesZhoursparts r   /usr/lib/python3.7/utils.pyformat_duration   s"    r   c             C   sB   | sd S x4t | D ](\}}tj|\}}|dkr|| |< qW d S )Nz.py)	enumerateospathsplitext)namesidxnamebasenameZextr   r   r   removepy   s    r   c             C   s$   | dkrd| |f S d| |f S d S )N   z%d %sz%d %ssr   )nZwordr   r   r   count&   s    r   F      c             C   s:   d| }t tjddd t| D |||d|d dS )zPrint the elements of iterable x to stdout.

    Optional arg width (default 70) is the maximum line length.
    Optional arg indent (default 4) is the number of blanks with which to
    begin each line.
    r   c             s   s   | ]}t |V  qd S )N)str).0Zeltr   r   r   	<genexpr>7   s    zprintlist.<locals>.<genexpr>)initial_indentsubsequent_indent)fileN)printtextwrapfillr   sorted)xwidthindentr!   Zblanksr   r   r   	printlist-   s    r)   c             C   s   t d|  tjdd d S )NzWarning -- T)r!   flush)r"   sysstderr)msgr   r   r   print_warning<   s    r.   )r   r   N)
r   Zos.pathr   r+   r#   r   r   r   r)   r.   r   r   r   r   <module>   s   	
