File: //opt/alt/python38/lib/python3.8/site-packages/pycparser/__pycache__/__init__.cpython-38.pyc
U
ӗ_W � @ sB d ddgZ dZddlmZmZ ddlmZ dd
d�Zddd�Zd
S )Zc_lexer�c_parser�c_astz2.14� )�Popen�PIPE� )�CParser�cpp� c
C s� |g}t |t�r||7 }n|dkr,||g7 }|| g7 }zt|tdd�}|�� d }W n2 tk
r� } ztdd| ��W 5 d}~X Y nX |S )ae Preprocess a file using cpp.
filename:
Name of the file you want to preprocess.
cpp_path:
cpp_args:
Refer to the documentation of parse_file for the meaning of these
arguments.
When successful, returns the preprocessed file's contents.
Errors from cpp will be printed out.
r T)�stdoutZuniversal_newlinesr zAUnable to invoke 'cpp'. Make sure its path was passed correctly
zOriginal error: %sN)�
isinstance�listr r Zcommunicate�OSError�RuntimeError)�filename�cpp_path�cpp_args� path_list�pipe�text�e� r �../pycparser/__init__.py�preprocess_file s"