Python output shows blinking cursor

Viewed 102

It's the third day of trying to solve this problem. a problem with no error!


import os
import pathlib
from datetime import datetime
from PIL import Image
from PIL.ExifTags import TAGS
from win32com.propsys import propsys, pscon
import time


for p in pathlib.Path.cwd().iterdir():
    ext = p.suffix
    tl = ext.lower()
    vid = p.stem + p.suffix
    if p.suffix != '.MOV':
        continue
    else:
        properties = propsys.SHGetPropertyStoreFromParsingName(str(p))
        dt = properties.GetValue(pscon.PKEY_Media_DateEncoded).GetValue()
        t = dt.strftime('%Y-%m-%d_%H-%M-%S')
        mov_name = p.stem
        os.rename(mov_name + p.suffix, t + p.suffix)

So, when executing this script it's doesn't do anything but the cursor or the pointer keeps blinking I waited for a while but nothing happens.


Things I tried

  • I checked processes and nothing suspicious
  • Tried on another 3 different computers but the result is the same.
  • I wrote prints as a test it prints fine before the line of os.rename so it gets through os.rename and then freezes
0 Answers
Related