print() function and raw_input() for Python 3
diff --git a/code/default/launcher/start.py b/code/default/launcher/start.py
index 918b2ead60..bb448a88dc 100644
--- a/code/default/launcher/start.py
+++ b/code/default/launcher/start.py
@@ -1,24 +1,31 @@
 #!/usr/bin/env python
 # coding:utf-8
 
-import os, sys
-import time
 import atexit
+import os
+import sys
+import time
+from instances import xlog
 
 # reduce resource request for threading
 # for OpenWrt
 import threading
 try:
-    threading.stack_size(128*1024)
+    threading.stack_size(128 * 1024)
 except:
     pass
 
+try:
+    raw_input          # python 2
+except NameError:
+    raw_input = input  # python 3
+
 current_path = os.path.dirname(os.path.abspath(__file__))
-root_path = os.path.abspath( os.path.join(current_path, os.pardir))
+root_path = os.path.abspath(os.path.join(current_path, os.pardir))
 data_path = os.path.abspath(os.path.join(root_path, os.pardir, os.pardir, 'data'))
 data_launcher_path = os.path.join(data_path, 'launcher')
 python_path = os.path.join(root_path, 'python27', '1.0')
-noarch_lib = os.path.abspath( os.path.join(python_path, 'lib', 'noarch'))
+noarch_lib = os.path.abspath(os.path.join(python_path, 'lib', 'noarch'))
 sys.path.append(noarch_lib)
 
 
@@ -32,10 +39,9 @@ def create_data_path():
     data_gae_proxy_path = os.path.join(data_path, 'gae_proxy')
     if not os.path.isdir(data_gae_proxy_path):
         os.mkdir(data_gae_proxy_path)
-create_data_path()
 
-from instances import xlog
 
+create_data_path()
 has_desktop = True
 if sys.platform.startswith("linux"):
     def X_is_running():
@@ -57,7 +63,6 @@ def X_is_running():
         from non_tray import sys_tray
         has_desktop = False
 
-
     platform_lib = os.path.join(python_path, 'lib', 'linux')
     sys.path.append(platform_lib)
 elif sys.platform == "win32":
@@ -65,7 +70,7 @@ def X_is_running():
     sys.path.append(platform_lib)
     from win_tray import sys_tray
 elif sys.platform == "darwin":
-    platform_lib = os.path.abspath( os.path.join(python_path, 'lib', 'darwin'))
+    platform_lib = os.path.abspath(os.path.join(python_path, 'lib', 'darwin'))
     sys.path.append(platform_lib)
     extra_lib = "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjc"
     sys.path.append(extra_lib)
@@ -83,7 +88,7 @@ def X_is_running():
 
 def unload(module):
     for m in list(sys.modules.keys()):
-        if m == module or m.startswith(module+"."):
+        if m == module or m.startswith(module + "."):
             del sys.modules[m]
 
     for p in list(sys.path_importer_cache.keys()):
@@ -102,7 +107,6 @@ def unload(module):
     xlog.info("use build-in openssl lib")
 except Exception as e1:
     xlog.info("import build-in openssl fail:%r", e1)
-    
     sys.path.pop(0)
     del sys.path_importer_cache[noarch_lib]
     unload("OpenSSL")
@@ -126,10 +130,11 @@ def unload(module):
 
 
 def exit_handler():
-    print 'Stopping all modules before exit!'
+    print('Stopping all modules before exit!')
     module_init.stop_all()
     web_control.stop()
 
+
 atexit.register(exit_handler)
 
 
@@ -180,11 +185,9 @@ def main():
 if __name__ == '__main__':
     try:
         main()
-    except KeyboardInterrupt: # Ctrl + C on console
+    except KeyboardInterrupt:  # Ctrl + C on console
         module_init.stop_all()
         os._exit(0)
     except Exception as e:
         xlog.exception("launcher except:%r", e)
-
         raw_input("Press Enter to continue...")
-
