☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Accessing path to app with bokeh serve

Community Supportserver
agilly
agilly

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

⌁   Link to post

End of archived discussion · Replies are disabled