Created
July 13, 2015 18:15
-
-
Save kived/5516a6047de4d99feb41 to your computer and use it in GitHub Desktop.
Kivy: CEF init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Newer Kivy versions include a Gtk+3 clipboard, and CEF will try to use Gtk+2, which | |
# causes an error. Importing Gtk from gi first fixes the issue. | |
try: | |
from gi.repository import Gtk | |
except ImportError: | |
pass | |
# cefpython import overwrites LD_LIBRARY_PATH. Bad module, BAD! | |
env_ld_library_path = os.environ.get('LD_LIBRARY_PATH', None) | |
from cefpython3 import cefpython # must be imported FIRST due to a tc_malloc hook | |
if env_ld_library_path: | |
os.environ['LD_LIBRARY_PATH'] += ':' + env_ld_library_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment