import site
import sys
import os


def existance_check():
    """Returns True if Qt.py is found, else returns False"""

    found = False
    site_package_locations = site.getsitepackages()
    for location in site_package_locations:
        if os.path.exists(os.path.join(location, 'Qt.py')):
            found = True
        print(
            'Qt.py was not found in any of the locations:' +
            ', '.join(site_package_locations)
            )
    return found


# Example
if __name__ == '__main__':
    if existance_check():
        sys.exit(0)
    else:
        sys.exit(1)

@@ -287,16 +287,65 @@
 .py')):%0A
+            print('Found Qt.py in: ' + location)%0A
         
@@ -365,26 +365,29 @@
 rue%0A    
-    print(
+if not found:
 %0A       
@@ -387,20 +387,22 @@
         
-    
+print(
 'Qt.py w
@@ -438,19 +438,31 @@
 cations:
+ 
 ' +
+ ', '.join(
 %0A       
@@ -466,26 +466,16 @@
         
-', '.join(
 site_pac
@@ -489,29 +489,16 @@
 cations)
-%0A            
 )%0A    re

Fix prints