Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100421 > unrolled thread

Re: Screenshots in Sphinx docs

Started byTerry Reedy <tjreedy@udel.edu>
First post2015-12-14 14:01 -0500
Last post2015-12-14 14:01 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Screenshots in Sphinx docs Terry Reedy <tjreedy@udel.edu> - 2015-12-14 14:01 -0500

#100421 — Re: Screenshots in Sphinx docs

FromTerry Reedy <tjreedy@udel.edu>
Date2015-12-14 14:01 -0500
SubjectRe: Screenshots in Sphinx docs
Message-ID<mailman.16.1450119690.14916.python-list@python.org>
On 12/14/2015 11:31 AM, Albert-Jan Roskam wrote:

> I'd like to include up-to-date screenshots (of a tkinter app)
 > into my Sphinx documentation.

If you manually take screenshots with *any* screen grabber and save in 
an appropriate format, this is apparently trivial -- use the ..image 
directive.  From the below, it appears that what you want is to have a 
literally up-to-date screenshot taken automatically during the doc build.

This requires that one be able to automate getting the application into 
the exact display state one wants to capture.  You can probably do that 
with a tkinter app if you write it with that possibility in mind.  In 
particular, you must keep a Python reference to every widget you want to 
manipulate, even if not needed for normal program operation.

There is also an issue with grabbing the whole screen versus only a 
program-specific window.

 > This looks ok:
> https://pypi.python.org/pypi/sphinxcontrib-programscreenshot

This (automatically) takes 'screenshots' on a no-screen (headless) *nix 
system (during doc build) by redirecting X-windows output to a 
pseudo-screen program.  Rather clever, and system-specific.

> BUT I need something that works on Windows (Python 2.7).
 > Can any recommend an approach? I thought about using PIL:

Get the pillow fork/upgrade on pypi.

> http://www.varesano.net/blog/fabio/capturing%20screen%20image%20python%20and%20pil%20windows

Or look into Windows screen grabber programs, of which there are many.

-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web