Currently, it's pretty much impossible to get the name of currently opened file with Python. Some time ago, I investigated a rather complicated and not very reliable
Windows-only method.
Since a Plugin Runner code update probably wouldn't be easy, I'm wondering about a different approach: would it be possible to have Sigil write the name of the epub file to the
recentfile sigil.ini entry
upon opening the epub file?
Plugin developers could then simply parse sigil.ini with
configparser to get the file name. Since Sigil writes the file name to sigil.ini anyway whenever a file is closed this
shouldn't require major code changes.