[Tutor] Taking a screenshot
alan.gauld@bt.com
alan.gauld@bt.com
Mon Jan 6 14:41:09 2003
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C2B5B2.B36CB21F
Content-Type: text/plain;
charset="iso-8859-1"
> Is it possible to use Python to take a screenshot of the script-user's
screen
> and then save it in some popular image format?
That would be incredibly system dependant. Its the same problem as trying to
clear the
screen - how can Python know what kind of screen the user has? eg. How do
you take a
screen shot of a paper teletype?
Or what about a server which doesn't have a screen?
> I did some searching for an answer but couldn't find any module that
would help me
> do it or any instructions on how to. Are there any suggestions? Thanks in
advance.
It might be possible to set up a 3rd party tool to do so using os.system()
Thats the best I can think of.
Alan g.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld/
<http://www.freenetpages.co.uk/hp/alan.gauld/>
------_=_NextPart_001_01C2B5B2.B36CB21F
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003><FONT color=#0000ff>> </FONT></SPAN>Is it
possible to use Python to take a screenshot of the script-user’s
screen <SPAN class=897423018-06012003><FONT
color=#0000ff> </FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003><FONT color=#0000ff>> </FONT> </SPAN>and then
save it in some popular image format? <SPAN class=897423018-06012003><FONT
color=#0000ff> </FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003>That would be incredibly system dependant. Its the same
problem as trying to clear the </SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003>screen - how can Python know what kind of screen the
user has? eg. How do you take a </SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003>screen shot of a paper teletype?</SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003>Or what about a server which doesn't have a
screen?</SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN><FONT face=Arial><FONT size=2>><SPAN
class=897423018-06012003><FONT color=#0000ff> </FONT></SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I did some searching for an answer
but couldn’t find any module that would help me <SPAN
class=897423018-06012003><FONT
color=#0000ff> </FONT></SPAN></SPAN></FONT></FONT></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003><FONT color=#0000ff>> </FONT> </SPAN>do it or
any instructions on how to. Are there any suggestions? Thanks in advance.<SPAN
class=897423018-06012003><FONT color=#0000ff> </FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003><FONT color=#0000ff>It might be possible to set up a
3rd party tool to do so using os.system()</FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003><FONT color=#0000ff>Thats the best I can think
of.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003></SPAN></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
class=897423018-06012003>
<P><FONT face="Courier New" size=2>Alan g.</FONT> <BR><FONT face="Courier New"
size=2>Author of the Learn to Program website</FONT> <BR><FONT
face="Courier New" size=2><A target=_blank
href="http://www.freenetpages.co.uk/hp/alan.gauld/">http://www.freenetpages.co.uk/hp/alan.gauld/</A></FONT>
</P></SPAN></SPAN></DIV></BODY></HTML>
------_=_NextPart_001_01C2B5B2.B36CB21F--