I am writing some code for a gui (pyqt5) with which users can write processed data (~10 MB files) to a network drive. When the connection to the network drive is bad, the program freezes in the attempt to write data to the drive.
Therefore the data shall be written locally to the users pc when the connection to the network drive is slow .
Is there a simple way in Python to check if the unsuccessful attempt to access the network drive takes longer than a certain time, or if the connection to the network drive is of low quality?
Thanks for thinking about it with me.
I tried os.path.isdir(path)
but it will not work, because the path is existing but isdir()
will just take a long time to determine if the path is available or not. Therefore my program freezes again.
GISSINI is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.