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


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

RE: Screenshots in Sphinx docs

Started byAlbert-Jan Roskam <sjeik_appie@hotmail.com>
First post2015-12-15 22:04 +0000
Last post2015-12-15 22:04 +0000
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 Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2015-12-15 22:04 +0000

#100482 — RE: Screenshots in Sphinx docs

FromAlbert-Jan Roskam <sjeik_appie@hotmail.com>
Date2015-12-15 22:04 +0000
SubjectRE: Screenshots in Sphinx docs
Message-ID<mailman.41.1450217135.22044.python-list@python.org>
> 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
 		 	   		  

[toc] | [standalone]


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


csiph-web