Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_cmd.cpython-311.opt-2.pyc |
�
�Ke� � �< � d dl Z d dlZd dlZd dlZd dlZd dlmZ G d� de j � � Z G d� dej � � Z
d� Zd� Ze
d k rNd
ej v r
ed� � dS dej v r e� � � � � dS ej � � dS dS )
� N)�supportc �L � e Zd Z d� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� ZdS )�samplecmdclassc �$ � t d� � d S )NzHello from preloop��print��selfs �7/usr/local/apps/python3/lib/python3.11/test/test_cmd.py�preloopzsamplecmdclass.preloop� s � �
�"�#�#�#�#�#� c �$ � t d� � d S )NzHello from postloopr r s r �postloopzsamplecmdclass.postloop� s � �
�#�$�$�$�$�$r
c �$ � t d� � d S )Nz"This is the completedefault methodr )r
�ignoreds r �completedefaultzsamplecmdclass.completedefault� s � �
�2�3�3�3�3�3r
c �$ � t d� � d S )Nzcomplete commandr r s r �complete_commandzsamplecmdclass.complete_command� s � �
� �!�!�!�!�!r
c � � d S �N� )r
�ss r �do_shellzsamplecmdclass.do_shell� s � ��r
c � � |� � � }t |� � dk rt d� � d S d� |D � � }n # t $ r t d� � Y d S w xY wt |d |d z � � d S )N� z*** invalid number of argumentsc �, � g | ]}t |� � ��S r )�int)�.0�is r �
<listcomp>z)samplecmdclass.do_add.<locals>.<listcomp>� s � �#�#�#�A��Q���#�#�#r
z*** arguments should be numbersr � )�split�lenr �
ValueError)r
r �ls r �do_addzsamplecmdclass.do_add� s� � �
�G�G�I�I���q�6�6�Q�;�;��3�4�4�4��F� �#�#��#�#�#�A�A��� � � ��3�4�4�4��F�F� ���� �a��d�1�Q�4�i�����s �A �A$�#A$c �$ � t d� � d S )Nzhelp text for addr r s r �help_addzsamplecmdclass.help_add� s � �
�!�"�"�"��r
c �$ � t d� � d S )Nz�Try and be nice to people, avoid eating fat, read a good book every now and then, get some walking in, and try to live together in peace and harmony with people of all creeds and nations.r r s r �help_meaningzsamplecmdclass.help_meaning� s � �
� 2� 3� 3� 3� �r
c �$ � t d� � d S )Nz&Always look on the bright side of lifer r s r � help_lifezsamplecmdclass.help_life� s � �
�6�7�7�7��r
c � � dS �NTr )r
�args r �do_exitzsamplecmdclass.do_exit� s � ��tr
N)
�__name__�
__module__�__qualname__r r r r r r&