python: Only call the init if python is actually present.

Fixes #1952
windows-high-dpi
Doug Coleman 2018-02-19 10:41:46 -06:00
parent 310a4a247c
commit 7a729b7637
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
USING: alien alien.c-types alien.data arrays assocs command-line fry
USING: alien alien.c-types alien.data alien.libraries
arrays assocs command-line fry
hashtables init io.encodings.utf8 kernel namespaces
python.errors python.ffi python.objects sequences
specialized-arrays strings vectors ;
@ -115,5 +116,5 @@ ERROR: missing-type type ;
: with-quot>py-cfunction ( alien quot -- )
'[ <py-cfunction> @ ] with-callback ; inline
[ py-initialize ] "python" add-startup-hook
[ "PyIsInitialized" "python2.7" library-dll dlsym? [ py-initialize ] when ] "python" add-startup-hook
[ py-finalize ] "python" add-shutdown-hook