anchor.diff:    Result+= ')';
   end;
   
  -procedure TAppPython.InitMainModule;
  -begin
  -  with FEngine do
  -    if MainModule=nil then
  +procedure TAppPython.InitModuleMain;
  +begin
  +  with FEngine do
  +    if ModuleMain=nil then
       begin
  -      MainModule:= GetMainModule;
  -      if MainModule=nil then
  +      ModuleMain:= GetMainModule;
  +      if ModuleMain=nil then
           raise EPythonError.Create('Python: can''t create __main__');
         //if _Locals=nil then
  -      //  _Locals:= PyModule_GetDict(MainModule);
  -      if Globals=nil then
  -        Globals:= PyModule_GetDict(MainModule);
  +      //  _Locals:= PyModule_GetDict(ModuleMain);
  +      if GlobalsMain=nil then
  +        GlobalsMain:= PyModule_GetDict(ModuleMain);
       end;
   end;
   
  
positive.code:     EventTimes: TStringList;
      LoadedLocals: TStringList;
      LoadedModules: TStringList;
      MainModule: PPyObject;
      Globals: PPyObject;
      procedure InitMainModule;
      procedure ImportCommand(const AObject, AModule: string);
      function ImportModuleCached(const AModule: string): PPyObject;
      function IsLoadedLocal(const S: string): boolean;
  
negative.code: begin
    Result:=nil;
    if not FInited then exit;
    InitModuleMain;
    with FEngine do
    begin
      CurrObject:=PyDict_GetItemString(GlobalsMain,PChar(AObject));
      if Assigned(CurrObject) then
      begin
        Func:=PyObject_GetAttrString(CurrObject,PChar(AFunc));
  