protected override void Initialize()
        {
            base.Initialize();

            if (Doc != null)
            {
                Doc.SolutionEnd += OnDocSolutionEnd;
            }

            m_py = PythonScript.Create();
            if (m_py != null)
            {
                SetScriptTransientGlobals();
                m_py.Output = m_py_output.Write;
                m_py.SetVariable("__name__", "__main__");
                m_env = new PythonEnvironment(this, m_py);

                m_py.SetVariable(PARENT_ENVIRONMENT_NAME, m_env);
                m_py.SetIntellisenseVariable(PARENT_ENVIRONMENT_NAME, m_env);

                m_py.ContextId = 2;                                      // 2 is Grasshopper

                m_env.LoadAssembly(typeof(GH_Component).Assembly);       //add Grasshopper.dll reference
                m_env.LoadAssembly(typeof(ZuiPythonComponent).Assembly); //add GHPython.dll reference

                UnpackScriptResources();

                m_env.AddGhPythonPackage();
            }
        }
        protected override void Initialize()
        {
            base.Initialize();

              if (Doc != null)
            Doc.SolutionEnd += OnDocSolutionEnd;

              m_py = PythonScript.Create();
              if (m_py != null)
              {
            SetScriptTransientGlobals();
            m_py.Output = m_py_output.Write;
            m_py.SetVariable("__name__", "__main__");
            m_env = new PythonEnvironment(this, m_py);

            m_py.SetVariable(PARENT_ENVIRONMENT_NAME, m_env);
            m_py.SetIntellisenseVariable(PARENT_ENVIRONMENT_NAME, m_env);

            m_py.ContextId = 2; // 2 is Grasshopper

            m_env.LoadAssembly(typeof(GH_Component).Assembly); //add Grasshopper.dll reference
            m_env.LoadAssembly(typeof(ZuiPythonComponent).Assembly); //add GHPython.dll reference

            UnpackScriptResources();

            m_env.AddGhPythonPackage();
              }
        }