Accessing path to app with bokeh serve

Before switching to a server app, my standalone bokeh script used os.path.dirname(sys.argv[0]) to access the directory where it was located. Now I am doing bokeh serve path/to/single_file_app.py --args arg1 arg2 .. argn and sys.argv[0] just contains single_file_app.py, since the server strips the path from its argument. Is there a way to access path/to/ without passing it as an extra argument?

TIA,

Arthur

You should be able to use os.path.dirname(__file__).

That did the trick, thanks.