Skip to content

Commit

Permalink
fix pypad_git
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Feb 24, 2024
1 parent 93a0eac commit cc62dfc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/pygbag/support/cpythonrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ def log(*argv, **kw):

async def import_site(__file__, run=True):
import builtins

if builtins.LOCK:
platform.window.console.error("1473: import_site IS NOT RE ENTRANT")
return
Expand Down Expand Up @@ -1643,4 +1644,4 @@ async def main():
shell.interactive(prompt=True)
return None
finally:
LOCK = False
builtins.LOCK = False
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 @@ -238,7 +238,7 @@ async def async_repos():
print(
f"""
=============== REDIRECTION TO DEV HOST {repo['-CDN-']} ================
====== REDIRECT TO DEV HOST {repo['-CDN-']} ========
{abitag=}
{apitag=}
Expand Down
13 changes: 10 additions & 3 deletions static/pythons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1036,15 +1036,22 @@ async function feat_vtx(debug_hidden) {
document.body.appendChild(terminal)
}

var console_divider = 1
const cols = get_terminal_cols()
const cons = get_terminal_console()
var cons = get_terminal_console()
if (cons<0) {
console_divider = -cons
cons = 0
}

const { WasmTerminal } = await import("./vtx.js")
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
if (lines<=33) {
fntsize = ( fntsize - 5 ) / console_divider
}

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

0 comments on commit cc62dfc

Please sign in to comment.