Git Product home page Git Product logo

cefpython's Introduction

CEF Python

Table of contents:

Introduction

CEF Python is an open source project founded by Czarek Tomczak in 2012 to provide Python bindings for the Chromium Embedded Framework (CEF). The Chromium project focuses mainly on Google Chrome application development while CEF focuses on facilitating embedded browser use cases in third-party applications. Lots of applications use CEF control, there are more than 100 million CEF instances installed around the world. There are numerous use cases for CEF:

  1. Use it as a modern HTML5 based rendering engine that can act as a replacement for classic desktop GUI frameworks. Think of it as Electron for Python.
  2. Embed a web browser widget in a classic Qt / GTK / wxPython desktop application
  3. Render web content off-screen in applications that use custom drawing frameworks
  4. Use it for automated testing of web applications with more advanced capabilities than Selenium web browser automation due to CEF low level programming APIs
  5. Use it for web scraping, as a web crawler or other kind of internet bots

CEF Python also provides examples of embedding CEF for many Python GUI frameworks such as PyQt, wxPython, PyGTK, PyGObject, Tkinter, Kivy, Panda3D, PyGame, PyOpenGL, PyWin32, PySide and PySDL2.

Latest releases sponsored by

Thank you to Fivestars for sponsoring the v66.1 release with Python 3.8 / 3.9 support. Fivestars helps local communities thrive by empowering small businesses with cutting edge marketing technology. Please visit their website: Fivestars.com

Thank you to Lampix for sponsoring the v66 release. Lampix is the first hardware and software solution that turns any surface into a smart, augmented reality or interactive surface. Please visit their website: Lampix.com

Thanks to all sponsors

Install

You can install pypi/cefpython3 package using pip tool. On Linux pip 8.1+ is required. You can also download packages for offline installation available on the GitHub Releases pages. Command to install with pip:

pip install cefpython3==66.0

Tutorial

See the Tutorial.md document.

Examples

See the README-examples.md and README-snippets.md documents.

Support

Releases

Information on planned new and current releases, supported platforms, python versions, architectures and requirements. If you want to support old operating systems then choose the v31 release.

Next release

  • To see planned new features or bugs to be fixed in the near future in one of next releases, see the next release label in the tracker
  • To see planned new features or bugs to be fixed in further future, see the next release 2 label in the tracker

Latest release

OS Py2 Py3 32bit 64bit Requirements
Windows 2.7 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 Yes Yes Windows 7+ (Note that Python 3.9 supports Windows 8.1+)
Linux 2.7 3.4 / 3.5 / 3.6 / 3.7 Yes Yes Debian 8+, Ubuntu 14.04+,
Fedora 24+, openSUSE 13.3+
Mac 2.7 3.4 / 3.5 / 3.6 / 3.7 No Yes MacOS 10.9+

These platforms are not supported yet:

v49 release (WinXP/Vista)

OS Py2 Py3 32bit 64bit Requirements
Windows 2.7 3.4 Yes Yes Windows XP+
  • Install with command: pip --no-cache-dir install cefpython3==49.0.
    • Please note that if you were previously installing cefpython3 package it is required to use the --no-cache-dir flag, otherwise pip will end up with error message No matching distribution found for cefpython3==49.0. This happens because 49.0 release occured after 57.0 and 66.0 releases.
  • Downloads are available on GitHub Releases tagged v49.0.
  • See Migration guide document for changes in this release
  • Documentation is available in the docs/ directory in the cefpython49-winxp branch
  • API reference is available in the api/ directory in the cefpython49-winxp branch

v31 release (old systems)

OS Py2 Py3 32bit 64bit Requirements
Windows 2.7 No Yes Yes Windows XP+
Linux 2.7 No Yes Yes Debian 7+ / Ubuntu 12.04+
Mac 2.7 No Yes Yes MacOS 10.7+

Additional information for v31.2 release:

  • On Windows/Mac you can install with command: pip install cefpython3==31.2
  • Downloads are available on the GitHub Releases page tagged v31.2.
  • API reference is available in revision 169a1b2
  • Other documentation can be downloaded by cloning the cefpython.wiki repository: git clone [email protected]:cztomczak/cefpython.wiki.git

Support development

If you would like to support general CEF Python development efforts by making a donation then please click the Paypal Donate button below. If you would like to see a specific feature implemented then you can make a comment about that when making a donation and that will give it a higher priority.



Thanks to all

  • [2021] Thank you to Fivestars for sponsoring the v66.1 release with Python 3.8 / 3.9 support
  • [2018] Thanks to Fivestars for sponsoring the v49 release for legacy systems (WinXP/Vista)
  • [2018] Many thanks to Lampix for sponsoring the v66 release for all platforms
  • [2017] Many thanks to HighSide Inc. for sponsoring the v55/v56 releases for all platforms
  • [2016-2018] Thanks to JetBrains for providing an Open Source license for PyCharm
  • [2014] Thanks to Adam Duston for donating a Macbook to aid the development of Mac port
  • [2013-2015] Lots of thanks goes to Cyan Inc. for sponsoring this project for a long time, making CEF Python 3 mature
  • [2013] Thanks to Rentouch GmbH for sponsoring the development of the off-screen rendering support
  • [2013] Thanks to Thomas Wusatiuk for sponsoring the development of the web response reading features
  • [2012-2018] Thanks to those who have made a Paypal donation: Rentouch GmbH, Walter Purvis, Rokas Stupuras, Alex Rattray, Greg Kacy, Paul Korzhyk, Tomasz Tomanek.
  • [2012-2017] Thanks to those who have donated their time through code contributions, they are listed in the Authors file

Seeking new sponsors

CEF Python is seeking companies to sponsor further development of the project. There are many proposals for new features submitted in the issue tracker. Most notable are:

  • Monthly releases with latest Chromium
  • An automated build system similar to upstream CEF Spotify Automated Builds
  • ARM and Android support
  • Multi-threaded support for increased performance
  • Proprietary codecs support in build tools: H264, H265,AC3, EAC3, MPEG-4
  • More CEF API exposed, only about 50% is exposed so far
  • Hundreds of new settings and Chromium preferences not yet exposed
  • Easier integration with popular GUI toolkits in just a few lines of code and support for more third party GUI frameworks
  • More examples of implementing various advanced features and more snippets as well

If your company would like to sponsor CEF Python development efforts then please contact Czarek. Long term sponsorships are welcome and Czarek is open to ideas about the project. He would love to spend more time on developing this project, but he can't afford doing so in his free time. Currently there is no company supporting this project actively on a daily basis.

Other READMEs

Quick links

Docs

API categories

Modules

Settings

Classes and objects

Client handlers (interfaces)

Other interfaces

API index

cefpython's People

Contributors

allestuetsmerweh avatar bryan-koroleski-fivestars avatar cztomczak avatar donalm avatar elliotwoods avatar fourthrome avatar giovalomba avatar gmjosack avatar hoba87 avatar jack-2025 avatar jakogut avatar jegger avatar jf-mgd avatar lejar avatar mcejp avatar neilmunday avatar nobodyguy avatar oren-icx avatar pkierski avatar reskayoi avatar xianguang-zhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cefpython's Issues

Allow for separate cookie management for each browser

In RequestHandler::GetCookieManager if you return NULL a global cookie manager 
will be used. If you do not want to share cookies across browsers 
CefCookieManager object should be returned here, you can create one with a call 
to:

    CefCookieManager::CreateManager(string cache_path)

If cache_path is empty then data will be stored in memory only. A global cookie 
manager also uses memory by default, unless you set 
ApplicationSettings.cache_path.

Original issue reported on code.google.com by [email protected] on 23 Oct 2012 at 7:45

Allow to rebind javascript function so that Python's reload() works

What steps will reproduce the problem?
1.import my_modual
2.while running CEF, change my_modual.py
3.reload(my_modual) ,which I'm binding to F5

What is the expected output? What do you see instead?
The change to my_modual.py should take effect

What version of the product are you using? On what operating system?
cef_python 3.7, for Python 2.7, on Window 7

Please provide any additional information below.
This is no show stopper, but could speed up testing if it worked.

Original issue reported on code.google.com by [email protected] on 9 Sep 2012 at 8:14

Custom proxy / disable the default of using IE proxy settings

Implement CefApp > GetProxyHandler() > CefProxyHandler > GetProxyForUrl():
- UseDirect()
- UseNamedProxy()

Currently there are some issues with custom proxy handling, issue created here:
http://code.google.com/p/chromiumembedded/issues/detail?id=600

Also seems like by default CEF1 uses the default IE proxy settings and this may 
cause some problems, see here:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=2586

Another topic regarding this matter here:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=2639

Original issue reported on code.google.com by [email protected] on 13 Sep 2012 at 11:55

Browser window covering other widgets in PyGTK

What steps will reproduce the problem?
1. Running pygtk_.py sample program included in cefpython package

What is the expected output? What do you see instead?
I expect to get the output as shown in 
https://code.google.com/p/cefpython/wiki/PyGTK
with menubar and searchentry

Instead browser window is covering other widgets in PyGTK. Image added. I 
switched of browser window resize to see whats happening

What version of the product are you using? On what operating system?
I'm Using cefpython_0.41_windows_py2.7.zip and pygtk 2.24.0 on Windows 7

Please provide any additional information below.
wxPython renders menubar and browser window correctly


Original issue reported on code.google.com by [email protected] on 15 Nov 2012 at 11:35

Attachments:

Implement OnBeforeResourceLoad

This one is rather important if user wants to load content from virtual file 
systems.
Real-life use-case: games store resources in pak archives. Game UI could be 
implemented in cef and html/css/js files need to be loaded from archive.
Now we are bound to running tiny webserver in order to serve needed files to 
cef. When OnBeforeResourceLoad gets implemented we just could slip-in data from 
archive on loading attempt.

Original issue reported on code.google.com by [email protected] on 18 Mar 2013 at 7:40

Expose api for global v8 exception handler

I've been working on a patch for CEF 1 to implement global v8 exception handler 
(a patch for CEF 3 is also in progress), the issue in CEF tracker can be found 
here:

http://code.google.com/p/chromiumembedded/issues/detail?id=736

The patch has been approved, see `revision 859` of branch 1180:
http://code.google.com/p/chromiumembedded/source/detail?r=859

There is a new setting called "oncaught_exception_stack_size", by default it is 
set to 0, thus the exception handler is disabled. There is also an 
OnUncaughtException() callback in V8ContextHandler.

Original issue reported on code.google.com by [email protected] on 24 Oct 2012 at 7:04

PyQt example crashes when closing window

What steps will reproduce the problem?
1.python pyqt4.py
2.Click the close button
3.

What is the expected output? What do you see instead?
Expected is no output, instead I get this on the console.
[1127/084154]:ERROR_REPORT:browser_impl.h(181)] Check failed: 
CefThread::CurrentlyOn(CefThread::UI).

What version of the product are you using? On what operating system?
cefpython 0.45

Please provide any additional information below.
Curiously, this issue appears on my system but on another system it works 
without a problem.


Original issue reported on code.google.com by [email protected] on 27 Nov 2012 at 2:47

constants provided by cefpython do not match values of cef_key_type_t enum

as title says \o/

code:
print cefpython.KEYEVENT_KEYUP
print cefpython.KEYEVENT_KEYDOWN
print cefpython.KEYEVENT_CHAR

produces:
2
1
3

however output should be:
0
1
2
according to this: 
https://code.google.com/searchframe#SgTHaFLUelA/trunk/include/cef_types.h&q=KT_K
EYUP%20package:chromiumembedded%5C.googlecode%5C.com&l=334

Original issue reported on code.google.com by [email protected] on 27 Dec 2012 at 5:56

Popup windows have no keyboard / mouse focus

Create popup window using window.open(), try scolling using mouse wheel - it 
doesn't work, you need to click in that window, only after that scrolling works.

To fix that it is required to implement CefLifeSpanHandler > OnAfterCreated() 
which is called after new window is created, call Browser.SetFocus() in that 
handler or do it the same as in cefpython.wm_SetFocus proc:

cdef HWND innerHwnd = (<CefBrowser*>(cefBrowser.get())).GetWindowHandle()
PostMessage(innerHwnd, WM_SETFOCUS, 0, 0)

Original issue reported on code.google.com by [email protected] on 14 Sep 2012 at 5:30

How to get Full-Screen?

What steps will reproduce the problem?
1. Added this line:  browserSettings["fullscreen_enabled"] = True
2.
3.

What is the expected output? What do you see instead?
Full screen, like when you press F11 in Chrome.

What version of the product are you using? On what operating system?
CEF Python 0.41, Python 2.7, Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 16 Nov 2012 at 9:42

Implement GetHeaderMap and SetHeaderMap in Response object

See [Response] object.

To be able to do this we need to create cython definitions for the C++ 
STL::multimap object. In cython library only STL::map is available, see 
Cython/Includes/libcpp/map.pxd. Need to create similar file called 
multimap.pxd, only some of the stuff is needed: begin(), end(), iterator, 
insert.

Original issue reported on code.google.com by [email protected] on 24 Sep 2012 at 10:29

Support utf8 title, use WindowTextW instead of WindowTextA

What steps will reproduce the problem?

When i use the old version, I can use DisplayHandler_OnTitleChange to fix the 
utf8 tiitle. But WindowTextA is used in the window_utils_win.pyx  , it can not 
support utf8. 

PS: I am very glad to see the 41 issues is accepted so fast.

Original issue reported on code.google.com by [email protected] on 19 Dec 2012 at 3:15

Allow passing python callable objects to javascript

Currently you can bind object to javascript but only by using JavascriptBindings.SetObject(). It would be useful to be able to pass a python object as a parameter to javascript function, or as a return value. This can by achieved by using javascript extensions mechanism.

Related issue:
#367 ("Expanded JavascriptBindings options")

Introduce CurrentJavascriptContext to provide Browser/Frame objects to python funcs called from js

When python function is called from javascript we don't know from which browser 
or frame it originates. We should pass the context as a first argument, a frame 
or both, browser and frame. Passing only frame would be enough if we had 
!GetBrowser() method in Frame object. Or should we pass "context" dictionary 
with "browser" and "frame" keys?

Original issue reported on code.google.com by [email protected] on 28 Nov 2012 at 3:25

Application error in python.exe when closing main browser window

It's a random error happening on application exit. I am able to reproduce it 
right now by doing a lot of clicks in the window, then closing it. The exact 
error message below:

python.exe - Application Error
---------------------------
The instruction at "0x7ca712b7" references memory at "0x00c5fe28". The memory 
could not be "read".
Click on OK to terminate the program
---------------------------

It sometimes references to "0x00c5feb0".

I tried running WinDbg but failed even to start the script with it, getting 
some kernel errors.

I tried running Spy++ and I see something strange happening in the top window 
(top-right of the screen), a WM_CLOSE message is called after WM_NCDESTROY. 
That window is created using pywin32 extension. There are 2 other inner windows 
created by CEF, but they seem to have proper messages,  there are no more 
messages processed after WM_NCDESTROY which is a correct behavior. Attaching 
!Spy++ screenshot.

Original issue reported on code.google.com by [email protected] on 8 Jul 2012 at 8:14

Attachments:

automate cefpython

Hello!
How can I automate the filling of the search string (for example google.com) 
using cefpython?

Original issue reported on code.google.com by [email protected] on 9 Nov 2012 at 6:03

  • Merged into: #24

Opening popups causes hang up of the application loop or a crash

What version of the product are you using? On what operating system?
cefpython1_v0.51 with wxPython
Windows 7 Professional 32bit

The steps to reproduce the problem are:
  1- Open program and load a web page
  2- Open the link in the web page with onclick="window.open()" attribute

I've tried the same page with the old version ( cefpython1_v0.41 ) and the 
window appear without problem.

Anyone can help me?

Thanks

Original issue reported on code.google.com by [email protected] on 4 Jan 2013 at 4:20

Dropdown menu crashes application in off-screen rendering mode

1. start panda3d demo, click very first link in page, then click downloads 
section
2. click dropdown element to expand menu

Should see dropdown menu displayed but instead app crashes.

Traceback (most recent call last):

  File "X:\src\games\p3d\Panda3D-1.8.0\direct\showbase\ShowBase.py", line 1844, in __igLoop
    self.graphicsEngine.renderFrame()

AssertionError: image_ptr >= orig_image_ptr && image_ptr + view_size <= 
orig_image_ptr + tex->get_ram_mipmap_image_size(n) at line 8893 of 
c:\buildslave\release_sdk_win32\build\panda3d\panda\src\glstuff\glGraphicsStateG
uardian_src.cxx

Original issue reported on code.google.com by [email protected] on 27 Dec 2012 at 4:25

Fix errors when calling GetPyBrowserByCefBrowser() in client handler callbacks

This function is not reliable in handlers, many callbacks may be called before 
a browser is created, then this function returns None when it is the first 
browser, later it causes error when calling pyBrowser.GetHandler().

There seems to be appearing new cases every week, just a moment ago I had an 
error in DisplayHandler_OnStatusMessage() when running wxpython example.

Maybe we should make the second parameter "ignoreError" to be True by default? 
Or change the way it works completely, so we are able to get PyBrowser even 
during initialization of a browser.

In wiki documentation there are comments about this behavior in some of the 
handlers, for example LifeSpanHandler::OnAfterCreated():

    This function does not get called during creation of a browser initiated 
    through a call to cefpython.CreateBrowser(), it is a temporary limitation in 
    current implementation of cefpython. When a browser is created through 
    javascript "window.open" then this callback gets called.

Original issue reported on code.google.com by [email protected] on 28 Nov 2012 at 2:38

Can't convert unicode to V8 type...

Here is the python code...

---cut---

import json

def dumpJSON(path, data):
    with open(path, 'w') as f:
        json.dump(data, f, indent=4)

def loadJSON(path):
    with open(path) as f:
        return json.load(f)


--uncut--


Basic usage example:

---cut---

dumpJSON('data.json', {
  key: 'value'
})

var o = loadJSON('data.json')


--uncut--

The above code both raises a python exceptions and kills the CEF instance 
(another bug?)...

This is how it fails:
'''
Exception: PyValueToV8Value() failed: an unsupported python type was passed 
from python to javascript: unicode
'''


The problem lies is that by default, json serializer uses utf-8 for all strings 
(and the file itself)

Versions used:
CEFPython 0.35
Python 2.7.2
OS WinXP SP3

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 12:04

Scheme handler support (eg. myapp://)

Loading content using file:// protocol has limits. There are many security restrictions and some features don't work or are limited. E.g. cookies don't work. Local storage is shared across all urls. Origin header for CSRF protection is not sent, integration with http urls is very limited, CORS issues with files accessing each other (e.g. between directories), etc.

Currently you can achieve a similar functionality by implementing Resource Handler and using e.g. http://myapp/ url. In README-examples.md there is the wxpython-response.py example that shows how to use resource handler along with web requests. It can be modified to load content from local disk instead of making requests, thus it wouldn't differ much from what scheme handler offers, just that it would use http://myapp/ url instead of myapp:// url. Note that when implementing scheme handler you also have to implement Resource Handler to serve content. Although registering scheme handlers has more options when registering it (bool is_standard, bool is_local, bool is_display_isolated, bool is_secure, bool is_cors_enabled, bool is_csp_bypassing, see here).

In CEF 3 schemes should also be registered in sub-processes, see this post: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10604&view=unread#p16455

Here is a commit by Idris Shah that adds support for custom scheme handlers in his cefpython fork: https://bitbucket.org/idrissha/cefpython/commits/d90da2fb43e809c4d2f1065018ef60b3cf2b579f

Related issues:

  • Issue #418 ("Expose resource manager API").
  • Issue #465 ("Example of serving content using http://myapp/ url as a replacement for loading content using file:// protocol which has many limits")

Problems with popups in wxPython, PyQt, PySide & PyGTK

In wxPython & PyQt when you open a popup and close it, followed by closing main 
window, then application's loop is still running. When you close the main 
window before closing the popup, then you won't be able to close the popup.

In PyGTK & PySide application crashes when opening a popup.

Original issue reported on code.google.com by [email protected] on 8 Jan 2013 at 4:42

  • Merged into: #45

Support for HTML5 audio & video tags

Support for Video & Audio has been removed from CEF 1:

> Due to the loss of audio playback capability in Chromium revision 122508
> and the general lack of playback performance as compared to CEF3 we will 
> discontinue support for the HTML5 audio and video tags in CEF1. We can 
> reconsider this decision in the future if/when a new audio implementation 
> becomes available.

See this issue: http://code.google.com/p/chromiumembedded/issues/detail?id=530

It might still come back in CEF 1, but there is no know date. The solution to 
this problem is to use CEF 3, but there is no python port yet for CEF 3, though 
I plan to work on it in some future.

The solution for now is to use an older release of CEF Python, version 0.37 
should support audio & video:

http://code.google.com/p/cefpython/downloads/detail?name=cefpython_0.37_windows_
py2.7.zip

Branch 1084 (Chrome 19) of CEF 1 supports audio and video, but it would too 
much hassle for me to support 2 different branches.

The best would be to go for CEF Python 3 and have all the latest support for 
Chrome features, but it's a lot of work to do.

Original issue reported on code.google.com by [email protected] on 19 Oct 2012 at 6:34

Add off-screen rendering support + Panda3D example

To add offscreen rendering we will have to expose api for CefWindowInfo & 
CefRenderHandler.

CefRenderHandler has following methods: GetViewRect(), GetScreenRect(), 
GetScreenPoint(), OnPopupShow(), OnPopupSize(), OnPaint(), OnCursorChange().
http://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/include/cef_r
ender_handler.h

CefWindowInfo has with following methods: SetAsOffScreen(), 
SetTransparentPainting(), SetAsChild(), SetAsPopup().
http://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/include/inter
nal/cef_win.h#101

SetAsPopup() is not available on Mac.

In CEF 1 off-screen rendering is available only on Windows & Mac.
There is an issue in the CEF Issue Tracker to add support for Linux:
http://code.google.com/p/chromiumembedded/issues/detail?id=594

In CEF 3 off-screen rendering was added recently and is only available on 
Windows, see the issue in the CEF Issue Tracker for more details:
http://code.google.com/p/chromiumembedded/issues/detail?id=518

Original issue reported on code.google.com by [email protected] on 2 Dec 2012 at 8:11

Current HEAD doesn't compile for CEF3

What steps will reproduce the problem?
1. Sync current head
2. Change the compile time constants to produce CEF3 bindings
3. Follow the build instructions

What is the expected output? What do you see instead?
Expected: Bindings for CEF3 are generated.
Actual: Some compilation errors related to things that are only available when 
CEF_VERSION==1

What version of the product are you using? On what operating system?
Git revision 82835379a6b2

Please provide any additional information below.
Note that I am not 100% certain that this is the correct fix, but it worked 
good enough for me to get the PySide and wxPython examples to run with latest 
head.

Original issue reported on code.google.com by [email protected] on 14 Mar 2013 at 1:06

Attachments:

Provide releases for Python 64-bit

1. Downloaded the 2.7 archive & extracted
2. Opened a command prompt in the cefpython directory
3. Tried the commands 'cefsimple.py' and 'cefadvanced.py'

Here's the output for cefsimple.py:
{{{
Traceback (most recent call last):
  File "cefsimple.py", line 4, in <module>
    import cefpython
ImportError: DLL load failed: %1 is not a valid Win32 application.
}}}

And cefadvanced.py:
{{{
Traceback (most recent call last):
  File "cefadvanced.py", line 5, in <module>
    import cefpython # cefpython.pyd
ImportError: DLL load failed: %1 is not a valid Win32 application.
}}}

The python version:
Python 2.7 (r27:82525, Jul  4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on 
win32

The OS version:
I'm running on Windows 7(x64)

Additional info:
I tried a few things first, including installing pywin32 and wxpython(x64).

After a bit of searching on Google I think I managed to figure out the issue. 
pyd files get compiled to specific architectures. So, if the one you provide in 
the archive is targeted to x32 then a x64 version is also needed. 

I tried loading the samples after deleting cefpython.pyd and the program 
executed without triggering an error but no window was shown. No surprise there 
as the cefpython.CreateBrowser() statement never gets called.

Launching the 'cefwindow.py' command also works without issue. All it loads is 
a blank window.

Hopefully this helps...

Original issue reported on code.google.com by [email protected] on 14 Nov 2012 at 10:39

Expose api to get/set cookies

Create Cookie class for the CefCookie structure.

Expose CefCookieManager methods:
- VisitAllCookies(visitor)
- VisitUrlCookies(url, httponly, visitor)
- SetCookie(url, cookie)
- DeleteCookies(url, cookie_name)

CefCookieManager methods SetCookie/VisitUrlCookies require passing an url, we 
could create a helper method in Frame called SetCookie(cookie) that uses 
frame's current url when calling CefCookieManager.SetCookie().

Original issue reported on code.google.com by [email protected] on 23 Oct 2012 at 8:18

Passing empty string from JS to Python, returns garbage vaule

What steps will reproduce the problem?
1. Send empty string from JS to Python.
2.
3.

What is the expected output? What do you see instead?
In python I get a garbage value, instead of the empty string that was passed.

What version of the product are you using? On what operating system?
cefPython 0.33 running Python 2.7 on Windows 7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Aug 2012 at 8:53

Automation Support in CEF

Guy's, can someone help me with ways to achieve automation testing for content 
(web pages) loaded into CEF browser instances. By Automation, I mean to say 
that if I have a CEF Client app and a page is loaded into a browser area, I 
should be able to put text into text boxes or click buttons etc within the page 
etc.

Just to give an example scenario. Lets say I click some button in the native 
client area and it opens a browser area in the client and loads a page with 
some text fields and buttons. My automation test should be able to click the 
button in the native window to open the page, enter some data in the web page 
fields and click the submit button in the page.

Original issue reported on code.google.com by [email protected] on 9 Nov 2012 at 10:23

seems not to support basic authentication

What steps will reproduce the problem?
1. open a url secured with basic auth

What is the expected output? What do you see instead?
User/Password dialog or Method to implement it


What version of the product are you using? On what operating system?
0.33



Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 6:55

Use public declarations instead of callbacks (cython)

Currently cython functions that are callable from C require writing lots of 
code. We could get rid of all the types defined in clienthandler.h and 
clienthandler.pxd if we used 'public' declarations, that way cython callbacks 
would be visible in C code automatically with no additional code, it would be 
so much easier to port CEF api.

'public' declarations:
http://docs.cython.org/src/userguide/external_C_code.html#public-declarations

Version 0.16 of Cython generates an error when you try to use 'public' or 'api' 
declarations. I've also had some other problems when I tried to use it, but 
these issues have been resolved, and we should evaluate using `public` 
declarations again, it will simplify code much.

New 0.17 version will be released soon, a few days ago there was released 0.17 
beta 3 rc:

https://groups.google.com/forum/?fromgroups=#!topic/cython-users/Tutevv3cSVc

To quote:
> This is our first and hopefully last release candidate for 0.17

Original issue reported on code.google.com by [email protected] on 27 Aug 2012 at 8:26

cefpython 0.48 doesn't work on portable python 2.7.3.1 on windows

Portable Python is a convenient way to distribute python applications across 
Windows users, as there's no need to pre-install anything in advance (including 
PyWin32). However, CEF 0.48 doesn't run on Portable Python environment due to 
lack of some C libraries.

To reproduce: please, get a Portable Python at 
http://www.portablepython.com/wiki/PortablePython2.7.3.1, extract it and try to 
execute cefpython on it.

OS: Windows XP, Windows 7

Original issue reported on code.google.com by [email protected] on 5 Dec 2012 at 11:36

Implement LoadHandler.OnDomReady

UPDATE: Such functionality is implemented in the "ondomready.py" snippet available in the examples/snippets/ directory.

Seems that OnLoadEnd is not the same as DOMContentLoaded, when testing loading of big image it behaves more like window.onload. We need a built-in event when DOM is ready. We should inject javascript to listen for DOMContentLoaded, it is the event used by jQuery.ready().

See this topic on CEF forum for more details:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=10277

Throw JS / Python exceptions according to execution context

Upfront, I know this sounds quite correct, especialy since an uncaught excepton 
will kill an app in python by design, but in JS/Browser/CEF it's a bit 
different, so bare with me...

Here is a trivial example:

We bind this Python function to the browser...
---cut---

def PyFunc(a, b, c):
    return [a, b, c]


--uncut--


And use it like so:

---cut---

var lst = PyFunc(1, 2)


--uncut--

This topples the while app first raising a python exception (logical) and then 
a memory error (possibly related to Issue #2).

Here is the obvious Python error:
'''
TypeError: PyFunc() takes exactly 3 arguments (2 given)
'''

Expected behavior:
- raise a JS exception.

Original issue reported on code.google.com by [email protected] on 28 Aug 2012 at 12:17

Allow to set python object using JavascriptBindings.SetProperty()

Let's say I have a big class with lots of methods, allow me to bind the whole 
object and all its methods with just one line.

{{{
bindings.SetProperty("myobject", myobject)
}}}

In javascript you will be able to call:

{{{
window.myobject.method1()
window.myobject.method2()
window.myobject.method3()
}}}

Also make properties accessible:

{{{
window.myobject.property1
window.myobjevt.property2
}}}

Setting python object should also be possible using Frame.SetProperty().

We can list all methods/properties of a python object using dir():

{{{
class a:
    d = 1
    e = 2
    def b():
            pass
    def c():
            pass
a1 = a()
dir(a)
}}}

Returns:

{{{
['__doc__', '__module__', 'b', 'c', 'd', 'e']
}}}

All methods and properties that do not start with _ (checking single underscore 
should be enough) are considered public and will be made accessible to 
javascript provided that their types is one of:

 * list
 * bool
 * float
 * int
 * None
 * dict
 * string
 * function
 * instancemethod

Original issue reported on code.google.com by [email protected] on 15 Jul 2012 at 11:44

Popup window does not load parent ClientHandler

What steps will reproduce the problem?
1. popup window do not  loaded parent clientHandler

when creating new PyBrowser, this need copy the parent clientHandler
    28      Debug("GetPyBrowser(): creating new PyBrowser, browserId=%s" % browserId)
    29      pyBrowser = PyBrowser()
    30      pyBrowser.cefBrowser = cefBrowser
    31      g_pyBrowsers[browserId] = pyBrowser

my cefpython version:
$git log -1
commit 57c9686ba55171e3b484b043154ef8096be795c7
Author: Czarek Tomczak <[email protected]>
Date:   Fri Dec 14 19:18:03 2012 -0800

    Removed pywin32 dependence from the PYD module (Issue 38).



Original issue reported on code.google.com by [email protected] on 18 Dec 2012 at 10:40

Disable DCHECKs, might hurt performance

Recent releases of cefpython have DCHECKs enabled by default, it might hurt 
performance, a better way is to make it configurable through an option in 
ApplicationSettings.

There is an issue in CEF tracker for new program switches to enable DCHECKs in 
release mode:
http://code.google.com/p/chromiumembedded/issues/detail?id=790

Original issue reported on code.google.com by [email protected] on 26 Nov 2012 at 12:53

Building the client_handler requires Python in a specific location

This is a minor issue and might only affect people which run multiple python 
installations / python installed in the default directory on windows.

What steps will reproduce the problem?
1. Install python into its default location
2. Try compiling the client_handler module using Visual Studio 2008

What is the expected output? What do you see instead?
Expected: client_handler builds without problems.
Actual output: Compiler cannot find python include files.

What version of the product are you using? On what operating system?
Windows 7 32-bit, Python 2.7.2, cefpython revision 82835379a6b2a359

Please provide any additional information below.
Attached is a patch allowing users to configure the location of their python 
include files using the PYTHON_INCLUDE_PATH environment variable.

Original issue reported on code.google.com by [email protected] on 14 Mar 2013 at 11:30

Attachments:

python 3 support

the title say it all: python 3 is out since quite some time, and it would be 
great if cefpython provided python 3 bindings.

Original issue reported on code.google.com by [email protected] on 17 Jul 2012 at 11:15

Use Tkinter for the Http Authentication dialog

Currently http auth dialog is implemented only for windows platform, it uses 
some c++ code and calls win32 native api:

http://code.google.com/p/cefpython/source/browse/cefpython1/httpauth/

Tkinter comes by default with any python, we could use it to display that modal 
dialog on all the platforms (win, mac, linux) using the same code.

Googling "tkinter dialog example" and "tkinter modal dialog" finds us nice 
examples.

Original issue reported on code.google.com by [email protected] on 14 Nov 2012 at 11:05

Implement OnContextReleased(), need to release frames kept in JavascriptBindings.__frames

Currently in V8Contexthandler::OnContextCreated() we save frames that are being 
created to a dictionary JavascriptBindings.__frames, it is needed later when 
calling Rebind() as we need to do rebinding in all frames of all browsers. But 
when browser or frame is destroyed it will result in error when we try to do 
rebinding in this non-existing frame. So we need to remove frames that are 
destroyed from the __frames dictionary, this needs to be done in 
OnContextReleased() of v8contexthandler.

Original issue reported on code.google.com by [email protected] on 22 Sep 2012 at 7:25

Example of loading browser contents from virtual in-memory filesystem (eg. zip file, possibly AES encrypted)

It is required to implement CefSchemeHandler to be able to load content from 
custom scheme.

Next step is to implement AES encryption/decryption using custom key, a tool 
for encryption would be useful. For an example of AES encryption analyze  
Asterclick WBEA sources: http://asterclick.drclue.net/WBEA.html

See this post on CEF forum where I explained how it works:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=3564#p7179

Original issue reported on code.google.com by [email protected] on 27 Sep 2012 at 7:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.