@@ -67,7 +67,7 @@ def __init__(self, path = "", title = ""):
6767 else :
6868 sourceOS = 'UNIX'
6969 searchString = '\n '
70- change = EasyDialogs .AskYesNoCancel ('–%s” contains %s-style line feeds. '
70+ change = EasyDialogs .AskYesNoCancel ('"%s" contains %s-style line feeds. '
7171 'Change them to MacOS carriage returns?' % (self .title , sourceOS ), 1 )
7272 # bug: Cancel is treated as No
7373 if change > 0 :
@@ -224,14 +224,14 @@ def setupwidgets(self, text):
224224 self .linefield .bind ("<click>" , self .clicklinefield )
225225
226226 def makeoptionsmenu (self ):
227- menuitems = [('Font settingsƒ ' , self .domenu_fontsettings ),
228- ("Save optionsƒ " , self .domenu_options ),
227+ menuitems = [('Font settings \xc9 ' , self .domenu_fontsettings ),
228+ ("Save options \xc9 " , self .domenu_options ),
229229 '-' ,
230230 ('\0 ' + chr (self .run_as_main ) + 'Run as __main__' , self .domenu_toggle_run_as_main ),
231231 #('\0' + chr(self.run_with_interpreter) + 'Run with Interpreter', self.domenu_toggle_run_with_interpreter),
232232 #'-',
233233 ('Modularize' , self .domenu_modularize ),
234- ('Browse namespaceƒ ' , self .domenu_browsenamespace ),
234+ ('Browse namespace \xc9 ' , self .domenu_browsenamespace ),
235235 '-' ]
236236 if self .profiling :
237237 menuitems = menuitems + [('Disable profiler' , self .domenu_toggleprofiler )]
@@ -240,7 +240,7 @@ def makeoptionsmenu(self):
240240 if self .editgroup .editor ._debugger :
241241 menuitems = menuitems + [('Disable debugger' , self .domenu_toggledebugger ),
242242 ('Clear breakpoints' , self .domenu_clearbreakpoints ),
243- ('Edit breakpointsƒ ' , self .domenu_editbreakpoints )]
243+ ('Edit breakpoints \xc9 ' , self .domenu_editbreakpoints )]
244244 else :
245245 menuitems = menuitems + [('Enable debugger' , self .domenu_toggledebugger )]
246246 self .editgroup .optionsmenu .set (menuitems )
@@ -285,7 +285,7 @@ def domenu_browsenamespace(self, *args):
285285 def domenu_modularize (self , * args ):
286286 modname = _filename_as_modname (self .title )
287287 if not modname :
288- raise W .AlertError , 'CanÕt modularize –%s”' % self .title
288+ raise W .AlertError , "Can't modularize \" %s \" " % self .title
289289 run_as_main = self .run_as_main
290290 self .run_as_main = 0
291291 self .run ()
@@ -360,7 +360,7 @@ def close(self):
360360 import EasyDialogs
361361 import Qd
362362 Qd .InitCursor () # XXX should be done by dialog
363- save = EasyDialogs .AskYesNoCancel ('Save window –%s” before closing?' % self .title , 1 )
363+ save = EasyDialogs .AskYesNoCancel ('Save window "%s" before closing?' % self .title , 1 )
364364 if save > 0 :
365365 if self .domenu_save ():
366366 return 1
@@ -416,11 +416,7 @@ def domenu_save_as(self, *args):
416416 W .getapplication ().makescriptsmenu ()
417417
418418 def domenu_save_as_applet (self , * args ):
419- try :
420- import buildtools
421- except ImportError :
422- # only have buildtools in Python >= 1.5.2
423- raise W .AlertError , "–Save as Applet” is only supported in\r Python 1.5.2 and up."
419+ import buildtools
424420
425421 buildtools .DEBUG = 0 # ouch.
426422
@@ -504,7 +500,7 @@ def _run(self):
504500 if self .editgroup .editor .changed :
505501 import EasyDialogs
506502 import Qd ; Qd .InitCursor ()
507- save = EasyDialogs .AskYesNoCancel ('Save –%s” before running?' % self .title , 1 )
503+ save = EasyDialogs .AskYesNoCancel ('Save "%s" before running?' % self .title , 1 )
508504 if save > 0 :
509505 if self .domenu_save ():
510506 return
@@ -560,23 +556,23 @@ def _runselection(self):
560556 classname = string .split (string .strip (line [6 :]))[0 ]
561557 classend = identifieRE_match (classname )
562558 if classend < 1 :
563- raise W .AlertError , 'CanÕt find a class.'
559+ raise W .AlertError , "Can't find a class."
564560 classname = classname [:classend ]
565561 break
566562 elif line and line [0 ] not in '\t #' :
567- raise W .AlertError , 'CanÕt find a class.'
563+ raise W .AlertError , "Can't find a class."
568564 else :
569- raise W .AlertError , 'CanÕt find a class.'
565+ raise W .AlertError , "Can't find a class."
570566 if globals .has_key (classname ):
571567 locals = globals [classname ].__dict__
572568 else :
573- raise W .AlertError , 'CanÕt find class –%s”.' % classname
569+ raise W .AlertError , "Can't find class \" %s \" ." % classname
574570 # dedent to top level
575571 for i in range (len (lines )):
576572 lines [i ] = lines [i ][1 :]
577573 pytext = string .join (lines , '\r ' )
578574 elif indent > 0 :
579- raise W .AlertError , 'CanÕt run indented code.'
575+ raise W .AlertError , "Can't run indented code."
580576
581577 # add "newlines" to fool compile/exec:
582578 # now a traceback will give the right line number
@@ -839,7 +835,7 @@ def show(self):
839835 self .buttons = [ ("Find" , "cmdf" , self .find ),
840836 ("Replace" , "cmdr" , self .replace ),
841837 ("Replace all" , None , self .replaceall ),
842- ("DonÕt find" , "cmdd" , self .dont ),
838+ ("Don't find" , "cmdd" , self .dont ),
843839 ("Cancel" , "cmd." , self .cancel )
844840 ]
845841 for i in range (len (self .buttons )):
@@ -848,7 +844,7 @@ def show(self):
848844 self .w [title ] = W .Button (bounds , title , callback )
849845 if shortcut :
850846 self .w .bind (shortcut , self .w [title ].push )
851- self .w .setdefaultbutton (self .w ["DonÕt find" ])
847+ self .w .setdefaultbutton (self .w ["Don't find" ])
852848 self .w .find .edit .bind ("<key>" , self .key )
853849 self .w .bind ("<activate>" , self .activate )
854850 self .w .bind ("<close>" , self .close )
@@ -881,11 +877,11 @@ def checkbuttons(self):
881877 else :
882878 for title , cmd , call in self .buttons [:- 2 ]:
883879 self .w [title ].enable (0 )
884- self .w .setdefaultbutton (self .w ["DonÕt find" ])
880+ self .w .setdefaultbutton (self .w ["Don't find" ])
885881 else :
886882 for title , cmd , call in self .buttons [:- 2 ]:
887883 self .w [title ].enable (0 )
888- self .w .setdefaultbutton (self .w ["DonÕt find" ])
884+ self .w .setdefaultbutton (self .w ["Don't find" ])
889885
890886 def find (self ):
891887 self .getparmsfromwindow ()
@@ -1204,7 +1200,7 @@ def __init__(self):
12041200 self .template = "%s, %d point"
12051201 self .fontsettings , self .tabsettings , self .windowsize = geteditorprefs ()
12061202 self .w = W .Dialog ((328 , 120 ), "Editor default settings" )
1207- self .w .setfontbutton = W .Button ((8 , 8 , 80 , 16 ), "Set fontƒ " , self .dofont )
1203+ self .w .setfontbutton = W .Button ((8 , 8 , 80 , 16 ), "Set font \xc9 " , self .dofont )
12081204 self .w .fonttext = W .TextBox ((98 , 10 , - 8 , 14 ), self .template % (self .fontsettings [0 ], self .fontsettings [2 ]))
12091205
12101206 self .w .picksizebutton = W .Button ((8 , 50 , 80 , 16 ), "Front window" , self .picksize )
0 commit comments