fork download
  1. print("");
  2. print("----- Checking Python -----");
  3.  
  4. import sys
  5.  
  6. def Running27():
  7. # Okay, we're running 2.7. Now check if PyQT is installed.
  8. try:
  9. from PyQt4 import Qt
  10. except:
  11. print("ERROR: failed to import PyQt4");
  12.  
  13.  
  14. major = sys.version_info.major;
  15. minor = sys.version_info.minor;
  16.  
  17. if major == 2 and minor == 7:
  18. Running27();
  19. else:
  20. print("ERROR: The interpreter for this script is not Python 2.7.X");
  21. print("\t The interpreter is " + str(sys.version_info));
  22.  
  23. print("");
  24. print("Hit enter to exit...");
  25. raw_input();
Success #stdin #stdout 0.01s 7072KB
stdin
Hi
stdout
----- Checking Python -----
ERROR: failed to import PyQt4

Hit enter to exit...