Skip to content

Commit d5d0309

Browse files
committed
1 parent d0fcdfe commit d5d0309

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

PythonForDelphi/Components/Sources/Core/PythonEngine.pas

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5269,7 +5269,7 @@ function TPythonEngine.Run_CommandAsObjectWithDict(const command : AnsiString; m
52695269
else if Assigned(FGlobalVars) then
52705270
_globals := GlobalVars
52715271
else
5272-
_globals := PyModule_GetDict(m);
5272+
_globals := _locals;
52735273

52745274
try
52755275
Result := PyRun_String(PAnsiChar(CleanString(command)), mode, _globals, _locals);
@@ -5554,7 +5554,7 @@ procedure TPythonEngine.RaiseError;
55545554
raise Define( EPyExecError.Create(''), s_type, s_value );
55555555
end
55565556
else
5557-
raise EPythonError.Create('RaiseError: could''nt fetch last exception');
5557+
raise EPythonError.Create('RaiseError: couldn''t fetch last exception');
55585558
end;
55595559

55605560
function TPythonEngine.PyObjectAsString( obj : PPyObject ) : string;
@@ -5791,8 +5791,6 @@ function TPythonEngine.VariantAsPyObject( const V : Variant ) : PPyObject;
57915791
end;
57925792
end;
57935793

5794-
const
5795-
GUID_NULL: TGUID = '{00000000-0000-0000-0000-000000000000}'; // copied from ActiveX.pas
57965794
var
57975795
s : AnsiString;
57985796
y, m, d, h, mi, sec, ms, jd, wd : WORD;

0 commit comments

Comments
 (0)