libzmq = os.path.join(here, 'libzmq.dll') if os.path.exists(libzmq): ctypes.cdll.LoadLibrary(libzmq) # # CellProfiler expects NaN as a result during calculation # np.seterr(all='ignore') # # Defeat pyreadline which graciously sets its logging to DEBUG and it # appears when CP is frozen # try: from pyreadline.logger import stop_logging, pyreadline_logger pyreadline_logger.setLevel(logging.INFO) stop_logging() except: pass if not hasattr(sys, 'frozen'): root = os.path.split(__file__)[0] else: root = os.path.split(sys.argv[0])[0] if len(root) == 0: root = os.curdir root = os.path.abspath(root) site_packages = os.path.join(root, 'site-packages').encode('utf-8') if os.path.exists(site_packages) and os.path.isdir(site_packages): import site
import ctypes libzmq = os.path.join(here, 'libzmq.dll') if os.path.exists(libzmq): ctypes.cdll.LoadLibrary(libzmq) import zmq # # CellProfiler expects NaN as a result during calculation # np.seterr(all='ignore') # # Defeat pyreadline which graciously sets its logging to DEBUG and it # appears when CP is frozen # try: from pyreadline.logger import stop_logging, pyreadline_logger pyreadline_logger.setLevel(logging.INFO) stop_logging() except: pass if not hasattr(sys, 'frozen'): root = os.path.split(__file__)[0] else: root = os.path.split(sys.argv[0])[0] if len(root) == 0: root = os.curdir root = os.path.abspath(root) site_packages = os.path.join(root, 'site-packages').encode('utf-8') if os.path.exists(site_packages) and os.path.isdir(site_packages): import site site.addsitedir(site_packages)