How to specify a file path within the Python shell

FYI, __file__ support has been added in the python shell.

You can try it in ParaView 5.8.