Sindbad~EG File Manager
o
�/�a�a � @ s@ d Z dZdZdZddlZddlZddlZddlT ddlm Z m
Z
mZ ddlm
Z
zdd lmZ W n eyM Z ze�e� dd
lmZ W Y dZ[ndZ[ww G dd� dej�Ze�eee edeefeeef�Ze�ej � ej!d
d�\Z"Z#Z$Z%Z&Z'e&dkr�e �(� s�e�)de � eZ%n
e �*� s�e�)de � eZ%e%ek�r�e&dk�r�e�+d� zddl,T ddl-m.Z. W n ey� e�)d� e/�0d� Y nw dZ1dZ2e3e/j4�Z1e'du r�e5�6ddd�Z'e'�7� dkr�e8e9�:� �Z'e�de' � e'�7� dk�rCdZze'�;d�\Z<Z=d�>e<eg�Z'W n e?�y e'Z<d�>e'eg�Z'Y nw e�de' � e@d�ZAde< ZBe�deB � eA�CeBeDjE�ZFeF�rAe1�GeA� ndZ'e'dk�rNe�d � n)e�d!e' � eH�IeHe'�� e'eD_:ze:�Je:jKe:�Le'�� W n e:jM�yv Y nw e.� Z2e2�N� e1�Oe2� ze�d"� e1�P� W n
eQ�y� Y nw e/�0d� dS e �Re&�\Z3ZSeeSd# �ZTe�+d$� e3e/j4�Z1eT�Ud�ZVeV�N� ze�d"� e1�W� W dS eQ�y� e/�0d� Y dS w zdd%lXmXZX W n e�y� e�)d&� e/�0d� Y nw e� ZYzeY�Z� W n eQ�y e�)d'� Y nw e�[d(� e�[d)� dS )*z6.0zFax Address Bookzhp-fabz$A simple fax address book for HPLIP.� N)�*)�utils�tui�module)�input)�
import_module)�dyn_import_modc @ s e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zd:dd�Zd:dd�Zdd � ZeZd!d"� Zd#d$� Zd%d&� ZeZd'd(� ZeZd)d*� ZeZd+d,� ZeZd-d.� Zd/d0� ZeZd1d2� Z e Z!d3d4� Z"e"Z#d5d6� Z$d7d8� Z%d9S );�Consolec C s, t j�| � d| _t�� | _t�d�| _ d S )NzBType 'help' for a list of commands. Type 'exit' or 'quit' to quit.z hp-fab > )
�cmd�Cmd�__init__�intro�fax�FaxAddressBook�db�log�bold�prompt��self� r �/usr/share/hplip/fab.pyr 6 s
zConsole.__init__c C s t | j� dS )z/Print a list of commands that have been enteredN)�print�_hist�r �argsr r r �do_hist= s zConsole.do_histc C � dS �zExits from the console���r r r r r �do_exitA � zConsole.do_exitc C r r r r r r r �do_quitE r! zConsole.do_quitc C s
| � |�S )z$Exit on system end of file character)r r r r r �do_EOFJ s
zConsole.do_EOFc C s t j�| |� dS )z�Get help on commands
'help' or '?' with no arguments prints a list of commands for which help is available
'help <command>' or '? <command>' gives help on <command>
N)r
r �do_helpr r r r r$ N s zConsole.do_helpc C s, t j�| � g | _i | _i | _| �d� dS )z�Initialization before prompting user for commands.
Despite the claims in the Cmd documentaion, Cmd.preloop() is not a stub.
� N)r
r �preloopr �_locals�_globals�do_listr r r r r&