3

I have made some folder synchronization program in the last week that I wanted to primarily deploy to have an easy way to update security copies at an external harddrive or my phone, instead of having to delete all and copy all, which can take time with files in thousands and gigabytes every time. The program was already finished and worked in my diverse testing series, with one fatal flaw: I only tested it on the computer itself, but when I finally wanted to copy the real data, I had to find that the tkinter dialog would not recognize any external device. Here a screen showing the device in explorer and missing in the dialog window: enter image description here

I searched around for a while and it seems that the tkinter solution is simply functionally impoverished and incomplete, so I will have to look somewhere else. In one answer someone recommended to write your own folder selection dialog somewhere, but I have not yet found guidance how to do so.(e.g. is there a os function I could summon? perhaps a module that offers more control?) Maybe tkinter can even be saved, though I doubt it.

RiiNagaja
  • 92
  • 9
  • It is a device, not a disk. You cannot see it event in the "Disk Managemnt" of Windows "Computer Management". – acw1668 Nov 29 '21 at 13:01

1 Answers1

1

If you are using external device over USB, you can try PyUSB for a cross-platform approach. The PyUSB module provides for Python easy access to the host machine's Universal Serial Bus (USB) system. Or, you can try to use PyWin32 to call the Windows API.

Thyrus
  • 458
  • 2
  • 13
  • Thus wont change the fact of no been able to use tkinters filedialog. Also why dont you approach pathlib or the os modul rather than external libaries? – Thingamabobs Nov 29 '21 at 12:39
  • @Thingamabobs agree, that can work too. – Thyrus Nov 29 '21 at 12:44
  • @Thingamabobs How can the os module do this? I had searched this specifically before the question, but I always only find people recommending to handle folder selection with tkinter. – RiiNagaja Nov 29 '21 at 17:07