背景

项目需要做一个客户端的壳,内置浏览器,访问指定 的url

采用技术

开始吧!

python环境配置省略

安装cefpython

pip install cefpython3==66.0

hello world

from cefpython3 import cefpython as cef
import platform
import sys def main():
check_versions()
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
cef.Initialize()
cef.CreateBrowserSync(url="http://www.baidu.com",
window_title="Hello World!")
cef.MessageLoop()
cef.Shutdown() def check_versions():
ver = cef.GetVersion()
print("[hello_world.py] CEF Python {ver}".format(ver=ver["version"]))
print("[hello_world.py] Chromium {ver}".format(ver=ver["chrome_version"]))
print("[hello_world.py] CEF {ver}".format(ver=ver["cef_version"]))
print("[hello_world.py] Python {ver} {arch}".format(
ver=platform.python_version(),
arch=platform.architecture()[0]))
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this" if __name__ == '__main__':
main()

cef打包请查看

https://www.cnblogs.com/qingmiaokeji/p/10893915.html

效果

最新文章

  1. Execution Order of Event Functions
  2. 基于tomcat+spring+mysql搭建的个人博客
  3. Change Or Set Report Object Property At Run Time In Oracle Forms Using Set_Report_Object_Property Command
  4. hdu---(1280)前m大的数(计数排序)
  5. [转] ArcEngine 产生专题图
  6. HOG:从理论到OpenCV实践
  7. Django Web开发【6】使用Ajax增强用户体验
  8. uploadify在IE6下的问题
  9. ionic+AnjularJs实现省市县三级联动效果
  10. 个人附加作业XD --这门课终于结束了~~
  11. shell脚本-2
  12. vector.erase用法注意事项
  13. react+mobx 编写 withStoreHistory 装饰器
  14. Linux服务器---配置nfs
  15. 【题解】Luogu P1503 鬼子进村
  16. DevExpress WPF v18.2新版亮点(一)
  17. java 代码块,静态代码块,构造器等的执行顺序
  18. SQL Server 调优系列基础篇 - 常用运算符总结
  19. JavaScript验证注册信息
  20. Linux时间子系统(十二) periodic tick

热门文章

  1. PHP和MySQL.Web开发(原书第4版)学习盲点笔记
  2. 【Leetcode_easy】788. Rotated Digits
  3. CareerCup Questions List 职业杯题目列表
  4. 定期删除IIS日志文件
  5. vim 中与编码有关的选项
  6. Struts2中action接收中文参数为乱码解决方法
  7. 【谷歌浏览器】修改和添加Cookie
  8. 最新 世纪龙java校招面经 (含整理过的面试题大全)
  9. linux服务器常用密令
  10. Ext 默认时间