How to get process PID when using XVFB through Pyvirtualdisplay?

Trying to find the PID of a Display object when creating it using Pyvirtualdisplay. Display virtual framebuffer Xvfb.

We tried to look at the .pid property, but it is not. In addition, the .process property .process not exist. Both raise an AttributeError on access.

Many thanks! Any help would be appreciated!

+4
source share
1 answer

The answer to this situation lies in the actual use of the .pid property on the .pid object, BUT, it is present only after the start method appears on the display. This means that if you need to get the PID for the process, you first need to start the display.

+2
source

All Articles