<s> import re <EOL> import sys <EOL> from idlelib import macosxSupport <EOL> class ZoomHeight : <EOL> menudefs = [ <EOL> ( '<STR_LIT>' , [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] ) <EOL> ] <EOL> def __init__ ( self , editwin ) : <EOL> self . editwin = editwin <EOL> def zoom_height_event ( self , event ) : <EOL> top = self . editwin . top <EOL> zoom_height ( top ) <EOL> def zoom_height ( top ) : <EOL> geom = top . wm_geometry ( ) <EOL> m = re . match ( r"<STR_LIT>" , geom ) <EOL> if not m : <EOL> top . bell ( ) <EOL> return <EOL> width , height , x , y = map ( int , m . groups ( ) ) <EOL> newheight = top . winfo_screenheight ( ) <EOL> if sys . platform == '<STR_LIT:win32>' : <EOL> newy = <NUM_LIT:0> <EOL> newheight = newheight - <NUM_LIT> <EOL> elif macosxSupport . isAquaTk ( ) : <EOL> newy = <NUM_LIT> <EOL> newheight = newheight - newy - <NUM_LIT> <EOL> else : <EOL> newy = <NUM_LIT:0> <EOL> newheight = newheight - <NUM_LIT> <EOL> if height >= newheight : <EOL> newgeom = "<STR_LIT>" <EOL> else : <EOL> newgeom = "<STR_LIT>" % ( width , newheight , x , newy ) <EOL> top . wm_geometry ( newgeom ) </s>
