Skip to content

Commit

Permalink
fix py2.py3 import thx @electronstudio
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Feb 21, 2024
1 parent f85dfd1 commit cc63d7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pygbag/support/cross/aio/pep0723.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ async def pip_install(pkg, sysconf={}):
if html:
for line in html.readlines():
if line.find("href=") > 0:
if line.find("-py3-none-any.whl") > 0:
if line.find("py3-none-any.whl") > 0:
wheel_url = line.split('"', 2)[1]
else:
print("283: ERROR: cannot find package :", pkg)
Expand Down
10 changes: 7 additions & 3 deletions static/pythons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1036,16 +1036,20 @@ async function feat_vtx(debug_hidden) {
document.body.appendChild(terminal)
}

const cols = get_terminal_cols()
const cons = get_terminal_console()
const { WasmTerminal } = await import("./vtx.js")
const lines = get_terminal_lines() + get_terminal_console() // including virtual get_terminal_console()
const lines = get_terminal_lines() + cons // including virtual get_terminal_console()
const py = window.document.body.clientHeight
var fntsize = Math.floor(py/lines) - 1

if (lines<=33)
fntsize = fntsize - 5

console.warn("fnt:",window.document.body.clientHeight ,"/", lines,"=", fntsize)
console.warn("fnt:",window.document.body.clientHeight ,"/", lines,"=", fntsize, " Cols:", cols, "Cons:", cons)
vm.vt = new WasmTerminal(
"terminal",
get_terminal_cols(),
cols,
lines,
fntsize,
config.fbdev,
Expand Down

0 comments on commit cc63d7c

Please sign in to comment.