관리-도구
편집 파일: commandline.cpython-39.pyc
a `8a� � @ sh d dl Z d dlZd dlZd dlmZ ddlmZ ddlmZm Z m Z ddlmZ dZ G d d � d e�ZdS )� N)�deepcopy� )� Configuration)�BooleanSetting� ChoiceSetting�ListSetting� )�Source)�CommandLineSourcec sx e Zd Zd� fdd� Zdd� Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� Zdd� Zdd� Z ddd�Z� ZS )r Nc s� t t| ��� |d u r(tjdd � | _n6t|t�r@t� |�| _nt|t tf�rV|| _ntd��|| _ |pji | _|pti | _|p~d| _d S )Nr z-arguments must be a string or list of strings� )�superr �__init__�sys�argv� arguments� isinstance� basestring�shlex�split�list�tuple� TypeError�version�options�parser_options� positional)�selfr r r r r �� __class__r �S/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/source/commandline.pyr s zCommandLineSource.__init__c C sT |j | jv r,d| j|j v r,| j|j d S g }d|j �� �dd� }|�|� |S )N�flagsz--%s�_�-)�namer �lower�replace�append)r �settingr �flagr r r � get_flags, s zCommandLineSource.get_flagsc C s. t |t�r|jrdS dS t |t�r&dS dS d S )N�store_false� store_truer&