File: //usr/lib/python3.5/__pycache__/py_compile.cpython-35.pyc
Fa
@ s d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d d g Z Gd d d e
Z d d d d d d Z d d
d Z
e d k r e j e
d S)
zqRoutine to "compile" a .py file to a .pyc file.
This module has intimate knowledge of the format of .pyc files.
NcompilemainPyCompileErrorc @ s1 e Z d Z d Z d d d Z d d Z d S)r a Exception raised when an error occurs while attempting to
compile the file.
To raise this exception, use
raise PyCompileError(exc_type,exc_value,file[,msg])
where
exc_type: exception type to be used in error message
type name can be accesses as class variable
'exc_type_name'
exc_value: exception value to be used in error message
can be accesses as class variable 'exc_value'
file: name of file being compiled to be used in error message
can be accesses as class variable 'file'
msg: string message to be written as error message
If no value is given, a default exception message will be
given, consistent with 'standard' py_compile output.
message (or default) can be accesses as class variable
'msg'
c C s | j } | t k rI d j t j | | } | j d d | } n d | | f } t j | | pk | | | | | | _ | | _ | | _
| p | | _ d S)Nr zFile "<string>"z File "%s"z
Sorry: %s: %s)__name__SyntaxErrorjoin tracebackformat_exception_onlyreplace Exception__init__
exc_type_name exc_valuefilemsg)selfexc_typer r r r tbtexterrmsg r /usr/lib/python3.5/py_compile.pyr
- s zPyCompileError.__init__c C s | j S)N)r )r r r r __str__= s zPyCompileError.__str__N)r
__module____qualname____doc__r
r r r r r r s F c C s | d k r] | d k rK | d k r* | n d } t j j | d | } n t j j | } t j j | r d } t | j | n@ t j j | r t j j | r d } t | j | t j
j d | } | j | } y"