-1
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.

By Speece
  • 1
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 18 '22 at 01:59

1 Answers1

0

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
Lenormju
  • 4,078
  • 2
  • 8
  • 22
  • Unfortunately, but the path exists, but python has a problem with this particular folder, because if it uses the path '/ sys / class / backlight /' it shows true, the problem only arises when you want to use it on the path '/ sys / class / backlight / amdgpu_b10 / ' On the other hand, the command line in linux is able to easily point to this folder, open it, etc. – By Speece Feb 08 '22 at 17:25
  • Maybe https://stackoverflow.com/a/29541925/11384184 ? – Lenormju Feb 09 '22 at 08:06