python - How to execute other commands during input()? -


so here code data = input('--').encode() , want run print(s.recv(1024).decode()) whilst input being filled in , whilst things in program happening need code ran every 0.1 seconds or so.

there 1 general way trying do, , quite complicated.

the input() function pauses program, way else @ same time make computer run 2 things @ same time. threading advanced concept , can cause many issues in programs if not done correctly, useful thing know how do, in python, since can dramatically increase speed of programs running, , python 1 of slower languages, 1 of many prices of easy-to-use languages.

i suggest learn of python's basics, gain year or 2 of experience, , learn threading. refer following website learn how use threads:

https://docs.python.org/3/library/threading.html


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -