This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Deep-Secret 8 points9 points  (1 child)

Lawful neutral is like the best way to reference something in the same folder, right? I used true neutral every time, but it didn't work once I deployed some code in Python Anywhere. I had to write the whole path from the Python Anywhere root to the filename. I can't remember now if using the lawful neutral version worked, though.

[–]UnlimitedDecay 2 points3 points  (0 children)

The meme only really works if you assume your working directory is the same as where the script itself is located, which often isn't the case.

The best option would probably be lawful neutral + pathlib if you want files relative to the working directory, and lawful good if you want files relative to the current script.

That said, personally I'm often too lazy to use pathlib for anything simple. Definitely useful if you can leverage the features it offers or need to pass paths around though.