Lines Matching refs:main_path
410 main_path = getattr(sys.modules['__main__'], '__file__', None)
411 if not main_path and sys.argv[0] not in ('', '-c'):
412 main_path = sys.argv[0]
413 if main_path is not None:
414 if not os.path.isabs(main_path) and \
416 main_path = os.path.join(process.ORIGINAL_DIR, main_path)
417 d['main_path'] = os.path.normpath(main_path)
473 if 'main_path' in data:
480 main_path = data['main_path']
481 main_name = os.path.splitext(os.path.basename(main_path))[0]
483 main_name = os.path.basename(os.path.dirname(main_path))
490 main_module.__file__ = main_path
496 if main_path is None:
498 elif os.path.basename(main_path).startswith('__init__.py'):
499 dirs = [os.path.dirname(os.path.dirname(main_path))]
501 dirs = [os.path.dirname(main_path)]