The following should work for Linux and Windows. This will be a list of all drives, not just external ones!
import subprocess import sys
The above method for Linux is very rude and returns disks like sys and procfs , etc., if you want something more finely tuned, look into the request using python-dbus .
Oz123
source share