I use pystray in a multi-platform application where there may or may not be a GUI present. On platforms that have no GUI toolkit available, pystray throws an ImportError when it is imported. This is fine, but means that it is harder to use the same code on multiple platforms without detecting GUI support before importing pystray.
Commit 5176d26 added the option to use an environment variable PYSTRAY_BACKEND to explicitly set the backend, which was very helpful to allow the same code to work across multiple platforms. Although it was not explicitly documented, using a value of dummy meant that it was much easier to use the same code whether a GUI was present or not. With this variable set, the pystray import succeeds, and I just don't load the icon if there is no GUI toolkit present.
Handling of this environment variable was updated in 2ca3445 to explicitly enumerate valid backend options. In the process, this broke the usage of dummy. Could this be updated so that the dummy backend is again supported (on all platforms) to allow importing of pystray even if there is no GUI toolkit present?
I use pystray in a multi-platform application where there may or may not be a GUI present. On platforms that have no GUI toolkit available, pystray throws an
ImportError
when it is imported. This is fine, but means that it is harder to use the same code on multiple platforms without detecting GUI support before importing pystray.Commit 5176d26 added the option to use an environment variable
PYSTRAY_BACKEND
to explicitly set the backend, which was very helpful to allow the same code to work across multiple platforms. Although it was not explicitly documented, using a value ofdummy
meant that it was much easier to use the same code whether a GUI was present or not. With this variable set, the pystray import succeeds, and I just don't load the icon if there is no GUI toolkit present.Handling of this environment variable was updated in 2ca3445 to explicitly enumerate valid backend options. In the process, this broke the usage of
dummy
. Could this be updated so that the dummy backend is again supported (on all platforms) to allow importing of pystray even if there is no GUI toolkit present?