Skip to content

Commit fe588b2

Browse files
committed
Improve but disable debug code
1 parent f452868 commit fe588b2

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

PythonNETExtensions/Core/RawPython.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ public static RetT Run<RetT>(InterpolationHandler code, CompilationOption compil
160160

161161
private static void RunInternal(string codeText, InterpolationHandler code, CompilationOption compilationOption)
162162
{
163-
Console.WriteLine(codeText);
164-
165163
var scope = code.Scope;
166164

167165
bool shouldCompile;
@@ -197,6 +195,17 @@ private static void RunInternal(string codeText, InterpolationHandler code, Comp
197195
{
198196
scope.Exec(codeText);
199197
}
198+
199+
if (false)
200+
{
201+
Console.WriteLine(
202+
$"""
203+
Compiled: {shouldCompile}
204+
205+
Codegen:
206+
{codeText}
207+
""");
208+
}
200209
}
201210
}
202211
}

PythonNETExtensions/Versions/IPythonVersion.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ public static virtual void RunWithPythonExecutable(string args)
157157

158158
process.WaitForExit(); // Wait for the process to exit
159159

160-
if (!string.IsNullOrEmpty(errors))
160+
if (!string.IsNullOrWhiteSpace(errors))
161161
{
162162
output +=
163163
$"""
164-
"Errors:
165-
{errors}
164+
165+
Errors:{errors}
166166
""";
167167
}
168168

0 commit comments

Comments
 (0)