Why Can't Python Glob Detect My Thumbdrive (and What Can I Do About It?)
So I got a thumb-drive plugged in. Its at /dev/sdb1. Its got some files on it, and it is mounted. I do >>> glob.glob('/dev/sdb1/*') [] Why is this and what can I do about
Solution 1:
You are globbing on the device file. If you want to access the files, you need to glob on the mount point, which is (depending on your system) probably something like "/run/media/$USER/something", "/media/something" or "/mnt/something", where "something" might be sdb1 or the thumb-drive's partition label.
Solution 2:
"... and it is mounted."
But it is not mounted on /dev/sdb1
; that is simply its device file. Examine the actual mount point to find the files stored on the drive.
Post a Comment for "Why Can't Python Glob Detect My Thumbdrive (and What Can I Do About It?)"