parameters: (framework=None)
docstring: Please keep this file compatible with python2 in order to check user python version.
  
          This function checks that Inference Engine Python API available and working as expected
          and then in sub-process it executes main_<fw>.py files. Due to some OSs specifics we can't
          just add paths to Python modules and libraries into current env. So to make Inference Engine
          Python API to be available inside MO we need to use subprocess with new env.
docstring_summary: Please keep this file compatible with python2 in order to check user python version.
docstring_tokens: Please keep this file compatible with python2 in order to check user python version .
function: def subprocess_main(framework=None):
      """
          Please keep this file compatible with python2 in order to check user python version.
  
          This function checks that Inference Engine Python API available and working as expected
          and then in sub-process it executes main_<fw>.py files. Due to some OSs specifics we can't
          just add paths to Python modules and libraries into current env. So to make Inference Engine
          Python API to be available inside MO we need to use subprocess with new env.
      """
      setup_env()
  
      path_to_main = os.path.join(os.path.realpath(os.path.dirname(__file__)),
                                  'main_{}.py'.format(framework) if framework else 'main.py')
  
      # python2 compatible code. Do not remove.
      args = [sys.executable, path_to_main]
  
      for arg in sys.argv[1:]:
          args.append(arg)
      status = subprocess.run(args, env=os.environ)
      sys.exit(status.returncode)
function_tokens: def subprocess_main ( framework = None ) : setup_env ( ) path_to_main = os . path . join ( os . path . realpath ( os . path . dirname ( __file__ ) ) , 'main_{}.py' . format ( framework ) if framework else 'main.py' ) # python2 compatible code. Do not remove. args = [ sys . executable , path_to_main ] for arg in sys . argv [ 1 : ] : args . append ( arg ) status = subprocess . run ( args , env = os . environ ) sys . exit ( status . returncode )