'Python os.pathislink, exists and isdir dont work

amd_path = '/sys/class/backlight/amdgpu_b10/'
amd_gpu = os.path.islink(amd_path)

On this path, the script always shows false whether it uses exist, islink, isdir shows false, can anyone help? Unfortunately, my research did not help me.



Solution 1:[1]

Maybe it actually does not exist ?

>>> os.path.exists("/does-not-exist")
False
>>> os.path.islink("/does-not-exist")
False
>>> os.path.isdir("/does-not-exist")
False

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lenormju