How do I get the path of a Python script I am running in? I was doing dirname(sys.argv[0]), however, on Mac, I only get the filename - not the full path as I do on Windows.
No matter where my application is launched from, I want to open files that are relative to my script file(s).