/opt/imh-python/lib/python3.9/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc57840644editdlrm
abc.cpython-39.opt-2.pyc32250644editdlrm
abc.cpython-39.pyc57840644editdlrm
aifc.cpython-39.opt-1.pyc252750644editdlrm
aifc.cpython-39.opt-2.pyc200680644editdlrm
aifc.cpython-39.pyc252750644editdlrm
antigravity.cpython-39.opt-1.pyc8280644editdlrm
antigravity.cpython-39.opt-2.pyc6840644editdlrm
antigravity.cpython-39.pyc8280644editdlrm
argparse.cpython-39.opt-1.pyc633120644editdlrm
argparse.cpython-39.opt-2.pyc539480644editdlrm
argparse.cpython-39.pyc634230644editdlrm
ast.cpython-39.opt-1.pyc522640644editdlrm
ast.cpython-39.opt-2.pyc437960644editdlrm
ast.cpython-39.pyc523150644editdlrm
asynchat.cpython-39.opt-1.pyc68310644editdlrm
asynchat.cpython-39.opt-2.pyc54560644editdlrm
asynchat.cpython-39.pyc68310644editdlrm
asyncore.cpython-39.opt-1.pyc160450644editdlrm
asyncore.cpython-39.opt-2.pyc148410644editdlrm
asyncore.cpython-39.pyc160450644editdlrm
base64.cpython-39.opt-1.pyc163320644editdlrm
base64.cpython-39.opt-2.pyc108120644editdlrm
base64.cpython-39.pyc164640644editdlrm
bdb.cpython-39.opt-1.pyc245490644editdlrm
bdb.cpython-39.opt-2.pyc155120644editdlrm
bdb.cpython-39.pyc245490644editdlrm
binhex.cpython-39.opt-1.pyc129740644editdlrm
binhex.cpython-39.opt-2.pyc124400644editdlrm
binhex.cpython-39.pyc129740644editdlrm
bisect.cpython-39.opt-1.pyc23590644editdlrm
bisect.cpython-39.opt-2.pyc10470644editdlrm
bisect.cpython-39.pyc23590644editdlrm
bz2.cpython-39.opt-1.pyc115540644editdlrm
bz2.cpython-39.opt-2.pyc65380644editdlrm
bz2.cpython-39.pyc115540644editdlrm
calendar.cpython-39.opt-1.pyc270400644editdlrm
calendar.cpython-39.opt-2.pyc224480644editdlrm
calendar.cpython-39.pyc270400644editdlrm
cgi.cpython-39.opt-1.pyc264910644editdlrm
cgi.cpython-39.opt-2.pyc180650644editdlrm
cgi.cpython-39.pyc264910644editdlrm
cgitb.cpython-39.opt-1.pyc101950644editdlrm
cgitb.cpython-39.opt-2.pyc85960644editdlrm
cgitb.cpython-39.pyc101950644editdlrm
chunk.cpython-39.opt-1.pyc48500644editdlrm
chunk.cpython-39.opt-2.pyc27060644editdlrm
chunk.cpython-39.pyc48500644editdlrm
cmd.cpython-39.opt-1.pyc126850644editdlrm
cmd.cpython-39.opt-2.pyc72600644editdlrm
cmd.cpython-39.pyc126850644editdlrm
code.cpython-39.opt-1.pyc99250644editdlrm
code.cpython-39.opt-2.pyc46540644editdlrm
code.cpython-39.pyc99250644editdlrm
codecs.cpython-39.opt-1.pyc338970644editdlrm
codecs.cpython-39.opt-2.pyc183250644editdlrm
codecs.cpython-39.pyc338970644editdlrm
codeop.cpython-39.opt-1.pyc64670644editdlrm
codeop.cpython-39.opt-2.pyc24070644editdlrm
codeop.cpython-39.pyc64670644editdlrm
colorsys.cpython-39.opt-1.pyc32690644editdlrm
colorsys.cpython-39.opt-2.pyc26630644editdlrm
colorsys.cpython-39.pyc32690644editdlrm
compileall.cpython-39.opt-1.pyc125970644editdlrm
compileall.cpython-39.opt-2.pyc93380644editdlrm
compileall.cpython-39.pyc125970644editdlrm
configparser.cpython-39.opt-1.pyc458780644editdlrm
configparser.cpython-39.opt-2.pyc307380644editdlrm
configparser.cpython-39.pyc458780644editdlrm
contextlib.cpython-39.opt-1.pyc195370644editdlrm
contextlib.cpython-39.opt-2.pyc139520644editdlrm
contextlib.cpython-39.pyc195470644editdlrm
contextvars.cpython-39.opt-1.pyc2540644editdlrm
contextvars.cpython-39.opt-2.pyc2540644editdlrm
contextvars.cpython-39.pyc2540644editdlrm
copy.cpython-39.opt-1.pyc69830644editdlrm
copy.cpython-39.opt-2.pyc46690644editdlrm
copy.cpython-39.pyc69830644editdlrm
copyreg.cpython-39.opt-1.pyc44200644editdlrm
copyreg.cpython-39.opt-2.pyc36180644editdlrm
copyreg.cpython-39.pyc44390644editdlrm
cProfile.cpython-39.opt-1.pyc51040644editdlrm
cProfile.cpython-39.opt-2.pyc46430644editdlrm
cProfile.cpython-39.pyc51040644editdlrm
crypt.cpython-39.opt-1.pyc35220644editdlrm
crypt.cpython-39.opt-2.pyc28600644editdlrm
crypt.cpython-39.pyc35220644editdlrm
csv.cpython-39.opt-1.pyc118580644editdlrm
csv.cpython-39.opt-2.pyc98170644editdlrm
csv.cpython-39.pyc118580644editdlrm
dataclasses.cpython-39.opt-1.pyc231940644editdlrm
dataclasses.cpython-39.opt-2.pyc197550644editdlrm
dataclasses.cpython-39.pyc231940644editdlrm
datetime.cpython-39.opt-1.pyc569650644editdlrm
datetime.cpython-39.opt-2.pyc485210644editdlrm
datetime.cpython-39.pyc581060644editdlrm
decimal.cpython-39.opt-1.pyc3680644editdlrm
decimal.cpython-39.opt-2.pyc3680644editdlrm
decimal.cpython-39.pyc3680644editdlrm
difflib.cpython-39.opt-1.pyc596080644editdlrm
difflib.cpython-39.opt-2.pyc250350644editdlrm
difflib.cpython-39.pyc596300644editdlrm
dis.cpython-39.opt-1.pyc158290644editdlrm
dis.cpython-39.opt-2.pyc120220644editdlrm
dis.cpython-39.pyc158290644editdlrm
doctest.cpython-39.opt-1.pyc758080644editdlrm
doctest.cpython-39.opt-2.pyc405020644editdlrm
doctest.cpython-39.pyc760150644editdlrm
enum.cpython-39.opt-1.pyc260290644editdlrm
enum.cpython-39.opt-2.pyc211070644editdlrm
enum.cpython-39.pyc260290644editdlrm
filecmp.cpython-39.opt-1.pyc86310644editdlrm
filecmp.cpython-39.opt-2.pyc60930644editdlrm
filecmp.cpython-39.pyc86310644editdlrm
fileinput.cpython-39.opt-1.pyc137990644editdlrm
fileinput.cpython-39.opt-2.pyc81910644editdlrm
fileinput.cpython-39.pyc137990644editdlrm
fnmatch.cpython-39.opt-1.pyc38790644editdlrm
fnmatch.cpython-39.opt-2.pyc26710644editdlrm
fnmatch.cpython-39.pyc39510644editdlrm
formatter.cpython-39.opt-1.pyc175480644editdlrm
formatter.cpython-39.opt-2.pyc151080644editdlrm
formatter.cpython-39.pyc175480644editdlrm
fractions.cpython-39.opt-1.pyc180580644editdlrm
fractions.cpython-39.opt-2.pyc108580644editdlrm
fractions.cpython-39.pyc180580644editdlrm
ftplib.cpython-39.opt-1.pyc287030644editdlrm
ftplib.cpython-39.opt-2.pyc185590644editdlrm
ftplib.cpython-39.pyc287030644editdlrm
functools.cpython-39.opt-1.pyc282850644editdlrm
functools.cpython-39.opt-2.pyc215640644editdlrm
functools.cpython-39.pyc282850644editdlrm
genericpath.cpython-39.opt-1.pyc40330644editdlrm
genericpath.cpython-39.opt-2.pyc28970644editdlrm
genericpath.cpython-39.pyc40330644editdlrm
getopt.cpython-39.opt-1.pyc62510644editdlrm
getopt.cpython-39.opt-2.pyc36970644editdlrm
getopt.cpython-39.pyc62690644editdlrm
getpass.cpython-39.opt-1.pyc42090644editdlrm
getpass.cpython-39.opt-2.pyc30230644editdlrm
getpass.cpython-39.pyc42090644editdlrm
gettext.cpython-39.opt-1.pyc180820644editdlrm
gettext.cpython-39.opt-2.pyc173910644editdlrm
gettext.cpython-39.pyc180820644editdlrm
glob.cpython-39.opt-1.pyc45140644editdlrm
glob.cpython-39.opt-2.pyc36540644editdlrm
glob.cpython-39.pyc45530644editdlrm
graphlib.cpython-39.opt-1.pyc75310644editdlrm
graphlib.cpython-39.opt-2.pyc40950644editdlrm
graphlib.cpython-39.pyc75770644editdlrm
gzip.cpython-39.opt-1.pyc185030644editdlrm
gzip.cpython-39.opt-2.pyc146360644editdlrm
gzip.cpython-39.pyc185030644editdlrm
hashlib.cpython-39.opt-1.pyc67000644editdlrm
hashlib.cpython-39.opt-2.pyc61320644editdlrm
hashlib.cpython-39.pyc67000644editdlrm
heapq.cpython-39.opt-1.pyc140490644editdlrm
heapq.cpython-39.opt-2.pyc110330644editdlrm
heapq.cpython-39.pyc140490644editdlrm
hmac.cpython-39.opt-1.pyc68090644editdlrm
hmac.cpython-39.opt-2.pyc42920644editdlrm
hmac.cpython-39.pyc68090644editdlrm
imaplib.cpython-39.opt-1.pyc402400644editdlrm
imaplib.cpython-39.opt-2.pyc275570644editdlrm
imaplib.cpython-39.pyc424210644editdlrm
imghdr.cpython-39.opt-1.pyc41490644editdlrm
imghdr.cpython-39.opt-2.pyc38340644editdlrm
imghdr.cpython-39.pyc41490644editdlrm
imp.cpython-39.opt-1.pyc98600644editdlrm
imp.cpython-39.opt-2.pyc74950644editdlrm
imp.cpython-39.pyc98600644editdlrm
inspect.cpython-39.opt-1.pyc811460644editdlrm
inspect.cpython-39.opt-2.pyc560400644editdlrm
inspect.cpython-39.pyc813880644editdlrm
io.cpython-39.opt-1.pyc34170644editdlrm
io.cpython-39.opt-2.pyc19280644editdlrm
io.cpython-39.pyc34170644editdlrm
ipaddress.cpython-39.opt-1.pyc625020644editdlrm
ipaddress.cpython-39.opt-2.pyc377390644editdlrm
ipaddress.cpython-39.pyc625020644editdlrm
keyword.cpython-39.opt-1.pyc9250644editdlrm
keyword.cpython-39.opt-2.pyc5210644editdlrm
keyword.cpython-39.pyc9250644editdlrm
linecache.cpython-39.opt-1.pyc40360644editdlrm
linecache.cpython-39.opt-2.pyc28040644editdlrm
linecache.cpython-39.pyc40360644editdlrm
locale.cpython-39.opt-1.pyc347050644editdlrm
locale.cpython-39.opt-2.pyc300870644editdlrm
locale.cpython-39.pyc347050644editdlrm
lzma.cpython-39.opt-1.pyc121030644editdlrm
lzma.cpython-39.opt-2.pyc59050644editdlrm
lzma.cpython-39.pyc121030644editdlrm
mailbox.cpython-39.opt-1.pyc605550644editdlrm
mailbox.cpython-39.opt-2.pyc539510644editdlrm
mailbox.cpython-39.pyc606090644editdlrm
mailcap.cpython-39.opt-1.pyc65180644editdlrm
mailcap.cpython-39.opt-2.pyc50010644editdlrm
mailcap.cpython-39.pyc65180644editdlrm
mimetypes.cpython-39.opt-1.pyc160520644editdlrm
mimetypes.cpython-39.opt-2.pyc100370644editdlrm
mimetypes.cpython-39.pyc160520644editdlrm
modulefinder.cpython-39.opt-1.pyc160910644editdlrm
modulefinder.cpython-39.opt-2.pyc151820644editdlrm
modulefinder.cpython-39.pyc161370644editdlrm
netrc.cpython-39.opt-1.pyc37920644editdlrm
netrc.cpython-39.opt-2.pyc35540644editdlrm
netrc.cpython-39.pyc37920644editdlrm
nntplib.cpython-39.opt-1.pyc317720644editdlrm
nntplib.cpython-39.opt-2.pyc201720644editdlrm
nntplib.cpython-39.pyc317720644editdlrm
ntpath.cpython-39.opt-1.pyc145510644editdlrm
ntpath.cpython-39.opt-2.pyc125000644editdlrm
ntpath.cpython-39.pyc145510644editdlrm
nturl2path.cpython-39.opt-1.pyc17550644editdlrm
nturl2path.cpython-39.opt-2.pyc13360644editdlrm
nturl2path.cpython-39.pyc17550644editdlrm
numbers.cpython-39.opt-1.pyc123280644editdlrm
numbers.cpython-39.opt-2.pyc83710644editdlrm
numbers.cpython-39.pyc123280644editdlrm
opcode.cpython-39.opt-1.pyc52320644editdlrm
opcode.cpython-39.opt-2.pyc50910644editdlrm
opcode.cpython-39.pyc52320644editdlrm
operator.cpython-39.opt-1.pyc137930644editdlrm
operator.cpython-39.opt-2.pyc114040644editdlrm
operator.cpython-39.pyc137930644editdlrm
optparse.cpython-39.opt-1.pyc478970644editdlrm
optparse.cpython-39.opt-2.pyc355820644editdlrm
optparse.cpython-39.pyc479520644editdlrm
os.cpython-39.opt-1.pyc316390644editdlrm
os.cpython-39.opt-2.pyc194490644editdlrm
os.cpython-39.pyc316550644editdlrm
pathlib.cpython-39.opt-1.pyc447340644editdlrm
pathlib.cpython-39.opt-2.pyc358740644editdlrm
pathlib.cpython-39.pyc447340644editdlrm
pdb.cpython-39.opt-1.pyc474820644editdlrm
pdb.cpython-39.opt-2.pyc334110644editdlrm
pdb.cpython-39.pyc475210644editdlrm
pickle.cpython-39.opt-1.pyc470220644editdlrm
pickle.cpython-39.opt-2.pyc411510644editdlrm
pickle.cpython-39.pyc471080644editdlrm
pickletools.cpython-39.opt-1.pyc663020644editdlrm
pickletools.cpython-39.opt-2.pyc572090644editdlrm
pickletools.cpython-39.pyc671160644editdlrm
pipes.cpython-39.opt-1.pyc78040644editdlrm
pipes.cpython-39.opt-2.pyc49370644editdlrm
pipes.cpython-39.pyc78040644editdlrm
pkgutil.cpython-39.opt-1.pyc185750644editdlrm
pkgutil.cpython-39.opt-2.pyc118760644editdlrm
pkgutil.cpython-39.pyc185750644editdlrm
platform.cpython-39.opt-1.pyc264250644editdlrm
platform.cpython-39.opt-2.pyc183570644editdlrm
platform.cpython-39.pyc264250644editdlrm
plistlib.cpython-39.opt-1.pyc235050644editdlrm
plistlib.cpython-39.opt-2.pyc211460644editdlrm
plistlib.cpython-39.pyc235560644editdlrm
poplib.cpython-39.opt-1.pyc136660644editdlrm
poplib.cpython-39.opt-2.pyc87360644editdlrm
poplib.cpython-39.pyc136660644editdlrm
posixpath.cpython-39.opt-1.pyc103380644editdlrm
posixpath.cpython-39.opt-2.pyc86230644editdlrm
posixpath.cpython-39.pyc103380644editdlrm
pprint.cpython-39.opt-1.pyc168060644editdlrm
pprint.cpython-39.opt-2.pyc146490644editdlrm
pprint.cpython-39.pyc168390644editdlrm
profile.cpython-39.opt-1.pyc142110644editdlrm
profile.cpython-39.opt-2.pyc112330644editdlrm
profile.cpython-39.pyc143990644editdlrm
pstats.cpython-39.opt-1.pyc237610644editdlrm
pstats.cpython-39.opt-2.pyc208520644editdlrm
pstats.cpython-39.pyc237610644editdlrm
pty.cpython-39.opt-1.pyc39650644editdlrm
pty.cpython-39.opt-2.pyc31200644editdlrm
pty.cpython-39.pyc39650644editdlrm
pyclbr.cpython-39.opt-1.pyc104580644editdlrm
pyclbr.cpython-39.opt-2.pyc68570644editdlrm
pyclbr.cpython-39.pyc104580644editdlrm
pydoc.cpython-39.opt-1.pyc852930644editdlrm
pydoc.cpython-39.opt-2.pyc754110644editdlrm
pydoc.cpython-39.pyc853250644editdlrm
py_compile.cpython-39.opt-1.pyc73730644editdlrm
py_compile.cpython-39.opt-2.pyc36350644editdlrm
py_compile.cpython-39.pyc73730644editdlrm
queue.cpython-39.opt-1.pyc108720644editdlrm
queue.cpython-39.opt-2.pyc65350644editdlrm
queue.cpython-39.pyc108720644editdlrm
quopri.cpython-39.opt-1.pyc56120644editdlrm
quopri.cpython-39.opt-2.pyc45760644editdlrm
quopri.cpython-39.pyc57560644editdlrm
random.cpython-39.opt-1.pyc220520644editdlrm
random.cpython-39.opt-2.pyc146050644editdlrm
random.cpython-39.pyc220520644editdlrm
re.cpython-39.opt-1.pyc143710644editdlrm
re.cpython-39.opt-2.pyc60330644editdlrm
re.cpython-39.pyc143710644editdlrm
reprlib.cpython-39.opt-1.pyc53160644editdlrm
reprlib.cpython-39.opt-2.pyc51600644editdlrm
reprlib.cpython-39.pyc53160644editdlrm
rlcompleter.cpython-39.opt-1.pyc58150644editdlrm
rlcompleter.cpython-39.opt-2.pyc31520644editdlrm
rlcompleter.cpython-39.pyc58150644editdlrm
runpy.cpython-39.opt-1.pyc85180644editdlrm
runpy.cpython-39.opt-2.pyc69520644editdlrm
runpy.cpython-39.pyc85180644editdlrm
sched.cpython-39.opt-1.pyc66420644editdlrm
sched.cpython-39.opt-2.pyc36140644editdlrm
sched.cpython-39.pyc66420644editdlrm
secrets.cpython-39.opt-1.pyc21890644editdlrm
secrets.cpython-39.opt-2.pyc11310644editdlrm
secrets.cpython-39.pyc21890644editdlrm
selectors.cpython-39.opt-1.pyc172540644editdlrm
selectors.cpython-39.opt-2.pyc131450644editdlrm
selectors.cpython-39.pyc172540644editdlrm
shelve.cpython-39.opt-1.pyc95530644editdlrm
shelve.cpython-39.opt-2.pyc54020644editdlrm
shelve.cpython-39.pyc95530644editdlrm
shlex.cpython-39.opt-1.pyc77430644editdlrm
shlex.cpython-39.opt-2.pyc71850644editdlrm
shlex.cpython-39.pyc77430644editdlrm
shutil.cpython-39.opt-1.pyc380230644editdlrm
shutil.cpython-39.opt-2.pyc262320644editdlrm
shutil.cpython-39.pyc380230644editdlrm
signal.cpython-39.opt-1.pyc28320644editdlrm
signal.cpython-39.opt-2.pyc26080644editdlrm
signal.cpython-39.pyc28320644editdlrm
site.cpython-39.opt-1.pyc167980644editdlrm
site.cpython-39.opt-2.pyc112620644editdlrm
site.cpython-39.pyc167980644editdlrm
smtpd.cpython-39.opt-1.pyc265330644editdlrm
smtpd.cpython-39.opt-2.pyc239130644editdlrm
smtpd.cpython-39.pyc265330644editdlrm
smtplib.cpython-39.opt-1.pyc358940644editdlrm
smtplib.cpython-39.opt-2.pyc195320644editdlrm
smtplib.cpython-39.pyc359390644editdlrm
sndhdr.cpython-39.opt-1.pyc70020644editdlrm
sndhdr.cpython-39.opt-2.pyc57270644editdlrm
sndhdr.cpython-39.pyc70020644editdlrm
socket.cpython-39.opt-1.pyc291580644editdlrm
socket.cpython-39.opt-2.pyc202630644editdlrm
socket.cpython-39.pyc291820644editdlrm
socketserver.cpython-39.opt-1.pyc255240644editdlrm
socketserver.cpython-39.opt-2.pyc148080644editdlrm
socketserver.cpython-39.pyc255240644editdlrm
sre_compile.cpython-39.opt-1.pyc148670644editdlrm
sre_compile.cpython-39.opt-2.pyc144530644editdlrm
sre_compile.cpython-39.pyc150620644editdlrm
sre_constants.cpython-39.opt-1.pyc63260644editdlrm
sre_constants.cpython-39.opt-2.pyc59010644editdlrm
sre_constants.cpython-39.pyc63260644editdlrm
sre_parse.cpython-39.opt-1.pyc215750644editdlrm
sre_parse.cpython-39.opt-2.pyc215270644editdlrm
sre_parse.cpython-39.pyc216120644editdlrm
ssl.cpython-39.opt-1.pyc446010644editdlrm
ssl.cpython-39.opt-2.pyc336230644editdlrm
ssl.cpython-39.pyc446010644editdlrm
stat.cpython-39.opt-1.pyc43810644editdlrm
stat.cpython-39.opt-2.pyc35980644editdlrm
stat.cpython-39.pyc43810644editdlrm
statistics.cpython-39.opt-1.pyc317940644editdlrm
statistics.cpython-39.opt-2.pyc159210644editdlrm
statistics.cpython-39.pyc319880644editdlrm
string.cpython-39.opt-1.pyc71740644editdlrm
string.cpython-39.opt-2.pyc60680644editdlrm
string.cpython-39.pyc71740644editdlrm
stringprep.cpython-39.opt-1.pyc99550644editdlrm
stringprep.cpython-39.opt-2.pyc97370644editdlrm
stringprep.cpython-39.pyc99950644editdlrm
struct.cpython-39.opt-1.pyc3150644editdlrm
struct.cpython-39.opt-2.pyc3150644editdlrm
struct.cpython-39.pyc3150644editdlrm
subprocess.cpython-39.opt-1.pyc440790644editdlrm
subprocess.cpython-39.opt-2.pyc320410644editdlrm
subprocess.cpython-39.pyc441550644editdlrm
sunau.cpython-39.opt-1.pyc168260644editdlrm
sunau.cpython-39.opt-2.pyc122360644editdlrm
sunau.cpython-39.pyc168260644editdlrm
symbol.cpython-39.opt-1.pyc25880644editdlrm
symbol.cpython-39.opt-2.pyc25120644editdlrm
symbol.cpython-39.pyc25880644editdlrm
symtable.cpython-39.opt-1.pyc110970644editdlrm
symtable.cpython-39.opt-2.pyc103680644editdlrm
symtable.cpython-39.pyc111750644editdlrm
sysconfig.cpython-39.opt-1.pyc160760644editdlrm
sysconfig.cpython-39.opt-2.pyc136980644editdlrm
sysconfig.cpython-39.pyc160760644editdlrm
tabnanny.cpython-39.opt-1.pyc70740644editdlrm
tabnanny.cpython-39.opt-2.pyc61410644editdlrm
tabnanny.cpython-39.pyc70740644editdlrm
tarfile.cpython-39.opt-1.pyc630680644editdlrm
tarfile.cpython-39.opt-2.pyc490170644editdlrm
tarfile.cpython-39.pyc630830644editdlrm
telnetlib.cpython-39.opt-1.pyc183400644editdlrm
telnetlib.cpython-39.opt-2.pyc108380644editdlrm
telnetlib.cpython-39.pyc183400644editdlrm
tempfile.cpython-39.opt-1.pyc233750644editdlrm
tempfile.cpython-39.opt-2.pyc168490644editdlrm
tempfile.cpython-39.pyc233750644editdlrm
textwrap.cpython-39.opt-1.pyc134720644editdlrm
textwrap.cpython-39.opt-2.pyc62630644editdlrm
textwrap.cpython-39.pyc135300644editdlrm
this.cpython-39.opt-1.pyc12680644editdlrm
this.cpython-39.opt-2.pyc12680644editdlrm
this.cpython-39.pyc12680644editdlrm
threading.cpython-39.opt-1.pyc416310644editdlrm
threading.cpython-39.opt-2.pyc244440644editdlrm
threading.cpython-39.pyc420940644editdlrm
timeit.cpython-39.opt-1.pyc117650644editdlrm
timeit.cpython-39.opt-2.pyc59110644editdlrm
timeit.cpython-39.pyc117650644editdlrm
token.cpython-39.opt-1.pyc25050644editdlrm
token.cpython-39.opt-2.pyc24720644editdlrm
token.cpython-39.pyc25050644editdlrm
tokenize.cpython-39.opt-1.pyc171460644editdlrm
tokenize.cpython-39.opt-2.pyc133820644editdlrm
tokenize.cpython-39.pyc171740644editdlrm
trace.cpython-39.opt-1.pyc197480644editdlrm
trace.cpython-39.opt-2.pyc167330644editdlrm
trace.cpython-39.pyc197480644editdlrm
traceback.cpython-39.opt-1.pyc204100644editdlrm
traceback.cpython-39.opt-2.pyc114570644editdlrm
traceback.cpython-39.pyc204100644editdlrm
tracemalloc.cpython-39.opt-1.pyc179440644editdlrm
tracemalloc.cpython-39.opt-2.pyc165310644editdlrm
tracemalloc.cpython-39.pyc179440644editdlrm
tty.cpython-39.opt-1.pyc10870644editdlrm
tty.cpython-39.opt-2.pyc9780644editdlrm
tty.cpython-39.pyc10870644editdlrm
turtle.cpython-39.opt-1.pyc1295450644editdlrm
turtle.cpython-39.opt-2.pyc679520644editdlrm
turtle.cpython-39.pyc1295450644editdlrm
types.cpython-39.opt-1.pyc92300644editdlrm
types.cpython-39.opt-2.pyc80080644editdlrm
types.cpython-39.pyc92300644editdlrm
typing.cpython-39.opt-1.pyc714510644editdlrm
typing.cpython-39.opt-2.pyc501970644editdlrm
typing.cpython-39.pyc715810644editdlrm
uu.cpython-39.opt-1.pyc36750644editdlrm
uu.cpython-39.opt-2.pyc34310644editdlrm
uu.cpython-39.pyc36750644editdlrm
uuid.cpython-39.opt-1.pyc224060644editdlrm
uuid.cpython-39.opt-2.pyc146930644editdlrm
uuid.cpython-39.pyc225190644editdlrm
warnings.cpython-39.opt-1.pyc131750644editdlrm
warnings.cpython-39.opt-2.pyc109000644editdlrm
warnings.cpython-39.pyc136140644editdlrm
wave.cpython-39.opt-1.pyc178530644editdlrm
wave.cpython-39.opt-2.pyc118610644editdlrm
wave.cpython-39.pyc178820644editdlrm
weakref.cpython-39.opt-1.pyc202800644editdlrm
weakref.cpython-39.opt-2.pyc169950644editdlrm
weakref.cpython-39.pyc202940644editdlrm
webbrowser.cpython-39.opt-1.pyc171260644editdlrm
webbrowser.cpython-39.opt-2.pyc147160644editdlrm
webbrowser.cpython-39.pyc171430644editdlrm
xdrlib.cpython-39.opt-1.pyc82520644editdlrm
xdrlib.cpython-39.opt-2.pyc77670644editdlrm
xdrlib.cpython-39.pyc82520644editdlrm
zipapp.cpython-39.opt-1.pyc59940644editdlrm
zipapp.cpython-39.opt-2.pyc48180644editdlrm
zipapp.cpython-39.pyc59940644editdlrm
zipfile.cpython-39.opt-1.pyc588820644editdlrm
zipfile.cpython-39.opt-2.pyc500240644editdlrm
zipfile.cpython-39.pyc589030644editdlrm
zipimport.cpython-39.opt-1.pyc171680644editdlrm
zipimport.cpython-39.opt-2.pyc136500644editdlrm
zipimport.cpython-39.pyc172460644editdlrm
_aix_support.cpython-39.opt-1.pyc30550644editdlrm
_aix_support.cpython-39.opt-2.pyc17000644editdlrm
_aix_support.cpython-39.pyc30550644editdlrm
_bootlocale.cpython-39.opt-1.pyc12260644editdlrm
_bootlocale.cpython-39.opt-2.pyc10010644editdlrm
_bootlocale.cpython-39.pyc12360644editdlrm
_bootsubprocess.cpython-39.opt-1.pyc22540644editdlrm
_bootsubprocess.cpython-39.opt-2.pyc20250644editdlrm
_bootsubprocess.cpython-39.pyc22540644editdlrm
_collections_abc.cpython-39.opt-1.pyc317470644editdlrm
_collections_abc.cpython-39.opt-2.pyc262570644editdlrm
_collections_abc.cpython-39.pyc317470644editdlrm
_compat_pickle.cpython-39.opt-1.pyc54440644editdlrm
_compat_pickle.cpython-39.opt-2.pyc54440644editdlrm
_compat_pickle.cpython-39.pyc54970644editdlrm
_compression.cpython-39.opt-1.pyc42070644editdlrm
_compression.cpython-39.opt-2.pyc39930644editdlrm
_compression.cpython-39.pyc42070644editdlrm
_markupbase.cpython-39.opt-1.pyc76290644editdlrm
_markupbase.cpython-39.opt-2.pyc72510644editdlrm
_markupbase.cpython-39.pyc77800644editdlrm
_osx_support.cpython-39.opt-1.pyc115920644editdlrm
_osx_support.cpython-39.opt-2.pyc89010644editdlrm
_osx_support.cpython-39.pyc115920644editdlrm
_pydecimal.cpython-39.opt-1.pyc1606220644editdlrm
_pydecimal.cpython-39.opt-2.pyc790050644editdlrm
_pydecimal.cpython-39.pyc1606220644editdlrm
_pyio.cpython-39.opt-1.pyc744720644editdlrm
_pyio.cpython-39.opt-2.pyc515790644editdlrm
_pyio.cpython-39.pyc744920644editdlrm
_py_abc.cpython-39.opt-1.pyc46430644editdlrm
_py_abc.cpython-39.opt-2.pyc34300644editdlrm
_py_abc.cpython-39.pyc46650644editdlrm
_sitebuiltins.cpython-39.opt-1.pyc35100644editdlrm
_sitebuiltins.cpython-39.opt-2.pyc29860644editdlrm
_sitebuiltins.cpython-39.pyc35100644editdlrm
_strptime.cpython-39.opt-1.pyc160240644editdlrm
_strptime.cpython-39.opt-2.pyc122960644editdlrm
_strptime.cpython-39.pyc160240644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-1.pyc227680644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-2.pyc227680644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.pyc227680644editdlrm
_threading_local.cpython-39.opt-1.pyc65150644editdlrm
_threading_local.cpython-39.opt-2.pyc31950644editdlrm
_threading_local.cpython-39.pyc65150644editdlrm
_weakrefset.cpython-39.opt-1.pyc77330644editdlrm
_weakrefset.cpython-39.opt-2.pyc77330644editdlrm
_weakrefset.cpython-39.pyc77330644editdlrm
__future__.cpython-39.opt-1.pyc41350644editdlrm
__future__.cpython-39.opt-2.pyc21630644editdlrm
__future__.cpython-39.pyc41350644editdlrm
__phello__.foo.cpython-39.opt-1.pyc1380644editdlrm
__phello__.foo.cpython-39.opt-2.pyc1380644editdlrm
__phello__.foo.cpython-39.pyc1380644editdlrm
Edit: /opt/imh-python/lib/python3.9/__pycache__/turtle.cpython-39.pyc (129545B)
a _he1@s0dZdZddlZddlZddlZddlZddlZddlZddl m Z m Z m Z ddl mZddlmZgdZgdZgd Zd d gZeeeed gZgd ZdddddddddddddddddddddZd d!Zd"d#Zz eeWneyed$Yn0Gd%d&d&eZd'd(Zd)d*Zd+Zdhd-d.Z Gd/d0d0ej!Z"e e"ej#d1Gd2d3d3ej$Z%ej#Z#Gd4d5d5e&Z'Gd6d d eZ(Gd7d8d8eZ)Gd9d:d:e&Z*Gd;d<dd>e'Z,Gd?d@d@e&Z-GdAdBdBe&Z.GdCdDdDe&Z/GdEdFdFe.e-Z0e0Z1dGdHZ2GdIdJdJe,Z3GdKdLdLe0Z4e4Z5didNd Z6dOdPZ7edQZ8ze8dkrpe7e8Wn<e9yedRe8Yn eyedSe8Yn0dTdUZ:dVdWZ;dXdYZe>ee3d]d^e<e>ee4d_d`e;e?Z@eAdakr,dbdcZBdddeZCdfdgZDeCeDeEdS)ja Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an ``import turtle``, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise. By combining together these and similar commands, intricate shapes and pictures can easily be drawn. ----- turtle.py This module is an extended reimplementation of turtle.py from the Python standard distribution up to Python 2.5. (See: https://www.python.org) It tries to keep the merits of turtle.py and to be (nearly) 100% compatible with it. This means in the first place to enable the learning programmer to use all the commands, classes and methods interactively when using the module from within IDLE run with the -n switch. Roughly it has the following features added: - Better animation of the turtle movements, especially of turning the turtle. So the turtles can more easily be used as a visual feedback instrument by the (beginning) programmer. - Different turtle shapes, gif-images as turtle shapes, user defined and user controllable turtle shapes, among them compound (multicolored) shapes. Turtle shapes can be stretched and tilted, which makes turtles very versatile geometrical objects. - Fine control over turtle movement and screen updates via delay(), and enhanced tracer() and speed() methods. - Aliases for the most commonly used commands, like fd for forward etc., following the early Logo traditions. This reduces the boring work of typing long sequences of commands, which often occur in a natural way when kids try to program fancy pictures on their first encounter with turtle graphics. - Turtles now have an undo()-method with configurable undo-buffer. - Some simple commands/methods for creating event driven programs (mouse-, key-, timer-events). Especially useful for programming games. - A scrollable Canvas class. The default scrollable Canvas can be extended interactively as needed while playing around with the turtle(s). - A TurtleScreen class with methods controlling background color or background image, window and canvas size and other properties of the TurtleScreen. - There is a method, setworldcoordinates(), to install a user defined coordinate-system for the TurtleScreen. - The implementation uses a 2-vector class named Vec2D, derived from tuple. This class is public, so it can be imported by the application programmer, which makes certain types of computations very natural and compact. - Appearance of the TurtleScreen and the Turtles at startup/import can be configured by means of a turtle.cfg configuration file. The default configuration mimics the appearance of the old turtle module. - If configured appropriately the module reads in docstrings from a docstring dictionary in some different language, supplied separately and replaces the English ones by those read in. There is a utility function write_docstringdict() to write a dictionary with the original (English) docstrings to disc, so it can serve as a template for translations. Behind the scenes there are some features included with possible extensions in mind. These will be commented and documented elsewhere. z-turtle 1.1b- - for Python 3.1 - 4. 5. 2009N)isfilesplitjoin)deepcopy) simpledialog) ScrolledCanvas TurtleScreenScreen RawTurtleTurtleRawPenPenShapeVec2D)addshapebgcolorbgpicbye clearscreen colormodedelay exitonclick getcanvas getshapeslistenmainloopmodenuminputonkey onkeypress onkeyrelease onscreenclickontimerregister_shape resetscreen screensizesetupsetworldcoordinates textinputtitletracerturtlesupdate window_height window_width)Obackbackward begin_fill begin_polybkcircleclear clearstamp clearstampsclonecolordegreesdistancedotdownend_fillend_polyfd fillcolorfillingforwardget_polygetpen getscreen get_shapepoly getturtlegotoheading hideturtlehomehtisdown isvisibleleftltonclickondrag onreleasepdpenpencolorpendownpensizepenuppospositionpuradiansrightreset resizemodertseth setheadingsetpos setposition settiltangle setundobuffersetxsetyshape shapesizeshapetransform shearfactor showturtlespeedststamptilt tiltangletowards turtlesizeundoundobufferentriesupwidthwritexcorycorwrite_docstringdictdone Terminator)rr0r3r@rMrQrUr[r]rbrcrerfrqrvryrz?g?ii,standard? iclassicblacknoresizeTenglishturtlescreenzPython Turtle GraphicsF)rzheight canvwidth canvheight leftright topbottomrrrundobuffersizerkrWrAravisiblelanguage exampleturtle examplescreenr) using_IDLEc Cst|d}|}Wdn1s(0Yi}|D]}|}|r:|drVq:z|d\}}Wn&tytd||fYq:Yn0|}|}|dvrt|}n2zd|vrt|}nt |}WntyYn0|||<q:|S)z/Convert content of config-file into dictionary.rN#=zBad line in config-file %s: %s)TrueFalseNonez''z"".) open readlinesstrip startswithr ValueErrorprintevalfloatint)filenamefZcfglinescfgdictlinekeyvaluer'/opt/imh-python/lib/python3.9/turtle.py config_dicts0 &       rcCsd}i}i}t|rt|}d|vr0d|d}ztt\}}t||}Wnty`d}Yn0t|rrt|}t|t|dS)a@Read config-files, change configuration-dict accordingly. If there is a turtle.cfg file in the current working directory, read it from there. If this contains an importconfig-value, say 'myway', construct filename turtle_mayway.cfg else use turtle.cfg and read it from the import-directory, where turtle.py is located. Update configuration dictionary first according to config-file, in the import directory, then according to config-file in the current working directory. If no config-file is found, the default configuration is used. z turtle.cfgZ importconfigz turtle_%s.cfgN)rrr__file__r Exception_CFGr,)rZ default_cfgZcfgdict1Zcfgdict2headtailZ cfg_file2rrr readconfigs      rz"No configfile read, reason unknownc@s`eZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ dS)raA 2 dimensional vector class, used as a helper class for implementing turtle graphics. May be useful for turtle graphics programs also. Derived from tuple, so a vector is a tuple! Provides (for a, b vectors, k number): a+b vector addition a-b vector subtraction a*b inner product k*a and a*k multiplication with scalar |a| absolute value of a a.rotate(angle) rotation cCst|||fSN)tuple__new__)clsxyrrrrsz Vec2D.__new__cCs"t|d|d|d|dSNrrselfotherrrr__add__sz Vec2D.__add__cCsDt|tr*|d|d|d|dSt|d||d|Sr) isinstancerrrrr__mul__s  z Vec2D.__mul__cCs2t|tst|tr.t|d||d|StSr)rrrrNotImplementedrrrr__rmul__szVec2D.__rmul__cCs"t|d|d|d|dSrrrrrr__sub__sz Vec2D.__sub__cCst|d |d Srrrrrr__neg__sz Vec2D.__neg__cCs|dd|dddS)Nrrrrrrrr__abs__ sz Vec2D.__abs__cCsjt|d |d}|tjd}t|t|}}t|d||d||d||d|S)z.rotate self counterclockwise by angle rrf@)rmathpicossin)rangleZperpcsrrrrotate sz Vec2D.rotatecCs|d|dfSrrrrrr__getnewargs__szVec2D.__getnewargs__cCsd|S)Nz (%.2f,%.2f)rrrrr__repr__szVec2D.__repr__N)__name__ __module__ __qualname____doc__rrrrrrrrrrrrrrrs rcCsTt|j}||D]}t||q|jD]\}}t|tjkr0|||<q0dS)#helper function for Scrolled CanvasN) list __bases__reverse __methodDict__dict__itemstypetypes FunctionType)r_dictZbaseListZ_superrrrrrr!s  rcCsi}t|||S)r)rkeys)rrrrr __methods+s rzTdef %(method)s(self, *args, **kw): return self.%(attribute)s.%(method)s(*args, **kw)rc Csi}t||i}t|}|D]B}|dddksd|dddksd||vsd||vrXq"||||<q"|D]D\}} || d} t|trt||d} t| | t||| |qndS)Nr_)methodfunc)rZ attribute) rrrrrstr __stringBodyexecsetattr) Z fromClassZtoClassZtoPartZexcludeZ_dict_1rZmfcexrrdZ execStringrrr__forwardmethods5s  0    rc@sdeZdZdZdddZddd Zd d Zd d ZddZddZ ddZ ddZ ddZ ddZ dS)rzModeled after the scrolled canvas class from Grayons's Tkinter book. Used as the default canvas, which pops up automatically when using turtle graphics functions or the Turtle class. ^Xc Cs0tjj||||d||_|||_|_|||_|_d|_ tj ||||j tj dd|_ tj ||j jtjd|_tj ||j jd|_|j j|jj|jjd|jdd dd |jdd dd |j jd |d ddd d d d |jjd |d dd d d d d |jjd |d d dd d d d ||jd |jdS)N)rzrwhiter)rzrbgZreliefZ borderwidth)commandZorient)r)ZxscrollcommandZyscrollcommandrr)ZweightZminsizenewsZpadxZin_ZpadyrowcolumnZrowspanZ columnspanZstickyz )TKFrame__init__winfo_toplevelZ _rootwindowrzrrrrCanvasZSUNKEN_canvasZ ScrollbarZxviewZ HORIZONTALhscrollZyviewvscrollZ configuresetZ rowconfigureZcolumnconfiguregridr`bindonResize)rmasterrzrrrrrrrPs8     zScrolledCanvas.__init__NcCs|r ||_|r||_|r||_|jj||j d|j d|jd|jdfd|jd|j|jd|j|jd|j|jd|j| dS)zZ d?d@Z!dAdBZ"dCdDZ#dPdEdFZ$d S)QTurtleScreenBasezProvide the basic graphics functionality. Interface between Tkinter and turtle.py. To port turtle.py to some different graphics toolkit a corresponding TurtleScreenBase class has to be implemented. cCstjdd|jd}||S)z$return a blank image object r)rzrr )r PhotoImagecvblank)rZimgrrr _blankimageszTurtleScreenBase._blankimagecCstj||jdS)z`return an image object containing the imagedata from a gif-file named filename. )filer )rr0r1)rrrrr_imageszTurtleScreenBase._imagecCs||_t|tr"|jj}|jj}nJt|jd}t|jd}|jj| d| d|d|dfd||_||_d|_|_ dS)Nrzrrr r) r1rrrrrrr xscaleyscale)rr1whrrrrs  *zTurtleScreenBase.__init__cCs|jjddddS)zr?r@) rZlineitemrCr$rzrDrErrrrr _drawlines  zTurtleScreenBase._drawlinecCs|j|dS)z]Delete graphics item from canvas. If item is"all" delete all graphics items. N)r1deleteritemrrr_delete(szTurtleScreenBase._deletecCs|jdS)z(Redraw graphics items on canvas N)r1r,rrrr_update.szTurtleScreenBase._updatecCs|j|dS)z-Delay subsequent canvas actions for delay ms.N)r1afterrrrrr_delay3szTurtleScreenBase._delaycCs2z|j|}d}Wntjy,d}Yn0|S)zCCheck if the string color is a legal Tkinter color string. TF)r1Z winfo_rgbrZTclError)rr9Zrgbokrrr_iscolorstring7s   zTurtleScreenBase._iscolorstringcCs0|dur |jj|d|n |jdSdS)zVSet canvas' backgroundcolor if color is not None, else return backgroundcolor.N)rr)r1r rMr)rr9rrr_bgcolorAs zTurtleScreenBase._bgcolorcCst|\}}||j}||j}dddd}|jj|d| |||||d} |j| \} } } } |j| | dfS)zWrite txt at pos in canvas with specified font and color. Return text item and x-coord of right bottom corner of text's bounding box.swrZse)rPcenterr_r)textanchorr$font)r7r8r1Z create_textrr,)rr[txtalignrXrWrrrWrKZx0Zy0Zx1Zy1rrr_writeJs    zTurtleScreenBase._writercsDdurj|d|n$fdd}j|d|||dS)zBind fun to mouse-click event on turtle. fun must be a function with two arguments, the coordinates of the clicked point on the canvas. num, the number of the mouse-button defaults to 1 N cs:j|jjj|j j}}||dSrr1canvasxrr7canvasyrr8rrrfunrrreventfunesz+TurtleScreenBase._onclick..eventfunr1Z tag_unbindZtag_bindrrKrbnumaddrcrrar_onclick\szTurtleScreenBase._onclickcsDdurj|d|n$fdd}j|d|||dS)agBind fun to mouse-button-release event on turtle. fun must be a function with two arguments, the coordinates of the point on the canvas where mouse button is released. num, the number of the mouse-button defaults to 1 If a turtle is clicked, first _onclick-event will be performed, then _onscreensclick-event. Nzcs:j|jjj|j j}}||dSrr]r`rarrrcwsz-TurtleScreenBase._onrelease..eventfunrdrerrar _onreleaseks zTurtleScreenBase._onreleasecsDdurj|d|n$fdd}j|d|||dS)aqBind fun to mouse-move-event (with pressed mouse button) on turtle. fun must be a function with two arguments, the coordinates of the actual mouse position on the canvas. num, the number of the mouse-button defaults to 1 Every sequence of mouse-move-events on a turtle is preceded by a mouse-click event on that turtle. NzcsRz:j|jjj|j j}}||WntyLYn0dSr)r1r^rr7r_rr8rr`rarrrcs z*TurtleScreenBase._ondrag..eventfunrdrerrar_ondrag~s zTurtleScreenBase._ondragcs@durjd|n"fdd}jd|||dS)aGBind fun to mouse-click event on canvas. fun must be a function with two arguments, the coordinates of the clicked point on the canvas. num, the number of the mouse-button defaults to 1 If a turtle is clicked, first _onclick-event will be performed, then _onscreensclick-event. Nr\cs:j|jjj|j j}}||dSrr]r`rarrrcsz1TurtleScreenBase._onscreenclick..eventfunr1rr)rrbrfrgrcrrar_onscreenclicks zTurtleScreenBase._onscreenclickcs>dur|jd|dnfdd}|jd||dS)z`Bind fun to key-release event of key. Canvas must have focus. See method listen Nzcs dSrrrrbrrrcsz0TurtleScreenBase._onkeyrelease..eventfunrkrrbrrcrrnr _onkeyreleases zTurtleScreenBase._onkeyreleasecsndur4|dur |jddqj|jd|dn6fdd}|durX|jd|n|jd||dS)zIf key is given, bind fun to key-press event of key. Otherwise bind fun to any key-press. Canvas must have focus. See method listen. Nz z cs dSrrrmrnrrrcsz.TurtleScreenBase._onkeypress..eventfunrkrorrnr _onkeypresss zTurtleScreenBase._onkeypresscCs|jdS)z=Set focus on canvas (in order to collect key-events) N)r1r rrrr_listenszTurtleScreenBase._listencCs(|dkr|j|n|j||dS)z?Install a timer, which calls fun after t milliseconds. rN)r1Z after_idlerNrrbtrrr_ontimerszTurtleScreenBase._ontimercCs|jjdd|dS)z0Create and return image item on canvas. rimage)r1Z create_image)rrwrrr _createimageszTurtleScreenBase._createimagecCs<|\}}|j|||j| |jf|jj||ddS)zZConfigure image item as to draw image object at position (x,y) on canvas) rvN)r1rBr7r8 itemconfig)rrKr[rwrrrrr _drawimages zTurtleScreenBase._drawimagecCs |jj||d|j|dS)zConfigure image item as to draw image object at center of canvas. Set item to the first item in the displaylist, so it will be drawn below any other item .rvN)r1ryZ tag_lower)rrKrwrrr _setbgpicszTurtleScreenBase._setbgpiccCs |j|S)zQReturn 'line' or 'polygon' or 'image' depending on type of item. )r1rrJrrr_typeszTurtleScreenBase._typecs.|j|fddtdtdD}|S)a returns list of coordinate-pairs of points of item Example (for insiders): >>> from turtle import * >>> getscreen()._pointlist(getturtle().turtle._item) [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982), (9.9999999999999982, 0.0)] >>> cs"g|]}||d fqS)rr.0irErr z/TurtleScreenBase._pointlist..rr)r1rBrangelen)rrKplrrr _pointlists zTurtleScreenBase._pointlistcCs|jj||||fddS)Nr6)r1r )rsrx1sry1srx2sry2rrr_setscrollregionsz!TurtleScreenBase._setscrollregionc Cs~|j}|D]j}t|j|}g}|rd|dd\}}|||||||dd}q&|jj|g|RqdS)Nr)r1Zfind_allrrBrA) rZ xscalefactorZ yscalefactorrrKZ coordinatesZ newcoordlistrrrrr_rescales zTurtleScreenBase._rescalecCszt|jts|j|jfS||ur6|ur6durJnn|jj|jjfS|durX||_|durf||_|j|||dS)zaResize the canvas the turtles are drawing on. Does not alter the drawing window. N)rr1rrrr`rrrr_resizes  "zTurtleScreenBase._resizecCs@|j}|dkr|jd}|j}|dkr8|jd}||fS)z; Return the width and height of the turtle window. rrzr)r1rr)rrzrrrr _window_sizes    zTurtleScreenBase._window_sizecCs|jjdS)a{Starts event loop - calling Tkinter's mainloop function. No argument. Must be last statement in a turtle graphics program. Must NOT be used if a script is run from within IDLE in -n mode (No subprocess) - for interactive use of turtle graphics. Example (for a TurtleScreen instance named screen): >>> screen.mainloop() N)r1Ztkrrrrrrs zTurtleScreenBase.mainloopcCstj|||jdS)aPop up a dialog window for input of a string. Arguments: title is the title of the dialog window, prompt is a text mostly describing what information to input. Return the string input If the dialog is canceled, return None. Example (for a TurtleScreen instance named screen): >>> screen.textinput("NIM", "Name of first player:") )parent)rZ askstringr1)rr)promptrrrr(.s zTurtleScreenBase.textinputcCstj||||||jdS)aPop up a dialog window for input of a number. Arguments: title is the title of the dialog window, prompt is a text mostly describing what numerical information to input. default: default value minval: minimum value for input maxval: maximum value for input The number input must be in the range minval .. maxval if these are given. If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return None. Example (for a TurtleScreen instance named screen): >>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000) )Z initialvalueZminvaluemaxvaluer)rZaskfloatr1)rr)rdefaultZminvalZmaxvalrrrr=s zTurtleScreenBase.numinput)NNNF)NNNF)N)rN)rN)rN)rN)N)NNN)NNN)%rrrrr3r5rr=rFrGrHrLrMrPrRrSr[rhrirjrlrprqrrrurxrzr{r|rrrrrrr(rrrrrr/sL            r/c@seZdZdZdS)rzWill be raised in TurtleScreen.update, if _RUNNING becomes False. This stops execution of a turtle graphics script. Main purpose: use in the Demo-Viewer turtle.Demo.py. NrrrrrrrrrYsc@seZdZdZdS)TurtleGraphicsErrorzSome TurtleGraphics Error Nrrrrrrbsrc@s$eZdZdZdddZdddZdS) rzData structure modeling shapes. attribute _type is one of "polygon", "image", "compound" attribute _data is - depending on _type a poygon-tuple, an image or a list constructed using the addcomponent method. NcCsz||_|dkr"t|trpt|}nN|dkrVt|trp|drpt|rpt |}n|dkrdg}n t d|||_ dS)Npolygonrw.gifcompoundzThere is no shape type %s) r|rrrrlowerendswithrrr5r_data)rtype_datarrrrns     zShape.__init__cCs:|jdkrtd|j|dur$|}|j|||gdS)a-Add component to a shape of type compound. Arguments: poly is a polygon, i. e. a tuple of number pairs. fill is the fillcolor of the component, outline is the outline color of the component. call (for a Shapeobject namend s): -- s.addcomponent(((0,0), (10,10), (-10,10)), "red", "blue") Example: >>> poly = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s = Shape("compound") >>> s.addcomponent(poly, "red", "blue") >>> # .. add more components and then use register_shape() rz Cannot add component to %s ShapeN)r|rrrA)rpolyr$r<rrr addcomponent~s zShape.addcomponent)N)N)rrrrrrrrrrrgs rc@sDeZdZdZdddZdddZdd Zd d Zd d ZddZ dS)Tbufferz5Ring buffer used as undobuffer for RawTurtle objects.rcCs$||_dgg||_d|_d|_dS)NrF)bufsizebufferptrcumulate)rrrrrrszTbuffer.__init__NcCsD|dur&t|jD]}dg|j|<qn||_dgg||_d|_dS)Nr)rrrr)rrrrrrr`s z Tbuffer.resetcCsF|jdkrB|js0|jd|j|_||j|j<n|j|j|dSr)rrrrrArJrrrpushs  z Tbuffer.pushcCsJ|jdkrF|j|j}|dur"dSdg|j|j<|jd|j|_|SdSr)rrrrJrrrpops  z Tbuffer.popcCs|j|jdgSr)rrcountrrrr nr_of_itemsszTbuffer.nr_of_itemscCst|jdt|jS)N )rrrrrrrrszTbuffer.__repr__)r)N) rrrrrr`rrrrrrrrrs   rc@s"eZdZdZdZedededfddZdd Zd=d d Zd dZ d>ddZ ddZ ddZ d?ddZ ddZddZddZd@ddZdAdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,ZdBd.d/Zd0d1ZdCd2d3ZdDd4d5ZdEd7d8ZdFd9d:ZdGd;d<ZeZ eZ!eZ"e Z#eZ$d S)HrzProvides screen oriented methods like setbg etc. Only relies upon the methods of TurtleScreenBase and NOT upon components of the underlying graphics toolkit - which is Tkinter in this case. Trrrc Cst||tddtddtddtddtddtddtd|d |_d d i|_||_||_td |_ g|_ | t j d kr|}|ddddd|ddddddS)Nr)rrrrr))r))rr)) )))rr))r)rr)rrrr)r)r)rr)rr)rr)rr)rr)rr)rr)rr)rr)r)Q#@Q@)Gz. @Q@)rr)rrr)Qr)Qr)Gz. r)Q#rr)rr)rr)rr)rr)gg$)rr)rr)rr)rr))rr)rr)rr)rr))rGz)rg'@)rr)rr)rrr)rrrw)Zarrowrr4ZsquareZtrianglerr2nopicrrdarwinZwmZ attributesrz-topmost10)r/rrr3_shapes_bgpics_mode _delayvaluer _colormode_keysr5sysplatformrcall)rr1rrrZ rootwindowrrrrs&     zTurtleScreen.__init__cCstd|_td|_|d|d|_d|_d|_d|_g|_ | dd D]}| d |qP| d |j d d D]}|d || d |qzd t_d S) aqDelete all drawings and all turtles from the TurtleScreen. No argument. Reset empty TurtleScreen to its initial state: white background, no backgroundimage, no eventbindings and tracing on. Example (for a TurtleScreen instance named screen): >>> screen.clear() Note: this method is not available as function. rrallrrrrr)rrN)rrrrLrx_bgpic _bgpicname_tracing_updatecounter_turtlesrrRrrrr _pen)rbtnrrrrr5s       zTurtleScreen.clearNcCs||dur|jS|}|dvr*td|||_|dvrp||j d|j d|jd|jdd|_|_|dS)ahSet turtle-mode ('standard', 'logo' or 'world') and perform reset. Optional argument: mode -- one of the strings 'standard', 'logo' or 'world' Mode 'standard' is compatible with turtle.py. Mode 'logo' is compatible with most Logo-Turtle-Graphics. Mode 'world' uses userdefined 'worldcoordinates'. *Attention*: in this mode angles appear distorted if x/y unit-ratio doesn't equal 1. If mode is not given, return the current mode. Mode Initial turtle heading positive angles ------------|-------------------------|------------------- 'standard' to the right (east) counterclockwise 'logo' upward (north) clockwise Examples: >>> mode('logo') # resets turtle heading to north >>> mode() 'logo' NrlogoworldzNo turtle-graphics-mode %s)rrrr) rrrrrrr7r8r`rrrrrr s  zTurtleScreen.modecCs|dkr|dt||}t||}|\}}||d|d|j|j} } |j||_|j||_||j} | |j} |j| } |j| }|| | | || |j| |j| | dS)asSet up a user defined coordinate-system. Arguments: llx -- a number, x-coordinate of lower left corner of canvas lly -- a number, y-coordinate of lower left corner of canvas urx -- a number, x-coordinate of upper right corner of canvas ury -- a number, y-coordinate of upper right corner of canvas Set up user coodinat-system and switch to mode 'world' if necessary. This performs a screen.reset. If mode 'world' is already active, all drawings are redrawn according to the new coordinates. But ATTENTION: in user-defined coordinatesystems angles may appear distorted. (see Screen.mode()) Example (for a TurtleScreen instance named screen): >>> screen.setworldcoordinates(-10,-0.5,50,1.5) >>> for _ in range(36): ... left(10) ... forward(0.5) rN) rrrr%r7r8rrrrr,)rZllxZllyZurxZuryZxspanZyspanZwxZwyZ oldxscaleZ oldyscalerrrrrrrr'-s            z TurtleScreen.setworldcoordinatescCsT|dur2|dr(td||}qFtdnt|trFtd|}||j|<dS)aAdds a turtle shape to TurtleScreen's shapelist. Arguments: (1) name is the name of a gif-file and shape is None. Installs the corresponding image shape. !! Image-shapes DO NOT rotate when turning the turtle, !! so they do not display the heading of the turtle! (2) name is an arbitrary string and shape is a tuple of pairs of coordinates. Installs the corresponding polygon shape (3) name is an arbitrary string and shape is a (compound) Shape object. Installs the corresponding compound shape. To use a shape, you have to issue the command shape(shapename). call: register_shape("turtle.gif") --or: register_shape("tri", ((0,0), (10,10), (-10,10))) Example (for a TurtleScreen instance named screen): >>> screen.register_shape("triangle", ((5,-3),(0,5),(-5,-3))) Nrrwz;Bad arguments for register_shape. Use help(register_shape)r)rrrr5rrrr)rnamerkrrrr#Ts   zTurtleScreen.register_shapec Cst|dkr|d}t|trD||s0|dkr4|Stdt|z|\}}}Wn&ttfyxtdt|Yn0|jdkrdd|||fD\}}}d|krd krnn.d|krd krnnd|krd ksntd t|d |||fS) aReturn color string corresponding to args. Argument may be a string or a tuple of three numbers corresponding to actual colormode, i.e. in the range 0<=n<=colormode. If the argument doesn't represent a color, an error is raised. rrrzbad color string: %sbad color arguments: %srcSsg|]}td|qSgo@roundr~rrrrrrz*TurtleScreen._colorstr..bad color sequence: %s #%02x%02x%02x)rrrrRr TypeErrorrr)rr9rgbrrr _colorstrws   FzTurtleScreen._colorstrcsxdsStdkr.fdddD}n4tdkrVfddddD}n td tfd d |DS) Nrrcs"g|]}t||ddqS)rrrr}cstrrrrrz'TurtleScreen._color..)rrrrcsg|]}dt|dqS)rr)r~r:rrrrrrzbad colorstring: %sc3s|]}|jdVqdS)rN)r)r~rrrr rz&TurtleScreen._color..)rrrr)rrrEr)rrr_colors    zTurtleScreen._colorcCs8|dur|jS|dkr"t||_n|dkr4t||_dS)aqReturn the colormode or set it to 1.0 or 255. Optional argument: cmode -- one of the values 1.0 or 255 r, g, b values of colortriples have to be in range 0..cmode. Example (for a TurtleScreen instance named screen): >>> screen.colormode() 1.0 >>> screen.colormode(255) >>> pencolor(240,160,80) Nrr)rrr)rZcmoderrrrs  zTurtleScreen.colormodecCs$|jD]}||j|qdS)zReset all Turtles on the Screen to their initial state. No argument. Example (for a TurtleScreen instance named screen): >>> screen.reset() N)r_setmoderr`)rrrrrr`s  zTurtleScreen.resetcCs|jS)zReturn the list of turtles on the screen. Example (for a TurtleScreen instance named screen): >>> screen.turtles() [] )rrrrrr+szTurtleScreen.turtlescGs4|r||}nd}||}|dur0||}|S)aSet or return backgroundcolor of the TurtleScreen. Arguments (if given): a color string or three numbers in the range 0..colormode or a 3-tuple of such numbers. Example (for a TurtleScreen instance named screen): >>> screen.bgcolor("orange") >>> screen.bgcolor() 'orange' >>> screen.bgcolor(0.5,0,0.5) >>> screen.bgcolor() '#800080' N)rrSrrrr9rrrrs   zTurtleScreen.bgcolorcCsB|dur|jSt||_d|_|dur0t||_|jr>|dS)aeTurns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) Second arguments sets delay value (see RawTurtle.delay()) Example (for a TurtleScreen instance named screen): >>> screen.tracer(8, 25) >>> dist = 2 >>> for i in range(200): ... fd(dist) ... rt(90) ... dist += 2 Nr)rrrrr,)rnrrrrr*s  zTurtleScreen.tracercCs|dur|jSt||_dS)z Return or set the drawing delay in milliseconds. Optional argument: delay -- positive integer Example (for a TurtleScreen instance named screen): >>> screen.delay(15) >>> screen.delay() 15 N)rrrOrrrrs zTurtleScreen.delaycCs<tjsdt_t|jdkr8|jd7_|j|j;_dS)zIncrement update counter.TrrN)r_RUNNINGrrrrrrr _incrementudc s  zTurtleScreen._incrementudccCs<|j}d|_|D]}||q||_|dS)z'Perform a TurtleScreen update. TN)rr+ _update_data _drawturtlerM)rtracingrtrrrr,s  zTurtleScreen.updatecCs |dS)z Return the width of the turtle window. Example (for a TurtleScreen instance named screen): >>> screen.window_width() 640 rrrrrrr.szTurtleScreen.window_widthcCs |dS)z Return the height of the turtle window. Example (for a TurtleScreen instance named screen): >>> screen.window_height() 480 rrrrrrr-&szTurtleScreen.window_heightcCs|jS)zReturn the Canvas of this TurtleScreen. No argument. Example (for a Screen instance named screen): >>> cv = screen.getcanvas() >>> cv )r1rrrrr/s zTurtleScreen.getcanvascCst|jS)zReturn a list of names of all currently available turtle shapes. No argument. Example (for a TurtleScreen instance named screen): >>> screen.getshapes() ['arrow', 'blank', 'circle', ... , 'turtle'] )sortedrrrrrrr;s zTurtleScreen.getshapesrcCs||||dS)aBind fun to mouse-click event on canvas. Arguments: fun -- a function with two arguments, the coordinates of the clicked point on the canvas. btn -- the number of the mouse-button, defaults to 1 Example (for a TurtleScreen instance named screen) >>> screen.onclick(goto) >>> # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. >>> screen.onclick(None) N)rlrrbrrgrrrrRFszTurtleScreen.onclickcCsF|dur ||jvr6|j|n||jvr6|j||||dS)amBind fun to key-release event of key. Arguments: fun -- a function with no arguments key -- a string: key (e.g. "a") or key-symbol (e.g. "space") In order to be able to register key-events, TurtleScreen must have focus. (See method listen.) Example (for a TurtleScreen instance named screen): >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkey(f, "Up") >>> screen.listen() Subsequently the turtle can be moved by repeatedly pressing the up-arrow key, consequently drawing a hexagon N)rremoverArprrbrrrrrWs    zTurtleScreen.onkeycCsN|dur ||jvr>|j|n|dur>||jvr>|j||||dS)aBind fun to key-press event of key if key is given, or to any key-press-event if no key is given. Arguments: fun -- a function with no arguments key -- a string: key (e.g. "a") or key-symbol (e.g. "space") In order to be able to register key-events, TurtleScreen must have focus. (See method listen.) Example (for a TurtleScreen instance named screen and a Turtle instance named turtle): >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkeypress(f, "Up") >>> screen.listen() Subsequently the turtle can be moved by repeatedly pressing the up-arrow key, or by keeping pressed the up-arrow key. consequently drawing a hexagon. N)rrrArqrrrrrus   zTurtleScreen.onkeypresscCs |dS)aSet focus on TurtleScreen (in order to collect key-events) No arguments. Dummy arguments are provided in order to be able to pass listen to the onclick method. Example (for a TurtleScreen instance named screen): >>> screen.listen() N)rr)rxdummyydummyrrrrs zTurtleScreen.listenrcCs|||dS)aInstall a timer, which calls fun after t milliseconds. Arguments: fun -- a function with no arguments. t -- a number >= 0 Example (for a TurtleScreen instance named screen): >>> running = True >>> def f(): ... if running: ... fd(50) ... lt(60) ... screen.ontimer(f, 250) ... >>> f() # makes the turtle marching around >>> running = False N)rursrrrr"szTurtleScreen.ontimercCsF|dur|jS||jvr(|||j|<||j|j|||_dS)aFSet background image or return name of current backgroundimage. Optional argument: picname -- a string, name of a gif-file or "nopic". If picname is a filename, set the corresponding image as background. If picname is "nopic", delete backgroundimage, if present. If picname is None, return the filename of the current backgroundimage. Example (for a TurtleScreen instance named screen): >>> screen.bgpic() 'nopic' >>> screen.bgpic("landscape.gif") >>> screen.bgpic() 'landscape.gif' N)rrr5r{r)rZpicnamerrrrs  zTurtleScreen.bgpiccCs||||S)aResize the canvas the turtles are drawing on. Optional arguments: canvwidth -- positive integer, new width of canvas in pixels canvheight -- positive integer, new height of canvas in pixels bg -- colorstring or color-tuple, new backgroundcolor If no arguments are given, return current (canvaswidth, canvasheight) Do not alter the drawing window. To observe hidden parts of the canvas use the scrollbars. (Can make visible those parts of a drawing, which were outside the canvas before!) Example (for a Turtle instance named turtle): >>> turtle.screensize(2000,1500) >>> # e.g. to search for an erroneously escaped turtle ;-) )rrrrrr%szTurtleScreen.screensize)N)N)N)NN)N)rN)N)NN)r)N)NNN)%rrrrrrrr5rr'r#rrrr`r+rr*rrr,r.r-rrrRrrrr"rr%r!r$rrr rrrrrsF ( "' #              rc@sTeZdZdZeddeddedddZdZdZdZefdd Z d d Z dBd dZ ddZ dCddZ ddZddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)ZdDd*d+Zd,d-Zd.d/Zd0d1ZdEd2d3ZdFd4d5Zd6d7Zd8d9Z dGd:d;Z!dHdd?Z#dJd@dAZ$eZ%eZ&eZ'eZ(eZ)eZ*eZ+eZ,e Z-d S)K TNavigatorzRNavigation part of the RawTurtle. Implements methods for turtle movement. r)rrrrrrcCsB|j|_|j|_||_d|_|d|_||t |dSr) DEFAULT_ANGLEOFFSET _angleOffsetDEFAULT_ANGLEORIENT _angleOrientr undobufferr:rrr`rrrrrs zTNavigator.__init__cCstdd|_tj|j|_dS)zXreset turtle to its initial values Will be overwritten by parent class rN)r _positionrSTART_ORIENTATIONr_orientrrrrr`s zTNavigator.resetNcCsL|dur|jS|dvrdS||_|dvr6d|_d|_n|jd|_d|_dS)z:Set turtle-mode to 'standard', 'world' or 'logo'. Nr)rrrr@r)rrr  _fullcirclerrrrrs zTNavigator._setmodecCs0||_d||_|jdkr"d|_n |d|_dS)z+Helper function for degrees() and radians()ihrrrN)r _degreesPerAUrrrZ fullcirclerrr_setDegreesPerAUs   zTNavigator._setDegreesPerAUv@cCs||dS)a> Set angle measurement units to degrees. Optional argument: fullcircle - a number Set angle measurement units, i. e. set number of 'degrees' for a full circle. Default value is 360 degrees. Example (for a Turtle instance named turtle): >>> turtle.left(90) >>> turtle.heading() 90 Change angle measurement unit to grad (also known as gon, grade, or gradian and equals 1/100-th of the right angle.) >>> turtle.degrees(400.0) >>> turtle.heading() 100 N)rrrrrr:szTNavigator.degreescCs|dtjdS)a Set the angle measurement units to radians. No arguments. Example (for a Turtle instance named turtle): >>> turtle.heading() 90 >>> turtle.radians() >>> turtle.heading() 1.5707963267948966 rN)rrrrrrrr^5s zTNavigator.radianscCs|j|j|}||dS)z)move turtle forward by specified distanceN)r r _goto)rr;Zenderrr_goCszTNavigator._gocCs||j9}|j||_dS)z=Turn turtle counterclockwise by specified angle if angle > 0.N)rr rrrrrr_rotateHs zTNavigator._rotatecCs ||_dS)zmove turtle to position end.Nr )rendrrrrMszTNavigator._gotocCs||dS)aMove the turtle forward by the specified distance. Aliases: forward | fd Argument: distance -- a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 0.00) >>> turtle.forward(25) >>> turtle.position() (25.00,0.00) >>> turtle.forward(-75) >>> turtle.position() (-50.00,0.00) Nrrr;rrrrCQszTNavigator.forwardcCs|| dS)aMove the turtle backward by distance. Aliases: back | backward | bk Argument: distance -- a number Move the turtle backward by distance, opposite to the direction the turtle is headed. Do not change the turtle's heading. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 0.00) >>> turtle.backward(30) >>> turtle.position() (-30.00, 0.00) Nrrrrrr/hszTNavigator.backcCs|| dS)aTurn turtle right by angle units. Aliases: right | rt Argument: angle -- a number (integer or float) Turn turtle right by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends on mode. (See this.) Example (for a Turtle instance named turtle): >>> turtle.heading() 22.0 >>> turtle.right(45) >>> turtle.heading() 337.0 Nrrrrrr_|szTNavigator.rightcCs||dS)aTurn turtle left by angle units. Aliases: left | lt Argument: angle -- a number (integer or float) Turn turtle left by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends on mode. (See this.) Example (for a Turtle instance named turtle): >>> turtle.heading() 22.0 >>> turtle.left(45) >>> turtle.heading() 67.0 NrrrrrrPszTNavigator.leftcCs|jS)zReturn the turtle's current location (x,y), as a Vec2D-vector. Aliases: pos | position No arguments. Example (for a Turtle instance named turtle): >>> turtle.pos() (0.00, 240.00) rrrrrr[s zTNavigator.poscCs |jdS)z Return the turtle's x coordinate. No arguments. Example (for a Turtle instance named turtle): >>> reset() >>> turtle.left(60) >>> turtle.forward(100) >>> print turtle.xcor() 50.0 rrrrrrr|s zTNavigator.xcorcCs |jdS)a  Return the turtle's y coordinate --- No arguments. Example (for a Turtle instance named turtle): >>> reset() >>> turtle.left(60) >>> turtle.forward(100) >>> print turtle.ycor() 86.6025403784 rrrrrrr}s zTNavigator.ycorcCs,|dur|t|n|t||dS)atMove turtle to an absolute position. Aliases: setpos | setposition | goto: Arguments: x -- a number or a pair/vector of numbers y -- a number None call: goto(x, y) # two coordinates --or: goto((x, y)) # a pair (tuple) of coordinates --or: goto(vec) # e.g. as returned by pos() Move turtle to an absolute position. If the pen is down, a line will be drawn. The turtle's orientation does not change. Example (for a Turtle instance named turtle): >>> tp = turtle.pos() >>> tp (0.00, 0.00) >>> turtle.setpos(60,30) >>> turtle.pos() (60.00,30.00) >>> turtle.setpos((20,80)) >>> turtle.pos() (20.00,80.00) >>> turtle.setpos(tp) >>> turtle.pos() (0.00,0.00) N)rr)rrrrrrrIszTNavigator.gotocCs|dd|ddS)a$Move turtle to the origin - coordinates (0,0). No arguments. Move turtle to the origin - coordinates (0,0) and set its heading to its start-orientation (which depends on mode). Example (for a Turtle instance named turtle): >>> turtle.home() rN)rIrdrrrrrLs zTNavigator.homecCs|t||jddS)aSet the turtle's first coordinate to x Argument: x -- a number (integer or float) Set the turtle's first coordinate to x, leave second coordinate unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 240.00) >>> turtle.setx(10) >>> turtle.position() (10.00, 240.00) rNrrr )rrrrrriszTNavigator.setxcCs|t|jd|dS)aSet the turtle's second coordinate to y Argument: y -- a number (integer or float) Set the turtle's first coordinate to x, second coordinate remains unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 40.00) >>> turtle.sety(-10) >>> turtle.position() (0.00, -10.00) rNr)rrrrrrjszTNavigator.setycCsT|durt||}t|tr"|}n$t|tr6t|}nt|trF|j}t||jS)aReturn the distance from the turtle to (x,y) in turtle step units. Arguments: x -- a number or a pair/vector of numbers or a turtle instance y -- a number None None call: distance(x, y) # two coordinates --or: distance((x, y)) # a pair (tuple) of coordinates --or: distance(vec) # e.g. as returned by pos() --or: distance(mypen) # where mypen is another turtle Example (for a Turtle instance named turtle): >>> turtle.pos() (0.00, 0.00) >>> turtle.distance(30,40) 50.0 >>> pen = Turtle() >>> pen.forward(77) >>> turtle.distance(pen) 77.0 N)rrrrr abs)rrrr[rrrr;%s     zTNavigator.distancecCs|durt||}t|tr"|}n$t|tr6t|}nt|trF|j}||j\}}tt||dtjdd}||j }|j |j ||j S)aCReturn the angle of the line from the turtle's position to (x, y). Arguments: x -- a number or a pair/vector of numbers or a turtle instance y -- a number None None call: distance(x, y) # two coordinates --or: distance((x, y)) # a pair (tuple) of coordinates --or: distance(vec) # e.g. as returned by pos() --or: distance(mypen) # where mypen is another turtle Return the angle, between the line from turtle-position to position specified by x, y and the turtle's start orientation. (Depends on modes - "standard" or "logo") Example (for a Turtle instance named turtle): >>> turtle.pos() (10.00, 10.00) >>> turtle.towards(0,0) 225.0 Nrrr) rrrrr rratan2rrrr r)rrrr[resultrrrruEs       zTNavigator.towardscCsJ|j\}}tt||dtjdd}||j}|j|j||jS)z Return the turtle's current heading. No arguments. Example (for a Turtle instance named turtle): >>> turtle.left(67) >>> turtle.heading() 67.0 rrr) r rrrrrrr r)rrrr rrrrJhs   zTNavigator.headingcCs>|||j}|j}||d||d}||dS)aSet the orientation of the turtle to to_angle. Aliases: setheading | seth Argument: to_angle -- a number (integer or float) Set the orientation of the turtle to to_angle. Here are some common directions in degrees: standard - mode: logo-mode: -------------------|-------------------- 0 - east 0 - north 90 - north 90 - east 180 - west 180 - south 270 - south 270 - west Example (for a Turtle instance named turtle): >>> turtle.setheading(90) >>> turtle.heading() 90 @N)rJr rr)rZto_anglerfullrrrrdwszTNavigator.setheadingc Csp|jr|jdgd|j_|}|dur2|j}|durjt||j}dttdt|dd|}d||}d |}d |t |tj d |j }|d kr| | | }}}| } | } |d kr| d d n |d ||t|D].} |||||d ||q|| |d krR| | | |||jrld |j_dS)a Draw a circle with given radius. Arguments: radius -- a number extent (optional) -- a number steps (optional) -- an integer Draw a circle with given radius. The center is radius units left of the turtle; extent - an angle - determines which part of the circle is drawn. If extent is not given, draw the entire circle. If extent is not a full circle, one endpoint of the arc is the current pen position. Draw the arc in counterclockwise direction if radius is positive, otherwise in clockwise direction. Finally the direction of the turtle is changed by the amount of extent. As the circle is approximated by an inscribed regular polygon, steps determines the number of steps to use. If not given, it will be calculated automatically. Maybe used to draw regular polygons. call: circle(radius) # full circle --or: circle(radius, extent) # arc --or: circle(radius, extent, steps) --or: circle(radius, steps=6) # 6-sided polygon Example (for a Turtle instance named turtle): >>> turtle.circle(50) >>> turtle.circle(120, 180) # semicircle seqTNr g@gM@rrr!rrF)r rrrprrrminrrrr_tracerrPrrr) rradiusZextentstepsrpZfracr9Zw2ltrZdlrrrrr4s>" "          zTNavigator.circlecCsdSz/dummy method - to be overwritten by child classNr)rrrrrrpszTNavigator.speedcCsdSr+r)rarrrrr&szTNavigator._tracercCsdSr+r)rrrrrrPszTNavigator._delay)N)r)N)N)N)NN)r)NN)N).rrrrrr Z DEFAULT_MODErrrr`rrr:r^rrrrCr/r_rPr[r|r}rIrLrirjr;rurJrdr4rpr&rPr@r3r0rbrQr\rerfrcrrrrrsZ     # # A   rc@seZdZdZedfddZededfddZd.d d Zd/d d ZddZ ddZ ddZ d0ddZ ddZ ddZddZddZddZd d!Zd1d"d#Zd2d%d&Zd3d(d)Zd*d+Zd,d-ZeZe Ze Ze Ze ZeZeZd S)4TPenzFDrawing part of the RawTurtle. Implements drawing properties. racCs||_d|_t|dSr) _resizemoder r-_reset)rrarrrrsz TPen.__init__rWrAcCsFd|_d|_||_||_d|_d|_d|_d|_d|_d|_ d|_ dS)NrTr)rrr)rrrr) _pensize_shown _pencolor _fillcolor_drawing_speed_stretchfactor _shearfactor_tilt _shapetrafo _outlinewidth)rrWrArrrr/sz TPen._resetNcCs.|dur|jS|}|dvr*|j|ddS)azSet resizemode to one of the values: "auto", "user", "noresize". (Optional) Argument: rmode -- one of the strings "auto", "user", "noresize" Different resizemodes have the following effects: - "auto" adapts the appearance of the turtle corresponding to the value of pensize. - "user" adapts the appearance of the turtle according to the values of stretchfactor and outlinewidth (outline), which are set by shapesize() - "noresize" no adaption of the turtle's appearance takes place. If no argument is given, return current resizemode. resizemode("user") is called by a call of shapesize with arguments. Examples (for a Turtle instance named turtle): >>> turtle.resizemode("noresize") >>> turtle.resizemode() 'noresize' N)autouserrra)r.rrV)rZrmoderrrras zTPen.resizemodecCs|dur|jS|j|ddS)a!Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, current pensize is returned. Example (for a Turtle instance named turtle): >>> turtle.pensize() 1 >>> turtle.pensize(10) # from here on lines of width 10 are drawn N)rY)r0rV)rrzrrrrYsz TPen.pensizecCs|js dS|jdddS)zPull the pen up -- no drawing when moving. Aliases: penup | pu | up No argument Example (for a Turtle instance named turtle): >>> turtle.penup() NFrXr4rVrrrrrZ0s z TPen.penupcCs|jr dS|jdddS)zPull the pen down -- drawing when moving. Aliases: pendown | pd | down No argument. Example (for a Turtle instance named turtle): >>> turtle.pendown() NTr>r?rrrrrX>s z TPen.pendowncCs|jS)aReturn True if pen is down, False if it's up. No argument. Example (for a Turtle instance named turtle): >>> turtle.penup() >>> turtle.isdown() False >>> turtle.pendown() >>> turtle.isdown() True )r4rrrrrNLs z TPen.isdowncCsjdddddd}|dur|jS||vr0||}n*d|krDd krVnntt|}nd}|j|d dS) a Return or set the turtle's speed. Optional argument: speed -- an integer in the range 0..10 or a speedstring (see below) Set the turtle's speed to an integer value in the range 0 .. 10. If no argument is given: return current speed. If input is a number greater than 10 or smaller than 0.5, speed is set to 0. Speedstrings are mapped to speedvalues in the following way: 'fastest' : 0 'fast' : 10 'normal' : 6 'slow' : 3 'slowest' : 1 speeds from 1 to 10 enforce increasingly faster animation of line drawing and turtle turning. Attention: speed = 0 : *no* animation takes place. forward/back makes turtle jump and likewise left/right make the turtle turn instantly. Example (for a Turtle instance named turtle): >>> turtle.speed(3) rrrrr)ZfastestfastnormalZslowZslowestNrg%@)rp)r5rrrV)rrpZspeedsrrrrp[s z TPen.speedcGs|rht|}|dkr"|d}}n"|dkr4|\}}n|dkrD|}}||}||}|j||dn||j||jfSdS)aReturn or set the pencolor and fillcolor. Arguments: Several input formats are allowed. They use 0, 1, 2, or 3 arguments as follows: color() Return the current pencolor and the current fillcolor as a pair of color specification strings as are returned by pencolor and fillcolor. color(colorstring), color((r,g,b)), color(r,g,b) inputs as in pencolor, set both, fillcolor and pencolor, to the given value. color(colorstring1, colorstring2), color((r1,g1,b1), (r2,g2,b2)) equivalent to pencolor(colorstring1) and fillcolor(colorstring2) and analogously, if the other input format is used. If turtleshape is a polygon, outline and interior of that polygon is drawn with the newly set colors. For more info see: pencolor, fillcolor Example (for a Turtle instance named turtle): >>> turtle.color('red', 'green') >>> turtle.color() ('red', 'green') >>> colormode(255) >>> color((40, 80, 120), (160, 200, 240)) >>> color() ('#285078', '#a0c8f0') rrrr)rWrAN)rrrVrr2r3)rrr)ZpcolorZfcolorrrrr9s    z TPen.colorcGs:|r*||}||jkrdS|j|dn ||jSdS)aZ Return or set the pencolor. Arguments: Four input formats are allowed: - pencolor() Return the current pencolor as color specification string, possibly in hex-number format (see example). May be used as input to another color/pencolor/fillcolor call. - pencolor(colorstring) s is a Tk color specification string, such as "red" or "yellow" - pencolor((r, g, b)) *a tuple* of r, g, and b, which represent, an RGB color, and each of r, g, and b are in the range 0..colormode, where colormode is either 1.0 or 255 - pencolor(r, g, b) r, g, and b represent an RGB color, and each of r, g, and b are in the range 0..colormode If turtleshape is a polygon, the outline of that polygon is drawn with the newly set pencolor. Example (for a Turtle instance named turtle): >>> turtle.pencolor('brown') >>> tup = (0.2, 0.8, 0.55) >>> turtle.pencolor(tup) >>> turtle.pencolor() '#33cc8c' N)rW)rr2rVrrrrrrWs   z TPen.pencolorcGs:|r*||}||jkrdS|j|dn ||jSdS)a] Return or set the fillcolor. Arguments: Four input formats are allowed: - fillcolor() Return the current fillcolor as color specification string, possibly in hex-number format (see example). May be used as input to another color/pencolor/fillcolor call. - fillcolor(colorstring) s is a Tk color specification string, such as "red" or "yellow" - fillcolor((r, g, b)) *a tuple* of r, g, and b, which represent, an RGB color, and each of r, g, and b are in the range 0..colormode, where colormode is either 1.0 or 255 - fillcolor(r, g, b) r, g, and b represent an RGB color, and each of r, g, and b are in the range 0..colormode If turtleshape is a polygon, the interior of that polygon is drawn with the newly set fillcolor. Example (for a Turtle instance named turtle): >>> turtle.fillcolor('violet') >>> col = turtle.pencolor() >>> turtle.fillcolor(col) >>> turtle.fillcolor(0, .5, 0) N)rA)rr3rVrrrrrrAs   zTPen.fillcolorcCs|jdddS)zMakes the turtle visible. Aliases: showturtle | st No argument. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() >>> turtle.showturtle() TshownNrVrrrrros zTPen.showturtlecCs|jdddS)aYMakes the turtle invisible. Aliases: hideturtle | ht No argument. It's a good idea to do this while you're in the middle of a complicated drawing, because hiding the turtle speeds up the drawing observably. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() FrBNrDrrrrrK szTPen.hideturtlecCs|jS)zReturn True if the Turtle is shown, False if it's hidden. No argument. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() >>> print turtle.isvisible(): False )r1rrrrrO s zTPen.isvisiblec Ks|j|j|j|j|j|j|j|j|j|j |j d }|s>|s>|St |t rN|}ni}| |i}|D]}||||<qd|jr|jd|fd}d|vr|j|dkrd}d|vrt |dtr||df|d<|j|dkrd}d|vr|j|dkrd}|r|d|vr&|d|_d|vr:|d|_d|vrN|d|_d|vrt |dtr|||df|d<|d|_d |vr|d |_d |vr|d |_d |vr|d }t |ttfr||f}||_d |vr|d |_d |vr|d |_ d|vr|d|_d|vr.|d|_ d |vsLd|vsLd |vr|j\} } |j} t|j t|j } } | | | | | | | | | | | | f|_|dS)aLReturn or set the pen's attributes. Arguments: pen -- a dictionary with some or all of the below listed keys. **pendict -- one or more keyword-arguments with the below listed keys as keywords. Return or set the pen's attributes in a 'pen-dictionary' with the following key/value pairs: "shown" : True/False "pendown" : True/False "pencolor" : color-string or color-tuple "fillcolor" : color-string or color-tuple "pensize" : positive number "speed" : number in range 0..10 "resizemode" : "auto" or "user" or "noresize" "stretchfactor": (positive number, positive number) "shearfactor": number "outline" : positive number "tilt" : number This dictionary can be used as argument for a subsequent pen()-call to restore the former pen-state. Moreover one or more of these attributes can be provided as keyword-arguments. This can be used to set several pen attributes in one statement. Examples (for a Turtle instance named turtle): >>> turtle.pen(fillcolor="black", pencolor="red", pensize=10) >>> turtle.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'red', 'pendown': True, 'fillcolor': 'black', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} >>> penstate=turtle.pen() >>> turtle.color("yellow","") >>> turtle.penup() >>> turtle.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'yellow', 'pendown': False, 'fillcolor': '', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} >>> p.pen(penstate, fillcolor="green") >>> p.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'red', 'pendown': True, 'fillcolor': 'green', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} ) rCrXrWrArYrpra stretchfactorrnr<rsrVFrXTrWrYrArprarErnr<rCrsN)r1r4r2r3r0r5r.r6r7r:r8rdictr,r rrr_newLinerrrrrr9rM)rrVZpendictZ_pdpZ_p_bufrZnewLineZsfZscxZscyZshfsacarrrrV! s/                          zTPen.penTcCsdSr+rrZusePosrrrrG sz TPen._newLineFcCsdSr+r)rrZforcedrrrrM sz TPen._updatecCsdSr+rrrrrr sz TPen._colorcCsdSr+rrrrrr szTPen._colorstr)N)N)N)N)T)TF)rrrrrrr/rarYrZrXrNrpr9rWrArorKrOrVrGrMrrrzryr]rUr=rqrMrrrrr-s:    &.%$    r-c@s eZdZdZddZddZdS) _TurtleImagez6Helper class: Datatype to store Turtle attributes cCs||_d|_||dSr)rr| _setshape)rr shapeIndexrrrr sz_TurtleImage.__init__cs|j||_|jdkr*j|jkr2nndS|jdkrPj|jkrXnndS|jdvrp|jn |jdkr|jD]}|qj|j|_|jdkr|_nF|jdkrԈjdj|_n&|jdkrfddj|jD|_dS)Nrrw)rwrrr2csg|] }qSrr=r~rKrrrr rz*_TurtleImage._setshape..) rrNr|rrL_itemr=rxr)rrNrKrrQrrM s(""          z_TurtleImage._setshapeN)rrrrrrMrrrrrL srLc@seZdZdZgZdedededfddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ dmddZddZddZddZddZdnd d!Zdod"d#Zdpd$d%Zd&d'Zdqd(d)Zd*d+Zdrd,d-Zd.d/Zd0d1Zdsd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z dtd=d>Z!d?d@Z"dAdBZ#dCdDZ$dudFdGZ%dHdIZ&dJdKZ'dLdMZ(dvdNdOZ)dPdQZ*dwdTdUZ+dVdWZ,dXdYZ-dZd[Z.d\d]Z/d^d_Z0e0Z1dxd`daZ2dydcddZ3dzdedfZ4d{dgdhZ5didjZ6dkdlZ7eZ8dS)|r zvAnimation part of the RawTurtle. Puts RawTurtle upon a TurtleScreen and provides tools for its animation. NrkrrcCs4t|tr||_n|t|tr:|tjvr2tj|||_nTt|ttfrtjD]}|j |krN||_qqNt||_tj|jn t d||j}t || t ||j|||_t|||_d|_d|_d|_|_||_d|_||_|jg|_|jg|_g|_||_t ||_!|"dS)Nzbad canvas argument %sF)#r_Screenrrr screensrArrr1rrrrr-rrGdrawingLineItemrLr_poly _creatingPoly _fillitem _fillpathr1_hidden_from_screencurrentLineItemr  currentLiner stampItems_undobuffersizerr rM)rZcanvasrkrrrrrrr s@                 zRawTurtle.__init__cCs0t|t||||dS)aDelete the turtle's drawings and restore its default values. No argument. Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00,-22.00) >>> turtle.heading() 100.0 >>> turtle.reset() >>> turtle.position() (0.00,0.00) >>> turtle.heading() 0.0 N)rr`r-r/_clearrrMrrrrr` s   zRawTurtle.resetcCs&|dus|dkrd|_n t||_dS)aSet or disable undobuffer. Argument: size -- an integer or None If size is an integer an empty undobuffer of given size is installed. Size gives the maximum number of turtle-actions that can be undone by the undo() function. If size is None, no undobuffer is present. Example (for a Turtle instance named turtle): >>> turtle.setundobuffer(42) Nr)r r)rsizerrrrh szRawTurtle.setundobuffercCs|jdurdS|jS)zReturn count of entries in the undobuffer. No argument. Example (for a Turtle instance named turtle): >>> while undobufferentries(): ... undo() Nr)r rrrrrrx, s zRawTurtle.undobufferentriescCsld|_|_|jD]}|j|q|j|_g|_|jrJ|j |j |jg|_| | |j dS)zDelete all of pen's drawingsN)rXrYrrrLrGr[r\r4rAr r7rhr^rJrrrr_9 s    zRawTurtle._clearcCs||dS)agDelete the turtle's drawings from the screen. Do not move turtle. No arguments. Delete the turtle's drawings from the screen. Do not move turtle. State and position of the turtle as well as drawings of other turtles are not affected. Examples (for a Turtle instance named turtle): >>> turtle.clear() N)r_rMrrrrr5G s zRawTurtle.clearcCsF|j|jjdkrdSt|jdkrB|j|j|j|j|jdSr) rrrrr\rHr[r2r0rrrrrV s  zRawTurtle._update_datacCsx|j}|jdkrdS|jdkrD|||||jn0||jdkrt|D] }|q^|dS)z&Perform a Turtle-data update. rNr) rrrrrMrPrrr+)rrrtrrrrM^ s     zRawTurtle._updatecCs|j||S)amTurns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) Second arguments sets delay value (see RawTurtle.delay()) Example (for a Turtle instance named turtle): >>> turtle.tracer(8, 25) >>> dist = 2 >>> for i in range(200): ... turtle.fd(dist) ... turtle.rt(90) ... dist += 2 )rr*)rflagrrrrr&p szRawTurtle._tracercCs |j|Sr)rrrrrrr szRawTurtle._colorcCs |j|Sr)rrrrrrr szRawTurtle._colorstrc Cst|tr|Sz|\}}}Wn&ttfyBtdt|Yn0|jjdkrjdd|||fD\}}}d|kr~dkrnn.d|krdkrnnd|krdksntdt|d|||fS) z,Convert colortriples to hexstrings. rrcSsg|]}td|qSrrrrrrr rz!RawTurtle._cc..rrrr)rrrrrrr)rrrrrrrr_cc s  Fz RawTurtle._cccs|j||j|j}d|_d|_t|}|_||_|_t|jj|_j|j |jjj }|dkr |j_ nJ|dkr j dj|j_ n*|dkrʇfddj |jjjD|j_ |_||S)aCreate and return a clone of the turtle. No argument. Create and return a clone of the turtle with same position, heading and turtle properties. Example (for a Turtle instance named mick): mick = Turtle() joe = mick.clone() Nrrwr2rcsg|] }qSrrOrPrQrrr rz#RawTurtle.clone..)rrGr4rrrLrNrrArr|r=rRrxrrGr[rM)rrqttyperrQrr8 s.      zRawTurtle.clonecCsB|dur|jjS||jvr*td||j||dS)aSet turtle shape to shape with given name / return current shapename. Optional argument: name -- a string, which is a valid shapename Set turtle shape to shape with given name or, if name is not given, return name of current shape. Shape with name must exist in the TurtleScreen's shape dictionary. Initially there are the following polygon shapes: 'arrow', 'turtle', 'circle', 'square', 'triangle', 'classic'. To learn about how to deal with shapes see Screen-method register_shape. Example (for a Turtle instance named turtle): >>> turtle.shape() 'arrow' >>> turtle.shape("turtle") >>> turtle.shape() 'turtle' NzThere is no shape named %s)rrNrrrrMrM)rrrrrrk s   zRawTurtle.shapecCs||ur|urdur8nn|j\}}|||jfS|dksH|dkrPtd|durt|durj||f}q||f}n|dur|jd|f}n|j}|dur|j}|jd||ddS)aOSet/return turtle's stretchfactors/outline. Set resizemode to "user". Optional arguments: stretch_wid : positive number stretch_len : positive number outline : positive number Return or set the pen's attributes x/y-stretchfactors and/or outline. Set resizemode to "user". If and only if resizemode is set to "user", the turtle will be displayed stretched according to its stretchfactors: stretch_wid is stretchfactor perpendicular to orientation stretch_len is stretchfactor in direction of turtles orientation. outline determines the width of the shapes's outline. Examples (for a Turtle instance named turtle): >>> turtle.resizemode("user") >>> turtle.shapesize(5, 5, 12) >>> turtle.shapesize(outline=8) Nrz(stretch_wid/stretch_len must not be zeror<)rarEr<)r6r:rrV)rZ stretch_widZ stretch_lenr<rErrrrl s""    zRawTurtle.shapesizecCs |dur|jS|jd|ddS)aSet or return the current shearfactor. Optional argument: shear -- number, tangent of the shear angle Shear the turtleshape according to the given shearfactor shear, which is the tangent of the shear angle. DO NOT change the turtle's heading (direction of movement). If shear is not given: return the current shearfactor, i. e. the tangent of the shear angle, by which lines parallel to the heading of the turtle are sheared. Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.shearfactor(0.5) >>> turtle.shearfactor() >>> 0.5 Nr<)rarn)r7rV)rZshearrrrrn szRawTurtle.shearfactorcCs<| |j|j}|tjddtj}|jd|ddS)aIRotate the turtleshape to point in the specified direction Argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.settiltangle(45) >>> stamp() >>> turtle.fd(50) >>> turtle.settiltangle(-45) >>> stamp() >>> turtle.fd(50) rrr<)rarsN)rr rrrVrrrsrrrrg szRawTurtle.settiltanglecCs>|dur0|j dtj|j}||j|jS||dS)aSet or return the current tilt-angle. Optional argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). If angle is not given: return the current tilt-angle, i. e. the angle between the orientation of the turtleshape and the heading of the turtle (its direction of movement). Deprecated since Python 3.1 Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.tilt(45) >>> turtle.tiltangle() Nr)r8rrr rrrgrerrrrt4 szRawTurtle.tiltanglecCs|||dS)aRotate the turtleshape by angle. Argument: angle - a number Rotate the turtleshape by angle from its current tilt-angle, but do NOT change the turtle's heading (direction of movement). Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.tilt(30) >>> turtle.fd(50) >>> turtle.tilt(30) >>> turtle.fd(50) N)rgrtrrrrrsN szRawTurtle.tiltcCs6||ur(|ur(|ur(dur2nn|jS|j\}}}}|durL|}|durX|}|durd|}|durp|}||||dkrtd||||f|_t| |dtj} t| t| } } | || || || || || || || |f\} } }}| |f|_| ||_| |_ |j dddS)aSet or return the current transformation matrix of the turtle shape. Optional arguments: t11, t12, t21, t22 -- numbers. If none of the matrix elements are given, return the transformation matrix. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and second row t21, 22. Modify stretchfactor, shearfactor and tiltangle according to the given matrix. Examples (for a Turtle instance named turtle): >>> turtle.shape("square") >>> turtle.shapesize(4,2) >>> turtle.shearfactor(-0.5) >>> turtle.shapetransform() (4.0, -1.0, -0.0, 2.0) Nrz0Bad shape transform matrix: must not be singularrr<r=) r9rrrrrrr6r7r8rV)rt11t12t21t22Zm11Zm12Zm21Zm22ZalfarIrJZa11Za12Za21Za22rrrrma s&,       zRawTurtle.shapetransformcs^|j|j\|j\tjj}dt||\fdd|DS)zlComputes transformed polygon shapes from a shape according to current position and heading. rcsFg|]>\}}||j ||jfqSr)r7r8r~rrZe0e1Zp0Zp1rrrr sz(RawTurtle._polytrafo..)rr r rr8r7r)rrerrkr _polytrafo s  zRawTurtle._polytrafocCs2|jj|jj}|jdkr.||j|jdkSdS)a@Return the current shape polygon as tuple of coordinate pairs. No argument. Examples (for a Turtle instance named turtle): >>> turtle.shape("square") >>> turtle.shapetransform(4, -1, 0, 2) >>> turtle.get_shapepoly() ((50, -20), (30, 20), (-50, 20), (-30, -20)) rrN)rrrrNr| _getshapepolyr)rrkrrrrG s  zRawTurtle.get_shapepolyFcsx|jdks|r|j\n>|jdkrNtd|jd}|dd|f\n|jdkr\|Stfdd|DS) z`Calculate transformed shape polygon according to resizemode and shapetransform. r<r;rg@rrc3s2|]*\}}||||fVqdSrrrjrfrgrhrirrr rz*RawTurtle._getshapepoly..)r.r9maxr0r)rrrr)rrprro s  zRawTurtle._getshapepolyc Cs|j}|j|jj}|j}|jj}|jr*|jdkr*|jdkr*d|_ |j }|dkr|j dkrfd}n|j dkrx|j }n|j }|||}|j|j}}|j|||||ddnt|d kr|||j|nZ|d krt||D]D\} \} }}||| d} |j| | |||||j ddqnx|j r6d S|dkrR||d d d nJ|d krv|||j|jdj n&|d kr|D]} || d d d qd|_ d S)zpManages the correct rendering of the turtle with respect to its shape, resizemode, stretch and tilt etc.rFrrrr;Tr$r<rzrDrwrNrrrrr2)rrrrNr|rRr1rrrZrr.r0r:rnror3r2rFrzr ziprb) rrrkrdZtitemtshaper9fcocrKrrrrr sH         zRawTurtle._drawturtlec CsT|j}|j|jj}|j}|j}|dkr|}|jdkr@d}n|jdkrR|j}n|j }| | |}|j |j }}|j|||||ddn|dkr|d}|||j|n|d kr4g}|D]} |} || qt|}t||D]D\} \} }}| | | d} |j| | |||||j ddq|j||jd |f|S) aStamp a copy of the turtleshape onto the canvas and return its id. No argument. Stamp a copy of the turtle shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling clearstamp(stamp_id). Example (for a Turtle instance named turtle): >>> turtle.color("blue") >>> turtle.stamp() 13 >>> turtle.fd(50) rrrr;Trrrwrrrr)rrrrNr|rr=r.r0r:rnror3r2rFrxrzr rArrtrbr]r r) rrrkrdrustitemr9rvrwelementrKrrrrrr s>     zRawTurtle.stampcCs||jvrDt|tr,|D]}|j|qn |j||j|d|f}|j}||jvr`dS|j|}|j|||j kr|j d|j |_ |j |j d|j dgdS)z9does the work for clearstamp() and clearstamps() rrNr) r]rrrrLrr rindexrrinsert)rstampidZsubitemrKbufrzrrr _clearstamp s        zRawTurtle._clearstampcCs|||dS)aDDelete stamp with given stampid Argument: stampid - an integer, must be return value of previous stamp() call. Example (for a Turtle instance named turtle): >>> turtle.color("blue") >>> astamp = turtle.stamp() >>> turtle.fd(50) >>> turtle.clearstamp(astamp) N)r~rM)rr|rrrr6 s zRawTurtle.clearstampcCs^|dur|jdd}n&|dkr0|jd|}n|j|d}|D]}||qB|dS)aDelete all or first/last n of turtle's stamps. Optional argument: n -- an integer If n is None, delete all of pen's stamps, else if n > 0 delete first n stamps else if n < 0 delete last n stamps. Example (for a Turtle instance named turtle): >>> for i in range(8): ... turtle.stamp(); turtle.fd(30) ... >>> turtle.clearstamps(2) >>> turtle.clearstamps(-2) >>> turtle.clearstamps() Nr)r]r~rM)rrZtoDeleterKrrrr7- s zRawTurtle.clearstampsc Cs|j|j|jt|jtf}|j}d|j|||j|j dd| |j|j ddff}|j rh|j ||j}|jrZ|jdkrZ||}|d|jd|d|jd}dt|ddd|j|j}|d |} td|D]R} | dkrd } nd } || | |_|jr2||j||jf|j|j| |q|jrZ|j|jd d |jd|jrn|j |t|jtr|j|||_|jr|j|t|j dkr||dS)zMove the pen to the point end, thereby drawing a line if pen is down. All other methods for turtle movement depend on this one. goNrrrrr皙?rTFrrrr$rz*)r4r2r0rrYrrr r[r\rrr rr5rr7r8rrrHrUrMrArWrVrrG) rrgo_modesrZ undo_entrystartdiffdiffsqnhopsdeltarrDrrrrI s\      $$       zRawTurtle._gotocs|\}}}}|\}}}} |\} } } |jt|j|dkrDtd| |_| |_| ddgkrbd} n|} j| | | |dfdd|jD}|D]}||j |q|}|j rj dkr||}|d j d |dj d }dt|dd d |j |j }|d |}td|D]P}|dkr@d}nd}||||_|rr|j||jf||||q,|rj|jdd|d||_|jrt|jd kr|j|jgkrd|_d|_| r|jgkrd|_tdn|jdur|j|dS)z)Reverse a _goto. Used for undo() rz$undogoto: HALLO-DA-STIMMT-WAS-NICHT!rrrcs&g|]}|vr|dkr|qS)r)r|r}rrrrr sz'RawTurtle._undogoto..rrrrrrTFrNzUnwahrscheinlich in _undogoto!)rrr rr[r\rHrrLrr5rr7r8rrrUrMrWrrVrrY)rentryoldnewrZcoodataZdrawingZpcZpsrBZcLIZcLrZusepcZtodeleterrrrrrrrDrrr _undogoto~ sf     $$          zRawTurtle._undogotocCs|jr|jd||jf||j9}|j|}|jj}|dkr|jdkrd|j}dtt ||}d||}t |D]}|j||_| q|||_| dS)z&Turns pen clockwise by angle. rotrrg@rN) r rrr rrrr5rrrrM)rrZ neworientrZanglevelr(rrrrrr s      zRawTurtle._rotateTcCsnt|jdkrD|j|j|j|j|j|j|_|j |jn|jj|jddg|_|rj|j g|_dS)zCloses current line item and starts a new one. Remark: if current line became too long, animation performance (via _drawline) slowed down considerably. rT)rDN) rr\rrHr[r2r0rGrrAr rKrrrrG s zRawTurtle._newLinecCs t|jtS)aReturn fillstate (True if filling, False else). No argument. Example (for a Turtle instance named turtle): >>> turtle.begin_fill() >>> if turtle.filling(): ... turtle.pensize(5) ... else: ... turtle.pensize(3) )rrYrrrrrrB s zRawTurtle.fillingcCsX|s"|j|_|j|j|jg|_||j rL|j d|jf| dS)a Called just before drawing a shape to be filled. No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill() beginfillN) rBrr=rXrrAr rYrGr rrMrrrrr1 s   zRawTurtle.begin_fillcCs^|rZt|jdkrF|jj|j|j|jd|jrF|jd|jfd|_|_| dS)a Fill the shape drawn after the call begin_fill(). No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill() rr>dofillN) rBrrYrrFrXr3r rrMrrrrr> s  zRawTurtle.end_fillc GsB|sNt|ttfr0||}|jt|jd}qr|j}|sr|jt|jd}n$|durh|jt|jd}||}t|jdr|j |j ||}|j ||j r|j d|fn|}|j r|j dgd|j _zH|dkr|||||||dW||n ||0|j r>d |j _dS) aDraw a dot with diameter size, using color. Optional arguments: size -- an integer >= 1 (if given) color -- a colorstring or a numeric color tuple Draw a circular dot with diameter size, using color. If size is not given, the maximum of pensize+4 and 2*pensize is used. Example (for a Turtle instance named turtle): >>> turtle.dot() >>> turtle.fd(50); turtle.dot(20, "blue"); turtle.fd(50) rN_dotr<r#Tr;rF)rrrrr0rqr2hasattrrrr rrAr rrVrrarMrXrYrWrC)rr`r9rKrVrrrr< s:        z RawTurtle.dotcCsB|j|j||||j\}}|j||jr>|jd|f|S)z)Performs the writing for write() wri)rr[r r2rrAr r)rrYrZrXrKrrrrr[H s zRawTurtle._writerPArialrrAcCs`|jr|jdgd|j_|t|||}|rN|\}}||||jr\d|j_dS)aWrite text at the current turtle position. Arguments: arg -- info, which is to be written to the TurtleScreen move (optional) -- True/False align (optional) -- one of the strings "left", "center" or right" font (optional) -- a triple (fontname, fontsize, fonttype) Write text - the string representation of arg - at the current turtle position according to align ("left", "center" or right") and with the given font. If move is True, the pen is moved to the bottom-right corner of the text. By default, move is False. Example (for a Turtle instance named turtle): >>> turtle.write('Home = ', True, align="center") >>> turtle.write((0,0), True) r#TFN)r rrr[rrr[re)rargmoverZrXrrrrrrr{R s  zRawTurtle.writecCs|jg|_d|_dS)aStart recording the vertices of a polygon. No argument. Start recording the vertices of a polygon. Current turtle position is first point of polygon. Example (for a Turtle instance named turtle): >>> turtle.begin_poly() TN)r rVrWrrrrr2o s zRawTurtle.begin_polycCs d|_dS)a7Stop recording the vertices of a polygon. No argument. Stop recording the vertices of a polygon. Current turtle position is last point of polygon. This will be connected with the first point. Example (for a Turtle instance named turtle): >>> turtle.end_poly() FN)rWrrrrr?} s zRawTurtle.end_polycCs|jdurt|jSdS)zReturn the lastly recorded polygon. No argument. Example (for a Turtle instance named turtle): >>> p = turtle.get_poly() >>> turtle.register_shape("myFavouriteShape", p) N)rVrrrrrrD s zRawTurtle.get_polycCs|jS)aReturn the TurtleScreen object, the turtle is drawing on. No argument. Return the TurtleScreen object, the turtle is drawing on. So TurtleScreen-methods can be called for that object. Example (for a Turtle instance named turtle): >>> ts = turtle.getscreen() >>> ts >>> ts.bgcolor("pink") rQrrrrrF szRawTurtle.getscreencCs|S)aUReturn the Turtleobject itself. No argument. Only reasonable use: as a function to return the 'anonymous turtle': Example: >>> pet = getturtle() >>> pet.fd(50) >>> pet >>> turtles() [] rrrrrrH szRawTurtle.getturtlecCs |j|S)zDSet delay value which determines speed of turtle animation. )rrrOrrrrP szRawTurtle._delayrcCs"|j|jj||||dS)aBind fun to mouse-click event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). add -- True or False. If True, new binding will be added, otherwise it will replace a former binding. Example for the anonymous turtle, i. e. the procedural way: >>> def turn(x, y): ... left(360) ... >>> onclick(turn) # Now clicking into the turtle will turn it. >>> onclick(None) # event-binding will be removed N)rrhrrRrMrrrrrR szRawTurtle.onclickcCs"|j|jj||||dS)aBind fun to mouse-button-release event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). Example (for a MyTurtle instance named joe): >>> class MyTurtle(Turtle): ... def glow(self,x,y): ... self.fillcolor("red") ... def unglow(self,x,y): ... self.fillcolor("") ... >>> joe = MyTurtle() >>> joe.onclick(joe.glow) >>> joe.onrelease(joe.unglow) Clicking on joe turns fillcolor red, unclicking turns it to transparent. N)rrirrRrMrrrrrT szRawTurtle.onreleasecCs|j|jj|||dS)aBind fun to mouse-move event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). Every sequence of mouse-move-events on a turtle is preceded by a mouse-click event on that turtle. Example (for a Turtle instance named turtle): >>> turtle.ondrag(turtle.goto) Subsequently clicking and dragging a Turtle will move it across the screen thereby producing handdrawings (if pen is down). N)rrjrrRrrrrrS szRawTurtle.ondragcCs,|jdurdS|dkr@|\}}|| ||j|j}n|dkr\|d}||n|dkrp||n|dvr|d}|j||j |n|dkr|d}|jj |dd d d nh|d kr|d}d|_ |_ ||jvr(|j||j |n$|d kr(t ||d|jdS) z2Does the main part of the work for undo() Nrrrrr)rr<rrsrr;rrV)r rrrr6rrrLrrrFrXrYr-rV)ractionrrZdegPAUdummyrxrKrrr_undos:           zRawTurtle._undocCsl|jdurdS|j}|d}|dd}|dkr\|rh|}||d|ddq4n |||dS)aundo (repeatedly) the last turtle action. No argument. undo (repeatedly) the last turtle action. Number of available undo actions is determined by the size of the undobuffer. Example (for a Turtle instance named turtle): >>> for i in range(4): ... turtle.fd(50); turtle.lt(80) ... >>> for i in range(8): ... turtle.undo() ... Nrrr#)r rr)rrKrrrrrrw's   zRawTurtle.undo)NN)N)NNN)N)N)NNNN)F)N)T)N)FrPr)N)rN)rN)rN)9rrrrrTrrr`rhrxr_r5rrMr&rrrbr8rkrlrnrgrtrsrmrnrGrorrrr~r6r7rrrrGrBr1r>r<r[r{r2r?rDrFrHrErPrRrTrSrrwrvrrrrr sr (  (  (   (  (- 5A  0        r cCstjdurtt_tjS)zReturn the singleton screen object. If none exists at the moment, create a new one and return it, else return the existing one.N)r _screenrSrrrrr Js r c@sfeZdZdZdZedZddZededededfd d Zd d Z d dZ ddZ ddZ dS)rSNr)cCstjdur4tt_|_|jtj|j|jtjdurtd}td}td}td}td}td}|j |||||j t_t |tj| ||||dS)Nrzrrrrr)rS_rootr!r)_titler,_destroyrrr&r'rrr&)rrzrrrrrrrrrXs   z_Screen.__init__rzrrrcCst|jdsdS|j}|j}t|trNd|krBdkrNnn||}|durb||d}t|trd|krdkrnn||}|dur||d}|j|||||dS)a  Set the size and position of the main window. Arguments: width: as integer a size in pixels, as float a fraction of the screen. Default is 50% of screen. height: as integer the height in pixels, as float a fraction of the screen. Default is 75% of screen. startx: if positive, starting position in pixels from the left edge of the screen, if negative from the right edge Default, startx=None is to center window horizontally. starty: if positive, starting position in pixels from the top edge of the screen, if negative from the bottom edge Default, starty=None is to center window vertically. Examples (for a Screen instance named screen): >>> screen.setup (width=200, height=200, startx=0, starty=0) sets window to 200x200 pixels, in upper left of screen >>> screen.setup(width=.75, height=0.5, startx=None, starty=None) sets window to 75% of screen by 50% of screen and centers r*Nrrr)rrr-r.rrr*r,)rrzrr(r)rTshrrrr&ns   " " z _Screen.setupcCs tjdurtj||t_dS)aqSet title of turtle-window Argument: titlestring -- a string, to appear in the titlebar of the turtle graphics window. This is a method of Screen-class. Not available for TurtleScreen- objects. Example (for a Screen instance named screen): >>> screen.title("Welcome to the turtle-zoo!") N)rSrr)r)rZ titlestringrrrr)s  z _Screen.titlecCs:|j}|tjur(dt_dt_dt_dt_dt_|dS)NF) rrSr rrrrrr+)rrootrrrrs z_Screen._destroycCs |dS)z~Shut the turtlegraphics window. Example (for a TurtleScreen instance named screen): >>> screen.bye() N)rrrrrrsz _Screen.byecsLfdd}|tdr"dSz tWntyFtdYn0dS)alGo into mainloop until the mouse is clicked. No arguments. Bind bye() method to mouseclick on TurtleScreen. If "using_IDLE" - value in configuration dictionary is False (default value), enter mainloop. If IDLE with -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE's mainloop is active also for the client script. This is a method of the Screen-class and not available for TurtleScreen instances. Example (for a Screen instance named screen): >>> screen.exitonclick() cs dS)z&Screen.bye() with two dummy-parametersN)r)rrrrrexitGracefullysz+_Screen.exitonclick..exitGracefullyrNr)rRrrAttributeErrorexit)rrrrrrs    z_Screen.exitonclick) rrrrrrrrr&r)rrrrrrrrSRs  ( rSc@s4eZdZdZdZdZedededfddZdS)r zRawTurtle auto-creating (scrolled) canvas. When a Turtle object is created or a function derived from some Turtle method is called a TurtleScreen object is automatically created. NrkrrcCs,tjdurtt_tj|tj|||ddS)N)rkrr)r rr r r)rrkrrrrrrs  zTurtle.__init__)rrrrrrrrrrrrr sr turtle_docstringdictcCsi}tD]}d|}t|j||<qtD]}d|}t|j||<q(td|d}tdd|D}|d|dd D](}|d t||d ||q||d }|d t||d |||d |Wdn1s0YdS)aCreate and write docstring-dictionary to file. Optional argument: filename -- a string, used as filename default value is turtle_docstringdict Has to be called explicitly, (not used by the turtle-graphics classes) The docstring dictionary will be written to the Python script .py It is intended to serve as a template for translation of the docstrings into different languages. z_Screen.zTurtle.z%s.pyr9css$|]}|ddtvr|VqdS)rrN)r _alias_listrrrrrsz&write_docstringdict..zdocsdict = { Nrz%s : z """%s """, z """%s """ z} ) _tg_screen_functionsrr_tg_turtle_functionsrrr{reprclose)rdocsdict methodnamerrrrrrr~s$   c Cs^dd|i}t|}|j}|D]6}z||t|_Wq"tyVtd|Yq"0q"dS)zRead in docstrings from lang-specific docstring dictionary. Transfer docstrings, translated to lang, from a dictionary-file to the methods of classes Screen and Turtle and - in revised form - to the corresponding functions. z!turtle_docstringdict_%(language)srzBad docstring-entry: %sN)r __import__rrrrr)langmodnamemodulerrrrrread_docstringss rrzCannot find docsdict forz;Unknown Error when trying to import %s-docstring-dictionaryc Csd}}t|j\}}}|dd}|dd}|jp:g}dd|D}dgt|t||}ddt||D} |dur| d||d||dur| d||d|d | }d |}d |}d |}||fS) a?Get strings describing the arguments for the given object Returns a pair of strings representing function parameter lists including parenthesis. The first string is suitable for use in function definition and the second is suitable for use in function call. The "self" parameter is not included. rrNcSsg|]}d|fqS)z=%rr)r~rrrrr<rz"getmethparlist..cSsg|]\}}||qSrr)r~rZdfltrrrr>r*z**z, z(%s))inspectZgetargs__code__ __defaults__rrtrAr) obZdefTextZcallTextrZvarargsZvarkwZitems2ZrealArgsdefaultsZitems1rrrgetmethparlist,s&     rcCsJddl}|durdStd}|d|d}|d|}|d|}|S)z>>>>>)objinitrZ paramslistZargslist)getattrrr __func_bodyformatrglobalsr) Z functionsrrrZ docreviserrZpl1Zpl2Zdefstrrrr_make_global_funcsws     rzTurtle._screenzScreen()z Turtle._penzTurtle()__main__cCstrtntdSr)rNr]rUrrrr switchpensrcCslttdttdttdtdD]Z}|dkrDttdD]}tdt dqL|dkrxt dt ttd tq2td t d td tt dtdt dtdt d tt dd t dd t dtdD]$}tdt dtdt dqtdttdD]&}tdt dtdt dq:t dS)zDemo of old turtle.py - moduleTdrrrrZZmaroonr rrFZ startstartrredrN)r`r*ryr0r=rzrr1rCrPr9r>r_r{)rrrrrdemo1sX         rcCsBtdttdttddtddd}tdtdD]}tt |dqBt dt rnt q`t tdtd d}td tdtd td d D]p}|dkrttd d|dd|tdD]}t|tdqt|d7}tdttddqtdttdtdttddtdttdD](}t ddtdtdtdq`ttdttdttdt}|dt}|d|d| |d|d||dd|d||d|dd|d|dtt|d}||dkr|d|d ||||d|d!dkr| | t|d7}qZ|j d"d#d$d%|d&|dd'd(}t!"dt r| | q|d|j d)d*d+|#|dd,S)-zDemo of some new features.rrrr!rrzwait a moment...rZgreenrrrx Fr rZyellowr2rr;i(rZblueZorangerg @g333333?rzCAUGHT! )rrboldr_)rXrZrcSsttdSr)rr)rrrrrbabaszdemo2..babaz Click me!)ZCourierrr)rXN)$rprqrYrdrur;rbrrr4r{rxrwr`rQrrWr1rAr@r>r]rUr9rkrHrar rPryrIr=rrtimesleeprR)r'rZlaengerZtrirrrrrrdemo2s                             r)r)r)FrZ_vertkinterrrrrrrZos.pathrrrcopyrrZ _tg_classesrrZ _tg_utilities__all__rrrrrrrrrrrrrrrr"r!objectr/rrrrrrr-rLr r r rSr r r~rZ _LANGUAGE ImportErrorrrrrrrrrrrrrrrrrsN     5  c /&/O} "      5c