Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Variables
pip._vendor.distlib.scripts Namespace Reference

Classes

class  ScriptMaker
 

Variables

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

Variable Documentation

string pip._vendor.distlib.scripts._DEFAULT_MANIFEST
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>'''
tuple pip._vendor.distlib.scripts.FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$')
tuple pip._vendor.distlib.scripts.logger = logging.getLogger(__name__)
string pip._vendor.distlib.scripts.SCRIPT_TEMPLATE
Initial value:
1 = '''# -*- coding: utf-8 -*-
2 if __name__ == '__main__':
3  import sys, re
4 
5  def _resolve(module, func):
6  __import__(module)
7  mod = sys.modules[module]
8  parts = func.split('.')
9  result = getattr(mod, parts.pop(0))
10  for p in parts:
11  result = getattr(result, p)
12  return result
13 
14  try:
15  sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
16 
17  func = _resolve('%(module)s', '%(func)s')
18  rc = func() # None interpreted as 0
19  except Exception as e: # only supporting Python >= 2.6
20  sys.stderr.write('%%s\\n' %% e)
21  rc = 1
22  sys.exit(rc)
23 '''

Copyright 2014 Google Inc. All rights reserved.