是否有任何选项可以分块加载泡菜文件?
我知道我们可以将数据保存在 CSV 中并分块加载。但是除了 CSV 之外,是否有任何选项可以以块的形式加载泡菜文件或任何 Python 本机文件?
Edit: The below answer to use keyboard.on_press(callback, suppress=False) works fine in ubuntu without any issues. But in Redhat/Amazon linux, it fails to work.
I have used the code snippet from this thread
import keyboard # using module keyboard
while True: # making a loop
try: # used try so that if user pressed other than the given key error will not be shown
if keyboard.is_pressed('q'): # if key 'q' is pressed
print('You Pressed A Key!')
break # finishing the …Run Code Online (Sandbox Code Playgroud) python ×2
amazon-linux ×1
chunks ×1
csv ×1
file ×1
keypress ×1
pickle ×1
python-3.x ×1
redhat ×1