Closed thobe closed 13 years ago
I added your code to easyprocess, you should only update this module with easy_install.
Thanks for the contribution.
Yeah, I was wondering if that could have been a good place for it to go, but since I had not used easyprocess directly, only through pyvirtualdisplay, I didn't know if it would be useful there as well. From the examples you added in documentation and the test cases, it looks useful in that scenario.
A common way to use pyvirtualdisplay is to start up a display, do some things with applications in that display, then stop it. It would be nice if the with statement could be used to control the lifecycle of the display in such scenarios. For example:
To support this, the Display class (or one of its super classes) would have to support the context manager protocol, the implementation would probably look something like this: