
    ~Wh                        d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	  ej
                    Zej        e_         e	d          d             Z e	d          d	             Z e	d
          d             ZddZd Zd ZdS )zUtilities related to disk I/O.    N)logging)keras_logging)keras_exportz&keras.utils.enable_interactive_loggingc                      dt           _        dS )zTurn on interactive logging.

    When interactive logging is enabled, Keras displays logs via stdout.
    This provides the best experience when using Keras in an interactive
    environment such as a shell or a notebook.
    TNINTERACTIVE_LOGGINGenable     Z/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/keras/utils/io_utils.pyenable_interactive_loggingr   !   s     "&r   z'keras.utils.disable_interactive_loggingc                      dt           _        dS )zTurn off interactive logging.

    When interactive logging is disabled, Keras sends logs to `absl.logging`.
    This is the best option when using Keras in a non-interactive
    way, such as running a training or inference job on a server.
    FNr   r
   r   r   disable_interactive_loggingr   ,   s     "'r   z*keras.utils.is_interactive_logging_enabledc                  B    t          t          dt          j                  S )a8  Check if interactive logging is enabled.

    To switch between writing logs to stdout and `absl.logging`, you may use
    `keras.utils.enable_interactive_logging()` and
    `keras.utils.disable_interactie_logging()`.

    Returns:
      Boolean (True if interactive logging is enabled and False otherwise).
    r	   )getattrr   r   INTERACTIVE_LOGGING_DEFAULTr
   r   r   is_interactive_logging_enabledr   7   s      X}'P  r   Tc                    t                      rd|r#t          j                            | dz              nt          j                            |            t          j                                         dS t          j        |            dS )z,Print the message to absl logging or stdout.
N)r   sysstdoutwriteflushr   info)message
line_breaks     r   	print_msgr   I   s{    %''  	&JWt^,,,,JW%%%
Wr   c                 b    t          | t          j                  rt          j        |           S | S )a  Convert `PathLike` objects to their string representation.

    If given a non-string typed path object, converts it to its string
    representation.

    If the object passed to `path` is not among the above, then it is
    returned unchanged. This allows e.g. passthrough of file objects
    through this function.

    Args:
      path: `PathLike` object that represents a path

    Returns:
      A string representation of the path argument, if Python support exists.
    )
isinstanceosPathLikefspath)paths    r   path_to_stringr$   U   s+      $$$ yKr   c                    t          d|  d                                                                          }|dvr7t          d                                                                          }|dv7|dk    rdS t          d           dS )	zProduces a prompt asking about overwriting a file.

    Args:
        filepath: the path to the file to be overwritten.

    Returns:
        True if we can proceed with overwrite, False otherwise.
    z
[WARNING] z" already exists - overwrite? [y/n])ynz&Enter "y" (overwrite) or "n" (cancel).r'   Fz'[TIP] Next time specify overwrite=True!T)inputstriplowerr   )filepath	overwrites     r   ask_to_proceed_with_overwriter-   j   s     	G8GGGHH		 
 :
%
%:;;AACCIIKK 	 :
%
% Cu78884r   )T)__doc__r    r   	threadingabslr   keras.utilsr    tensorflow.python.util.tf_exportr   localr   r   r	   r   r   r   r   r$   r-   r
   r   r   <module>r4      s0    % $ 				 



           % % % % % % : 9 9 9 9 9%io'' *F   677& & 87& 788' ' 98' :;;  <;"	 	 	 	  *    r   