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


Groups > comp.lang.python > #100482

RE: Screenshots in Sphinx docs

Path csiph.com!eternal-september.org!feeder.eternal-september.org!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail
From Albert-Jan Roskam <sjeik_appie@hotmail.com>
Newsgroups comp.lang.python
Subject RE: Screenshots in Sphinx docs
Date Tue, 15 Dec 2015 22:04:27 +0000
Lines 37
Message-ID <mailman.41.1450217135.22044.python-list@python.org> (permalink)
References <n4n3lr$5a0$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset="windows-1256"
Content-Transfer-Encoding base64
X-Trace news.uni-berlin.de VhLVfd6SBQEVdPf+Mg+w2QYyGraqMrjxhP/S/Dd8Bl2g==
Return-Path <sjeik_appie@hotmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; '(python': 0.05; '(of': 0.07; '-0500': 0.07; 'automate': 0.07; 'sphinx': 0.07; 'directive.': 0.09; 'loaded,': 0.09; 'pil': 0.09; 'url:blog': 0.10; 'python': 0.10; 'jan': 0.11; 'output': 0.13; 'up-to-date': 0.13; 'appropriate': 0.14; '*any*': 0.16; 'build.': 0.16; 'operation.': 0.16; 'pypi.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'screenshots': 0.16; 'wrote:': 0.16; 'app': 0.16; 'widget': 0.18; '&gt;': 0.18; 'windows': 0.20; '2015': 0.20; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.21; 'doc': 0.22; 'mind.': 0.22; 'tkinter': 0.22; 'am,': 0.23; 'appears': 0.23; 'dec': 0.23; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; 'possibility': 0.27; 'format,': 0.27; "skip:' 10": 0.28; 'looks': 0.29; 'url:mailman': 0.30; "i'd": 0.31; 'probably': 0.31; 'date:': 0.31; 'screen': 0.32; 'getting': 0.33; 'url:python': 0.33; 'particular,': 0.33; 'url:listinfo': 0.34; 'something': 0.35; 'subject:': 0.35; 'but': 0.36; 'needed': 0.36; 'there': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'display': 0.37; 'thanks': 0.37; 'thought': 0.37; 'wanted': 0.37; 'application': 0.39; 'takes': 0.39; 'from:': 0.39; 'rather': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'save': 0.60; 'url:%20': 0.63; 'grab': 0.64; 'email name:python-list': 0.67; 'charset:windows-1256': 0.67; 'programs,': 0.72; 'grabbing': 0.84; 'redirecting': 0.84
X-TMN [j37XvF3poJ698dNgMGhzM490cWDXLVpc]
X-Originating-Email [sjeik_appie@hotmail.com]
Importance Normal
In-Reply-To <n4n3lr$5a0$1@ger.gmane.org>
X-OriginalArrivalTime 15 Dec 2015 22:04:27.0618 (UTC) FILETIME=[90DEB420:01D13784]
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:100482

Show key headers only | View raw


> To: python-list@python.org
> From: tjreedy@udel.edu
> Subject: Re: Screenshots in Sphinx docs
> Date: Mon, 14 Dec 2015 14:01:03 -0500
> 
> 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.

I need only a few screens. I think I will call my tkinter app with subprocess.Popen, wait until it's loaded,
grab the image, then kill it. Then I indeed wanted to use the ..image directive.

>  > 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.

Thanks for the tip! So good ol' PIL is no longer maintained?

 
> > 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
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
 		 	   		  

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

RE: Screenshots in Sphinx docs Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2015-12-15 22:04 +0000

csiph-web