Skip to content

Commit

Permalink
refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Apr 5, 2024
1 parent e0ad968 commit c39d3bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/McNeel.PythonEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public void RunScope(

try
{
pyscope.Set("__file__", pythonFile ?? string.Empty);
pyscope.Set(nameof(PyIdentifier.__file__), pythonFile ?? string.Empty);

// add default references
if (beforeScript is string)
Expand Down Expand Up @@ -673,7 +673,7 @@ public void DisposeScope(object scope)
PyModule PrepareScope(string scopeName, string pythonFile)
{
PyModule pyscope = Py.CreateScope(scopeName);
pyscope.Set("__file__", pythonFile ?? string.Empty);
pyscope.Set(nameof(PyIdentifier.__file__), pythonFile ?? string.Empty);
return pyscope;
}

Expand Down

0 comments on commit c39d3bc

Please sign in to comment.