anchor.diff:    end;
   end;
   
  +initialization
  +
  +  PyLoadedModules:= TStringList.Create;
  +  PyLoadedLocals:= TStringList.Create;
  +
  +finalization
  +
  +  FreeAndNil(PyLoadedLocals);
  +  FreeAndNil(PyLoadedModules);
   
   end.
   
  
positive.code: 
    SObj:= '_cudacmd_' + AModule;
  
    if not ALazy then
    begin
      Str1:= 'import cudatext' + SLineBreak +
        Format('import %s',                [AModule]) + SLineBreak +
        Format('if "%s" not in locals():', [SObj]) + SLineBreak +
        Format('    %s = %s.Command()',    [SObj, AModule]) + SLineBreak;
      if UiOps.PyInitLog then
        Str1:= Str1+
        Format('    print("Init: %s")',    [AModule]);
      Str2:=
        Format('%s.%s(%s)', [SObj, ACmd, SParams]);
  
      try
        with GetPythonEngine do
        begin
          ExecString(Str1);
          Result:= EvalStringAsStr(Str2);
        end;
      except
      end;
    end
    else
    begin
      Str1:=
        'import cudatext' + SLineBreak +
        '_ = None' + SLineBreak +
        Format('if "%s" in locals():', [SObj]) + SLineBreak +
        Format('    _ = %s.%s(%s)',    [SObj, ACmd, SParams]);
  
      try
        with GetPythonEngine do
        begin
          ExecString(Str1);
          Result:= EvalStringAsStr('_');
        end;
      except
      end;
    end;
  end;
  
  function Py_rect(const R: TRect): PPyObject; cdecl;
  
negative.code:   cPyNone = 'None';
  
  implementation
  
  var
    PyLoadedModules: TStringList = nil;
    PyLoadedLocals: TStringList = nil;
  
  function IsPyLoadedModule(const S: string): boolean; inline;
  begin
    Result:= PyLoadedModules.IndexOf(S)>=0;
  end;
  
  function IsPyLoadedLocal(const S: string): boolean; inline;
  begin
    Result:= PyLoadedLocals.IndexOf(S)>=0;
  end;
  
  
  procedure Py_SetSysPath(const Dirs: array of string; DoAdd: boolean);
  var
  