Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.distlib.scripts Namespace Reference

Data Structures

class  ScriptMaker
 

Functions

 enquote_executable (executable)
 

Variables

 logger = logging.getLogger(__name__)
 
str _DEFAULT_MANIFEST
 
 FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
 
str SCRIPT_TEMPLATE
 
 _enquote_executable = enquote_executable
 

Function Documentation

◆ enquote_executable()

enquote_executable (   executable)

Definition at line 53 of file scripts.py.

53def enquote_executable(executable):
54 if ' ' in executable:
55 # make sure we quote only the executable in case of env
56 # for example /usr/bin/env "/dir with spaces/bin/jython"
57 # instead of "/usr/bin/env /dir with spaces/bin/jython"
58 # otherwise whole
59 if executable.startswith('/usr/bin/env '):
60 env, _executable = executable.split(' ', 1)
61 if ' ' in _executable and not _executable.startswith('"'):
62 executable = '%s "%s"' % (env, _executable)
63 else:
64 if not executable.startswith('"'):
65 executable = '"%s"' % executable
66 return executable
67
68# Keep the old name around (for now), as there is at least one project using it!
for i

References i.

Referenced by ScriptMaker._get_shebang().

Here is the caller graph for this function:

Variable Documentation

◆ _DEFAULT_MANIFEST

str _DEFAULT_MANIFEST
protected
Initial value:
1= '''
2<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
4 <assemblyIdentity version="1.0.0.0"
5 processorArchitecture="X86"
6 name="%s"
7 type="win32"/>
8
9 <!-- Identify the application security requirements. -->
10 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
11 <security>
12 <requestedPrivileges>
13 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
14 </requestedPrivileges>
15 </security>
16 </trustInfo>
17</assembly>'''.strip()

Definition at line 23 of file scripts.py.

◆ _enquote_executable

_enquote_executable = enquote_executable
protected

Definition at line 69 of file scripts.py.

◆ FIRST_LINE_RE

FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')

Definition at line 42 of file scripts.py.

◆ logger

logger = logging.getLogger(__name__)

Definition at line 21 of file scripts.py.

◆ SCRIPT_TEMPLATE

str SCRIPT_TEMPLATE
Initial value:
1= r'''# -*- coding: utf-8 -*-
2import re
3import sys
4from %(module)s import %(import_name)s
5if __name__ == '__main__':
6 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
7 sys.exit(%(func)s())
8'''

Definition at line 43 of file scripts.py.