| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
This tutorial is for v50+ versions of CEF Python, which are currently available only for Linux.
Table of contents:
The easy way to install CEF Python is through PyPI, using the pip tool, which is bundled with all recent versions of Python. On Linux pip 8.1+ is required. To check version and install CEF Python type:
pip --version pip install cefpython3
Alternatively you can download the setup package from GitHub Releases and install it by following the instructions in README.txt.
Now let's download examples by cloning the GitHub repository. After that, enter the "cefpython/examples/" directory. In that directory you will find all the examples from this Tutorial, their names start with a "tutorial_" prefix, except for the hello world example which is just named "hello_world.py".
git clone https://github.com/cztomczak/cefpython.git cd cefpython/examples/
The hello_world.py example is the most basic example. It doesn't depend on any third party GUI frameworks. It creates a browser widget without providing any window information (parent window not specified), thus CEF automatically takes care of creating a top-level window for us, and in that window a Chromium widget is embedded. When creating the browser, an "url" parameter is specified, which causes the browser to initially navigate to the Google website. Let's explain the code from this example:
Documentation for the functions from this example can be found in API docs (the api/ directory in GitHub's repository):
...
...
| Back | FazBrowse Home | New Git URL |