Paul Hoffman on Nostr: #python friends: pathlib has inherited the functionality of lots of things from os ...
#python friends: pathlib has inherited the functionality of lots of things from os and os.path, but not from tempfile. Shouldn't there be something like Path.mkstemp() and Path.mkdtemp() or, at a minimum, Path.gettempdir()? It's not hard to do this as a two-step, but it just seems like it should have been there by now.
Published at
2024-12-13 02:17:36Event JSON
{
"id": "2c030d0fd0f85b0d295504f0f413cadc7cf7e25cfd47f748cfeb464417623037",
"pubkey": "c1fc3d819699d21c77bb73a283ce53f296a8d2147f740685a35a9d4396acc1fa",
"created_at": 1734056256,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://infosec.exchange/users/paulehoffman/statuses/113643110826881851",
"activitypub"
]
],
"content": "#python friends: pathlib has inherited the functionality of lots of things from os and os.path, but not from tempfile. Shouldn't there be something like Path.mkstemp() and Path.mkdtemp() or, at a minimum, Path.gettempdir()? It's not hard to do this as a two-step, but it just seems like it should have been there by now.",
"sig": "ac9dc65c1863cf7f109eb46e8754bdcf84adf963cadba81f362329f271fd97092abfcacc83c379b6a078bb8fd3abf07c73a7838d0f1de9449586c40c6484280d"
}