Chris on Nostr: Why does: os.getcwd() return 'E:\Documents' but: os.path.join(os.getcwd(), ...
Why does:
os.getcwd() return 'E:\Documents'
but:
os.path.join(os.getcwd(), '\my\path') return 'E:\my\path'??
Even:
os.path.dirname(os.path.abspath(__file__)) returns 'E:\Documents' but does not join properly 🤔
#python
Published at
2024-07-11 10:23:55Event JSON
{
"id": "bc66fe4b36ef300d8997026024285d30d5bfb98d7b4518974edcf2719b0121d0",
"pubkey": "1426cbf32723071b691c22edfe25e6bedcdfd322f42a7f51d842f598ead1cd2f",
"created_at": 1720693435,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://fosstodon.org/users/flipsideza/statuses/112767364989246944",
"activitypub"
]
],
"content": "Why does:\nos.getcwd() return 'E:\\Documents'\n\nbut:\nos.path.join(os.getcwd(), '\\my\\path') return 'E:\\my\\path'??\n\nEven:\nos.path.dirname(os.path.abspath(__file__)) returns 'E:\\Documents' but does not join properly 🤔\n\n#python",
"sig": "981432077626be4f39f966c0579440ef9dcd260b2a9536f1255bcfdde68daec8b6415d8f49838997c2b9618ed7617be0770980746fc1797f0fa4c1b6bb228f01"
}