관리-도구
편집 파일: search.cpython-33.pyc
� 7�Re� c @ s d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z Gd d � d e � Z d d � Z d d d d � Z d d � Z d d � Z d S( i N( u Commandu SUCCESS( u get_terminal_size( u logger( u xmlrpclibu reduceu cmp( u CommandError( u NO_MATCHES_FOUND( u pkg_resources( u StrictVersionu LooseVersionc sV | Ee Z d Z d Z d Z d Z d Z � f d d � Z d d � Z d d � Z � S( u SearchCommandu@ Search for PyPI packages whose name or summary contains <query>.u searchu %prog [options] <query>u Search PyPI for packages.c s[ t t | � j | | � | j j d d d d d d d d d �| j j d | j � d S( Nu --indexu destu indexu metavaru URLu defaultu https://pypi.python.org/pypiu helpu3 Base URL of Python Package Index (default %default)i ( u superu SearchCommandu __init__u cmd_optsu add_optionu parseru insert_option_group( u selfu argsu kw( u __class__( u, /tmp/pip-zej_zi-build/pip/commands/search.pyu __init__ s u SearchCommand.__init__c C s� | s t d � � n | } | j } | j | | � } t | � } d } t j j � rg t � d } n t | d | �| r� t St S( Nu) Missing required argument (search query).i u terminal_width( u CommandErroru indexu searchu transform_hitsu Noneu sysu stdoutu isattyu get_terminal_sizeu print_resultsu SUCCESSu NO_MATCHES_FOUND( u selfu optionsu argsu queryu index_urlu pypi_hitsu hitsu terminal_width( ( u, /tmp/pip-zej_zi-build/pip/commands/search.pyu run"