File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1795,6 +1795,7 @@ TPythonEngine = class(TPythonInterface)
17951795 procedure SetGlobalVars (const Value : PPyObject);
17961796 procedure SetLocalVars (const Value : PPyObject);
17971797 procedure SetPyFlags (const Value : TPythonFlags);
1798+ procedure SetIO (InputOutput: TPythonInputOutput);
17981799 procedure AssignPyFlags ;
17991800
18001801 public
@@ -1896,7 +1897,7 @@ TPythonEngine = class(TPythonInterface)
18961897 property DatetimeConversionMode: TDatetimeConversionMode read FDatetimeConversionMode write FDatetimeConversionMode default DEFAULT_DATETIME_CONVERSION_MODE;
18971898 property InitScript: TStrings read FInitScript write SetInitScript;
18981899 property InitThreads: Boolean read FInitThreads write SetInitThreads default False;
1899- property IO: TPythonInputOutput read FIO write FIO ;
1900+ property IO: TPythonInputOutput read FIO write SetIO ;
19001901 property PyFlags: TPythonFlags read FPyFlags write SetPyFlags default [];
19011902 property RedirectIO: Boolean read FRedirectIO write FRedirectIO default True;
19021903 property UseWindowsConsole: Boolean read FUseWindowsConsole write FUseWindowsConsole default False;
@@ -4244,6 +4245,18 @@ procedure TPythonEngine.SetInitThreads(Value: Boolean);
42444245 end ;
42454246end ;
42464247
4248+ procedure TPythonEngine.SetIO (InputOutput: TPythonInputOutput);
4249+ begin
4250+ if InputOutput <> fIO then
4251+ begin
4252+ if Assigned(fIO) then
4253+ fIO.RemoveFreeNotification(Self);
4254+ fIO := InputOutput;
4255+ if Assigned(fIO) then
4256+ fIO.FreeNotification(Self);
4257+ end ;
4258+ end ;
4259+
42474260function TPythonEngine.GetClientCount : Integer;
42484261begin
42494262 Result := FClients.Count;
You can’t perform that action at this time.
0 commit comments