mirror of
https://github.com/9001/copyparty.git
synced 2025-12-27 10:15:16 -05:00
fix termsz on windows
This commit is contained in:
10
bin/u2c.py
10
bin/u2c.py
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
S_VERSION = "2.15"
|
||||
S_BUILD_DT = "2025-10-25"
|
||||
S_VERSION = "2.16"
|
||||
S_BUILD_DT = "2025-12-11"
|
||||
|
||||
"""
|
||||
u2c.py: upload to copyparty
|
||||
@@ -492,6 +492,12 @@ print = safe_print if VT100 else flushing_print
|
||||
|
||||
|
||||
def termsize():
|
||||
try:
|
||||
w, h = os.get_terminal_size()
|
||||
return w, h
|
||||
except:
|
||||
pass
|
||||
|
||||
env = os.environ
|
||||
|
||||
def ioctl_GWINSZ(fd):
|
||||
|
||||
@@ -4175,7 +4175,12 @@ def wrap(txt: str, maxlen: int, maxlen2: int) -> list[str]:
|
||||
|
||||
|
||||
def termsize() -> tuple[int, int]:
|
||||
# from hashwalk
|
||||
try:
|
||||
w, h = os.get_terminal_size()
|
||||
return w, h
|
||||
except:
|
||||
pass
|
||||
|
||||
env = os.environ
|
||||
|
||||
def ioctl_GWINSZ(fd: int) -> Optional[tuple[int, int]]:
|
||||
|
||||
Reference in New Issue
Block a user