Вопрос

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

We have tried looking at the .pid property, but it is not present. Also, the .process property is non existant. Both raise an AttributeError error when accessed.

Thanks very much! Any help will be appreciated!

Это было полезно?

Решение

The answer to this situation is to actually use the .pid property on the display object, BUT, it is only present after the display has had the start method called on it. That means, if you need to get the PID for the process, the display has to be started first.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top