File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,18 @@ public BaselineComparisonBenchmarkBase()
13
13
{
14
14
Console . WriteLine ( $ "CWD: { Environment . CurrentDirectory } ") ;
15
15
Console . WriteLine ( $ "Using Python.Runtime from { typeof ( PythonEngine ) . Assembly . Location } { typeof ( PythonEngine ) . Assembly . GetName ( ) } ") ;
16
- foreach ( var assembly in AppDomain . CurrentDomain . GetAssemblies ( ) ) {
17
- if ( assembly . FullName . StartsWith ( "Python.Runtime" ) )
18
- Console . WriteLine ( assembly . Location ) ;
19
- foreach ( var dependency in assembly . GetReferencedAssemblies ( ) )
20
- if ( dependency . FullName . Contains ( "Python.Runtime" ) ) {
21
- Console . WriteLine ( $ "{ assembly } -> { dependency } ") ;
22
- }
16
+
17
+ try {
18
+ PythonEngine . Initialize ( ) ;
19
+ Console . WriteLine ( "Python Initialized" ) ;
20
+ if ( PythonEngine . BeginAllowThreads ( ) == IntPtr . Zero )
21
+ throw new PythonException ( ) ;
22
+ Console . WriteLine ( "Threading enabled" ) ;
23
+ }
24
+ catch ( Exception e ) {
25
+ Console . WriteLine ( e ) ;
26
+ throw ;
23
27
}
24
- PythonEngine . Initialize ( ) ;
25
28
}
26
29
27
30
static BaselineComparisonBenchmarkBase ( )
You can’t perform that action at this time.
0 commit comments