%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/distutils/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/distutils/spawn.pyc


Pac@sdZdZddlZddlZddlmZmZddlmZddl	m
Z
dddd	Zd
ZddddZ
ddddZejd
krddl	mZdadanddddZddZdS(sdistutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
s$Id$iN(tDistutilsPlatformErrortDistutilsExecError(tDEBUG(tlogiicCst|}tjdkr1t||d|nZtjdkrVt||d|n5tjdkr{t||d|ntdtjdS(sRun another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    tposixtdry_runtnttos2s1don't know how to spawn programs on platform '%s'N(tlisttostnamet_spawn_posixt	_spawn_ntt
_spawn_os2R(tcmdtsearch_pathtverboseR((s+/usr/local/lib/python2.7/distutils/spawn.pytspawnscCs>x7t|D])\}}d|kr
d|||<q
q
W|S(sQuote command-line arguments for DOS/Windows conventions.

    Just wraps every argument which contains blanks in double quotes, and
    returns a new argument list.
    t s"%s"(t	enumerate(targstitarg((s+/usr/local/lib/python2.7/distutils/spawn.pyt_nt_quote_args/scCs|d}t|}|r1t|p+|}ntjdj|g|d|sytjtj||}Wn9tk
r}t	s|}nt
d||dfnX|dkrt	s|}nt
d||fqndS(NiRiscommand %r failed: %sis%command %r failed with exit status %d(Rtfind_executableRtinfotjoinR	tspawnvtP_WAITtOSErrorRR(RRRRt
executabletrctexc((s+/usr/local/lib/python2.7/distutils/spawn.pyR?s$
!		cCs|d}|r%t|p|}ntjdj|g|d|sytjtj||}Wn9tk
r}ts|}nt	d||dfnX|dkrts|}ntj
d||ft	d||fqndS(NiRiscommand %r failed: %sis%command %r failed with exit status %d(RRRRR	RRRRRtdebug(RRRRRRR ((s+/usr/local/lib/python2.7/distutils/spawn.pyR
Ws$
!		tdarwin(t	sysconfigcCs_tjdj||r dS|d}|r9tjp?tj}d}tjdkrGt	dkrt
jdpuda	t	rgt	jdD]}t
|^qaqnt	rGtjjdt	}tg|jdD]}t
|^qkrd|t	f}	t|	nttjd|}|r8tjp>tj}qGntj}
|
dkry0|dkr~|||n||||WnLtk
r}ts|}ntjjd||jftjd	nXts|}ntjjd
|tjd	nJxGytj|
d\}
}Wn]tk
r}
ddl}|
j|jkrfqntsu|}ntd||
dfnXtj |rts|}ntd
|tj!|fqtj"|r tj#|}|dkrdSts
|}ntd||fqtj$|r5qqtsD|}ntd||fqWdS(NRiR"tMACOSX_DEPLOYMENT_TARGETtt.sF$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configuresunable to execute %r: %s
is(unable to execute %r for unknown reasonsiscommand %r failed: %ss"command %r terminated by signal %ds%command %r failed with exit status %ds1unknown error executing %r: termination status %d(%RRRR	texecvptexecvtNonetsystplatformt_cfg_targetR#tget_config_vartsplittintt_cfg_target_splittenvirontgetRtdicttexecvpetexecvetforkRRtstderrtwritetstrerrort_exittwaitpidterrnotEINTRRtWIFSIGNALEDtWTERMSIGt	WIFEXITEDtWEXITSTATUSt
WIFSTOPPED(RRRRRtexec_fntenvtxt
cur_targettmy_msgtpidtetstatusR R<texit_status((s+/usr/local/lib/python2.7/distutils/spawn.pyRts
..
							cCs|dkr'tjjdtj}n|jtj}tjj|\}}t	j
dksotjdkr|dkr|d}ntjj|sx9|D]1}tjj
||}tjj|r|SqWdS|SdS(sTries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    tPATHtwin32Rs.exeN(R)R	R1R2tdefpathR.tpathseptpathtsplitextR*R+R
tisfileR(RRPtpathstbasetexttptf((s+/usr/local/lib/python2.7/distutils/spawn.pyRs*

(t__doc__t__revision__R*R	tdistutils.errorsRRtdistutils.debugRt	distutilsRRRRR
R+R#R)R,R0RR(((s+/usr/local/lib/python2.7/distutils/spawn.pyt<module>s 		X

Zerion Mini Shell 1.0