FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnet/pythonnet/__init__.py at modernisation · Pixelbear/pythonnet · GitHub
Pixelbear
pythonnet
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnet
/
pythonnet
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (11 loc) · 409 Bytes
Breadcrumbs
pythonnet
/
pythonnet
/
__init__.py
Copy path
File metadata and controls
18 lines (11 loc) · 409 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import
os
_RUNTIME
=
None
def
set_runtime
(
runtime
):
global
_RUNTIME
_RUNTIME
=
runtime
def
load
():
dll_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"dlls"
,
"Python.Runtime.dll"
)
assembly
=
_RUNTIME
.
get_assembly
(
dll_path
)
func
=
assembly
[
"Python.Runtime.PythonEngine.InternalInitialize"
]
if
func
(
b""
)
!=
0
:
raise
RuntimeError
(
"Failed to initialize Python.Runtime.dll"
)
Back
|
FazBrowse Home
|
New Git URL