attempt at removing tqdm dependency

This commit is contained in:
CactiChameleon9
2020-12-10 08:32:59 +00:00
parent bd417edb89
commit 4eb152b8aa
8 changed files with 12 additions and 33 deletions

View File

@ -1,6 +1,5 @@
import socket
import os
import tqdm
import pynput
from pynput.keyboard import Key, Controller
#press
@ -36,7 +35,7 @@ filename = os.path.basename(filename)
filesize = int(filesize)
# start receiving the file from the socket
# and writing to the file stream
progress = tqdm.tqdm(range(filesize), f"Receiving {filename}", unit="B", unit_scale=True, unit_divisor=1024)
progress = "_"
#with open(filename, "wb") as f:
@ -55,7 +54,6 @@ while True:
f = open(filename, 'wb')
f.write(bytes_read)
# update the progress bar
progress.update(len(bytes_read))
f.close()
g = open(filename, 'r')