attempt at removing tqdm dependency
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import socket
|
||||
import os
|
||||
import tqdm
|
||||
import pynput
|
||||
from pynput.mouse import Button, Controller
|
||||
import time
|
||||
@ -38,7 +37,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:
|
||||
|
||||
|
||||
@ -57,8 +56,6 @@ while True:
|
||||
# update the progress bar
|
||||
f = open(filename, 'wb')
|
||||
f.write(bytes_read)
|
||||
# update the progress bar
|
||||
progress.update(len(bytes_read))
|
||||
f.close()
|
||||
|
||||
g = open(filename, 'r')
|
||||
|
Reference in New Issue
Block a user