Revisions
-
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ # file_size_tester.py import os import time #from json_writer import write_full_json #while(true) def test_size(full_path_to_file, predicted_size): while(True): try: stats = os.stat(full_path_to_file) found_size = stats.st_size print(found_size) if found_size > 0: percent = float(found_size)/float(predicted_size) # write_full_json(0, wav_name, "wav", percent) print("percet:", percent) if found_size >= predicted_size: break except: print("not found yet") time.sleep(1.0) pass time.sleep(2.0) print("done!!") full_path_to_file = "C:/Users/dealga/Desktop/code/interesting.txt" test_size(full_path_to_file, 45)