Sindbad~EG File Manager
�
(ٜg� � �x � d dl Z d dlZ d dlZ ej
� Zddeddfd�Zdd�Z y# exs e$ r Y �*w xY w)� N�time�returnc �� � dt j � v rJd| � �}t j |� }|t j
dfv rt
d� y
t
d| � d�� y
dt j � v r*d| � �}t j |� t
d| � d �� y
d
t j � v r*d| � �}t j |� t
d| � d �� y
t dt � �� �)z-Schedules a Shutdown after the Specified Time�windowzshutdown -s -t i[ z.A Shutdown Process has already been Scheduled!zYour System will Shutdown in z Seconds!�linuxzshutdown -h z Minutes!�darwinzshutdown -h -t �;Available on Windows, Mac and Linux only, can't Execute on N)�osname�lower�os�system�winerror�ERROR_SHUTDOWN_IN_PROGRESS�print�Warning)r �cont�
error_codes �7/usr/local/lib/python3.12/site-packages/pywhatkit/sc.py�shutdownr s� � � �6�<�<�>�!� ���'���Y�Y�t�_�
��(�=�=�t�D�D��B�C��1�$��y�A�B� �F�L�L�N� "��d�V�$��
� � �$��
�-�d�V�9�=�>� �V�\�\�^� #� ���'��
� � �$��
�-�d�V�9�=�>� �I�&��R�
�
� c � � dt j � v r@t j d� } | t j
k( rt
d� y
t
d� y
dt j � v r!t j d� t
d� y
dt j � v r!t j d� t
d� y
t d t � �� �)zCancels the Scheduled Shutdownr zshutdown /azGShutdown Cancellation process has been Aborted! [NO Shutdown Scheduled]zShutdown has been Cancelled!r zshutdown -cr zkillall shutdownr N)r
r r r
r �ERROR_NO_SHUTDOWN_IN_PROGRESSr r )r s r �cancel_shutdownr '