old_contents: #!/usr/bin/env python3
  import sys
  import os
  import subprocess
  
  # Use pegasus-config to find our lib path
  bin_dir = os.path.normpath(os.path.join(os.path.dirname(sys.argv[0])))
  pegasus_config = os.path.join(bin_dir, "pegasus-config") + " --python-dump"
  exec(subprocess.Popen(pegasus_config, stdout=subprocess.PIPE, shell=True).communicate()[0])
  
  # Insert this directory in our search path
  os.sys.path.insert(0, pegasus_python_dir)
  os.sys.path.insert(0, pegasus_python_externals_dir)
  
  from Pegasus.init import main
  
  main(pegasus_share_dir)
  
  
new_contents: #!/usr/bin/env python3
  
  import os
  from pathlib import Path
  
  from Pegasus.init import main
  
  pegasus_share_dir = (Path(os.environ["PEGASUS_HOME"]) / "share" / "pegasus").resolve()
  
  main(str(pegasus_share_dir))
  
subject: Remove call to p-config, as it is handled in p-python-wrapper