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/ --args arg1 arg2 .. argn and sys.argv[0] just contains, since the server strips the path from its argument. Is there a way to access path/to/ without passing it as an extra argument?



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

That did the trick, thanks.