Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What pits should be paid attention to when Pyinstaller packages eel and pygame?

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

< eel._py_functions.length; i++) { let name = eel._py_functions[i]; eel[name] = function() { let call_object = eel._call_object(name, arguments); eel._mock_queue.push(call_object); return eel._call_return(call_object); } } }, _import_py_function: function(name) { let func_name = name; eel[name] = function() { let call_object = eel._call_object(func_name, arguments); eel._websocket.send(eel._toJSON(call_object)); return eel._call_return(call_object); } }, _call_number: 0, _call_return_callbacks: {}, _call_object: function(name, args) { let arg_array = []; for(let i = 0; i < args.length; i++){ arg_array.push(args[i]); } let call_id = (eel._call_number += 1) + Math.random(); return {'call': call_id, 'name': name, 'args': arg_array}; }, _sleep: function(ms) { return new Promise(resolve =>

SetTimeout (resolve, ms);}, _ toJSON: function (obj) {return JSON.stringify (obj, (k, v) = > v = undefined? Null: v);}, _ call_return: function (call) {return function (callback = null) {if (callback! = null) {eel._call_return_ callbacks [call.call] = callback;} else {return new Promise (function (resolve) {eel._call_return_ callbacks [call.call] = resolve });}, _ position_window: function (page) {let size = eel._start_geometry ['default'] .size; let position = eel._start_geometry [' default'] .position; if (page in eel._start_geometry.pages) {size = eel._start_ geometry.pages [page] .size Position = eel._start_ geometry.pages.position;} if (size! = null) {window.resizeTo (size [0], size [1]);} if (position! = null) {window.moveTo (position [0], position [1]);}}, _ init: function () {eel._mock_py_functions () Document.addEventListener ("DOMContentLoaded", function (event) {let page= _ window.location.pathname.substring (1); eel._position_window (page); let websocket_addr = (eel._host +'/ eel'). Replace ('http',' ws'); websocket_addr + = ('? page=' + page); eel._websocket = new WebSocket (websocket_addr) Eel._websocket.onopen = function () {for (let I = 0; I)

< eel._py_functions.length; i++){ let py_function = eel._py_functions[i]; eel._import_py_function(py_function); } while(eel._mock_queue.length >

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report