text: 
  
  print('Running module1.py')
  
  def hello():
      print('module1 says Hello!')
  
  
  
  import os.path
  import types
  import sys
  
  module_name = 'module1'
  module_file = 'module_source.py'
  module_path = '.'
  
  module_rel_file_path = os.path.join(module_path, module_file)
  module_abs_file_path = os.path.abspath(module_rel_file_path)
  
  # read source code from file
  with open(module_rel_file_path, 'r') as code_file:
      source_code = code_file.read()
  
  # create a module object
  mod = types.ModuleType()
  mod.__file__ = module_abs_file_path
  
  # set a ref in sys.modules[]
  sys,sys.modules[]
  
  # compile source code
  code = compile(source_code, filename=module_abs_file_path, mode='exec')
  
  # execute compiled source code
  exec(code, mod.__dict__)
  
  
  