Timeline for Persist keyboard backlight color on Linux laptop
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 13, 2021 at 21:28 | comment | added | Toby Speight |
Yes, I meant to mention that we weren't using the portability that path.join() was created for. I've updated now.
|
|
Jan 13, 2021 at 21:27 | history | edited | Toby Speight | CC BY-SA 4.0 |
Mention portability as a non-requirement here
|
Jan 13, 2021 at 21:20 | comment | added | ShapeOfMatter |
Agreed; it's odd that os.path doesn't give a way of building absolute paths. On the other hand, the script at hand wouldn't be relevant outside of the one particular system, so portability is less of a concern :)
|
|
Jan 13, 2021 at 17:08 | comment | added | Toby Speight |
It still seems somewhat odd, in that we're using path.join() which abstracts away the separator char, but then mixing literal / back in. Just an opinion, anyway.
|
|
Jan 13, 2021 at 16:27 | comment | added | ShapeOfMatter |
Thanks. I think that, while path.join is maybe overkill here, it's a normal way of working with paths. On the other hand, the mixing of string-concat and path.join is weird. Reading the docs again, I guess path.join('/', 'sys', 'class', 'leds', 'system76_acpi::kbd_backlight', '') would be proper?
|
|
Jan 11, 2021 at 13:55 | history | answered | Toby Speight | CC BY-SA 4.0 |