[Tutor] slearing the screen
Josh Gregorio
jgregorio@ultrasw.com
Wed, 24 Apr 2002 11:10:46 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C1EB80.AEFAD560
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I think you can use chr() and ord() to switch between ascii characters =
and their numbers.
>>>chr(35)
'#'
>>>ord('#')
35
>>>chr(33)
'!'
>>>ord('!')
33
Josh
----- Original Message -----=20
From: Cameron Stoner=20
To: python tutor=20
Sent: Sunday, April 21, 2002 4:10 PM
Subject: [Tutor] slearing the screen
Hi all,
=20
How do you clear the screen? Is there a command like in C++ to clear =
the screen in Python? Also is there a function for turning numbers and =
letters into ASCII? I have been going through the modules without much =
luck.
=20
Thanks for any help,
Cameron Stoner
------=_NextPart_000_000C_01C1EB80.AEFAD560
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I think you can use chr() and ord() to =
switch=20
between ascii characters and their numbers.</FONT></DIV>
<DIV><FONT face=3DArial>>>>chr(35)</FONT></DIV>
<DIV><FONT face=3DArial>'#'</FONT></DIV>
<DIV><FONT face=3DArial>>>>ord('#')</FONT></DIV>
<DIV><FONT face=3DArial>35</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>>>>chr(33)</FONT></DIV>
<DIV><FONT face=3DArial>'!'</FONT></DIV>
<DIV><FONT face=3DArial>>>>ord('!')</FONT></DIV>
<DIV><FONT face=3DArial>33</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial>Josh</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:wolf_binary@hotmail.com" =
title=3Dwolf_binary@hotmail.com>Cameron=20
Stoner</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:tutor@python.org"=20
title=3Dtutor@python.org>python tutor</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, April 21, 2002 =
4:10=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Tutor] slearing the=20
screen</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>How do you clear the screen? Is =
there a=20
command like in C++ to clear the screen in Python? Also is there =
a=20
function for turning numbers and letters into ASCII? I have been =
going=20
through the modules without much luck.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for any help,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Cameron=20
Stoner</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_000C_01C1EB80.AEFAD560--