mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Fixed macroman<->latin1 conversion. Some characters don't exist in latin1, but at least the roundtrip gives
the correct macroman characters again.
This commit is contained in:
parent
716cf91839
commit
dfebe90c4c
7 changed files with 25 additions and 25 deletions
|
@ -101,7 +101,7 @@ class Results:
|
||||||
class Status:
|
class Status:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.w = W.Dialog((440, 64), "SearchingŠ")
|
self.w = W.Dialog((440, 64), "Searchingƒ")
|
||||||
self.w.searching = W.TextBox((4, 4, -4, 16), "DevDev:PyPyDoc 1.5.1:ext:parseTupleAndKeywords.html")
|
self.w.searching = W.TextBox((4, 4, -4, 16), "DevDev:PyPyDoc 1.5.1:ext:parseTupleAndKeywords.html")
|
||||||
self.w.hits = W.TextBox((4, 24, -4, 16), "Hits: 0")
|
self.w.hits = W.TextBox((4, 24, -4, 16), "Hits: 0")
|
||||||
self.w.canceltip = W.TextBox((4, 44, -4, 16), "Type cmd-period (.) to cancel.")
|
self.w.canceltip = W.TextBox((4, 44, -4, 16), "Type cmd-period (.) to cancel.")
|
||||||
|
|
|
@ -50,13 +50,13 @@ class PythonIDE(Wapplication.Application):
|
||||||
def makeusermenus(self):
|
def makeusermenus(self):
|
||||||
m = Wapplication.Menu(self.menubar, "File")
|
m = Wapplication.Menu(self.menubar, "File")
|
||||||
newitem = FrameWork.MenuItem(m, "New", "N", 'new')
|
newitem = FrameWork.MenuItem(m, "New", "N", 'new')
|
||||||
openitem = FrameWork.MenuItem(m, "OpenŠ", "O", 'open')
|
openitem = FrameWork.MenuItem(m, "Openƒ", "O", 'open')
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
closeitem = FrameWork.MenuItem(m, "Close", "W", 'close')
|
closeitem = FrameWork.MenuItem(m, "Close", "W", 'close')
|
||||||
saveitem = FrameWork.MenuItem(m, "Save", "S", 'save')
|
saveitem = FrameWork.MenuItem(m, "Save", "S", 'save')
|
||||||
saveasitem = FrameWork.MenuItem(m, "Save asŠ", None, 'save_as')
|
saveasitem = FrameWork.MenuItem(m, "Save asƒ", None, 'save_as')
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
saveasappletitem = FrameWork.MenuItem(m, "Save as AppletŠ", None, 'save_as_applet')
|
saveasappletitem = FrameWork.MenuItem(m, "Save as Appletƒ", None, 'save_as_applet')
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
quititem = FrameWork.MenuItem(m, "Quit", "Q", 'quit')
|
quititem = FrameWork.MenuItem(m, "Quit", "Q", 'quit')
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class PythonIDE(Wapplication.Application):
|
||||||
selallitem = FrameWork.MenuItem(m, "Select all", "A", "selectall")
|
selallitem = FrameWork.MenuItem(m, "Select all", "A", "selectall")
|
||||||
sellineitem = FrameWork.MenuItem(m, "Select line", "L", "selectline")
|
sellineitem = FrameWork.MenuItem(m, "Select line", "L", "selectline")
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
finditem = FrameWork.MenuItem(m, "FindŠ", "F", "find")
|
finditem = FrameWork.MenuItem(m, "Findƒ", "F", "find")
|
||||||
findagainitem = FrameWork.MenuItem(m, "Find again", 'G', "findnext")
|
findagainitem = FrameWork.MenuItem(m, "Find again", 'G', "findnext")
|
||||||
enterselitem = FrameWork.MenuItem(m, "Enter search string", "E", "entersearchstring")
|
enterselitem = FrameWork.MenuItem(m, "Enter search string", "E", "entersearchstring")
|
||||||
replaceitem = FrameWork.MenuItem(m, "Replace", None, "replace")
|
replaceitem = FrameWork.MenuItem(m, "Replace", None, "replace")
|
||||||
|
@ -84,12 +84,12 @@ class PythonIDE(Wapplication.Application):
|
||||||
runitem = FrameWork.MenuItem(m, "Run window", "R", 'run')
|
runitem = FrameWork.MenuItem(m, "Run window", "R", 'run')
|
||||||
runselitem = FrameWork.MenuItem(m, "Run selection", None, 'runselection')
|
runselitem = FrameWork.MenuItem(m, "Run selection", None, 'runselection')
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
moditem = FrameWork.MenuItem(m, "Module browserŠ", "M", self.domenu_modulebrowser)
|
moditem = FrameWork.MenuItem(m, "Module browserƒ", "M", self.domenu_modulebrowser)
|
||||||
FrameWork.Separator(m)
|
FrameWork.Separator(m)
|
||||||
mm = FrameWork.SubMenu(m, "Preferences")
|
mm = FrameWork.SubMenu(m, "Preferences")
|
||||||
FrameWork.MenuItem(mm, "Set Scripts folderŠ", None, self.do_setscriptsfolder)
|
FrameWork.MenuItem(mm, "Set Scripts folderƒ", None, self.do_setscriptsfolder)
|
||||||
FrameWork.MenuItem(mm, "Editor default settingsŠ", None, self.do_editorprefs)
|
FrameWork.MenuItem(mm, "Editor default settingsƒ", None, self.do_editorprefs)
|
||||||
FrameWork.MenuItem(mm, "Set default window fontŠ", None, self.do_setwindowfont)
|
FrameWork.MenuItem(mm, "Set default window fontƒ", None, self.do_setwindowfont)
|
||||||
|
|
||||||
self.openwindowsmenu = Wapplication.Menu(self.menubar, 'Windows')
|
self.openwindowsmenu = Wapplication.Menu(self.menubar, 'Windows')
|
||||||
self.makeopenwindowsmenu()
|
self.makeopenwindowsmenu()
|
||||||
|
@ -110,7 +110,7 @@ class PythonIDE(Wapplication.Application):
|
||||||
path = os.path.join(os.getcwd(), "Scripts")
|
path = os.path.join(os.getcwd(), "Scripts")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
f = open(os.path.join(path, "Place your scripts hereŠ"), "w")
|
f = open(os.path.join(path, "Place your scripts hereƒ"), "w")
|
||||||
f.close()
|
f.close()
|
||||||
fss = macfs.FSSpec(path)
|
fss = macfs.FSSpec(path)
|
||||||
self.scriptsfolder = fss.NewAlias()
|
self.scriptsfolder = fss.NewAlias()
|
||||||
|
@ -156,10 +156,10 @@ class PythonIDE(Wapplication.Application):
|
||||||
if ftype == 'TEXT':
|
if ftype == 'TEXT':
|
||||||
self.openscript(path)
|
self.openscript(path)
|
||||||
else:
|
else:
|
||||||
W.Message("Can¹t open file of type '%s'." % ftype)
|
W.Message("CanÕt open file of type '%s'." % ftype)
|
||||||
|
|
||||||
def getabouttext(self):
|
def getabouttext(self):
|
||||||
return "About Python IDEŠ"
|
return "About Python IDEƒ"
|
||||||
|
|
||||||
def do_about(self, id, item, window, event):
|
def do_about(self, id, item, window, event):
|
||||||
Splash.about()
|
Splash.about()
|
||||||
|
|
|
@ -71,7 +71,7 @@ import sys
|
||||||
|
|
||||||
_keepsplashscreenopen = 0
|
_keepsplashscreenopen = 0
|
||||||
|
|
||||||
abouttext1 = """The Python Integrated Development Environment for the Macintosh<EFBFBD>
|
abouttext1 = """The Python Integrated Development Environment for the MacintoshŽ
|
||||||
Version: %s
|
Version: %s
|
||||||
Copyright 1997-2000 Just van Rossum, Letterror. <just@letterror.com>
|
Copyright 1997-2000 Just van Rossum, Letterror. <just@letterror.com>
|
||||||
Python %s
|
Python %s
|
||||||
|
@ -79,11 +79,11 @@ Python %s
|
||||||
See: <http://www.python.org/> for information and documentation."""
|
See: <http://www.python.org/> for information and documentation."""
|
||||||
|
|
||||||
flauwekul = [ 'Goodday, Bruce.',
|
flauwekul = [ 'Goodday, Bruce.',
|
||||||
'What¹s new?',
|
'WhatÕs new?',
|
||||||
'Nudge, nudge, say no more!',
|
'Nudge, nudge, say no more!',
|
||||||
'No, no sir, it¹s not dead. It¹s resting.',
|
'No, no sir, itÕs not dead. ItÕs resting.',
|
||||||
'Albatros!',
|
'Albatros!',
|
||||||
'It¹s . . .',
|
'ItÕs . . .',
|
||||||
'Is your name not Bruce, then?',
|
'Is your name not Bruce, then?',
|
||||||
"""But Mr F.G. Superman has a secret identity . . .
|
"""But Mr F.G. Superman has a secret identity . . .
|
||||||
when trouble strikes at any time . . .
|
when trouble strikes at any time . . .
|
||||||
|
|
|
@ -344,18 +344,18 @@ class Application(FrameWork.Application):
|
||||||
# XXX and that's the last thing we want here.
|
# XXX and that's the last thing we want here.
|
||||||
f, filename, (suff, mode, dummy) = imp.find_module(modname)
|
f, filename, (suff, mode, dummy) = imp.find_module(modname)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise W.AlertError, "Can¹t find file for ³%s²" % modname
|
raise W.AlertError, "CanÕt find file for –%s”" % modname
|
||||||
else:
|
else:
|
||||||
if not f:
|
if not f:
|
||||||
raise W.AlertError, "Can¹t find file for ³%s²" % modname
|
raise W.AlertError, "CanÕt find file for –%s”" % modname
|
||||||
f.close()
|
f.close()
|
||||||
if suff == '.py':
|
if suff == '.py':
|
||||||
self.openscript(filename, lineno, charoffset)
|
self.openscript(filename, lineno, charoffset)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise W.AlertError, "Can¹t find file for ³%s²" % modname
|
raise W.AlertError, "CanÕt find file for –%s”" % modname
|
||||||
else:
|
else:
|
||||||
raise W.AlertError, "Can¹t find file Œ%s¹" % filename
|
raise W.AlertError, "CanÕt find file •%sÕ" % filename
|
||||||
if lineno is not None:
|
if lineno is not None:
|
||||||
editor.selectline(lineno, charoffset)
|
editor.selectline(lineno, charoffset)
|
||||||
return editor
|
return editor
|
||||||
|
|
|
@ -871,7 +871,7 @@ class PyEditor(TextEditor):
|
||||||
if onoff:
|
if onoff:
|
||||||
if not __debug__:
|
if not __debug__:
|
||||||
import W
|
import W
|
||||||
raise W.AlertError, "Can¹t debug in ³Optimize bytecode² mode.\r(see ³Default startup options² in EditPythonPreferences)"
|
raise W.AlertError, "CanÕt debug in –Optimize bytecode” mode.\r(see –Default startup options” in EditPythonPreferences)"
|
||||||
import PyDebugger
|
import PyDebugger
|
||||||
self._debugger = PyDebugger.getdebugger()
|
self._debugger = PyDebugger.getdebugger()
|
||||||
self._debugger.register_editor(self, self.file)
|
self._debugger.register_editor(self, self.file)
|
||||||
|
|
|
@ -57,7 +57,7 @@ class TraceBack:
|
||||||
filename = os.path.split(filename)[1]
|
filename = os.path.split(filename)[1]
|
||||||
if lineno:
|
if lineno:
|
||||||
charno = charno - 1
|
charno = charno - 1
|
||||||
text = str(value) + '\rFile: "' + str(filename) + '", line ' + str(lineno) + '\r\r' + line[:charno] + "€" + line[charno:-1]
|
text = str(value) + '\rFile: "' + str(filename) + '", line ' + str(lineno) + '\r\r' + line[:charno] + "‚" + line[charno:-1]
|
||||||
else:
|
else:
|
||||||
text = str(value) + '\rFile: "' + str(filename) + '"'
|
text = str(value) + '\rFile: "' + str(filename) + '"'
|
||||||
self.syntaxdialog = W.ModalDialog((360, 120), "Syntax Error")
|
self.syntaxdialog = W.ModalDialog((360, 120), "Syntax Error")
|
||||||
|
@ -123,10 +123,10 @@ class TraceBack:
|
||||||
self.w.editbutton = W.Button((10, -30, 60, 16), "Edit", self.edit)
|
self.w.editbutton = W.Button((10, -30, 60, 16), "Edit", self.edit)
|
||||||
self.w.editbutton.enable(0)
|
self.w.editbutton.enable(0)
|
||||||
|
|
||||||
self.w.browselocalsbutton = W.Button((80, -30, 100, 16), "Browse localsŠ", self.browselocals)
|
self.w.browselocalsbutton = W.Button((80, -30, 100, 16), "Browse localsƒ", self.browselocals)
|
||||||
self.w.browselocalsbutton.enable(0)
|
self.w.browselocalsbutton.enable(0)
|
||||||
|
|
||||||
self.w.postmortembutton = W.Button((190, -30, 100, 16), "Post mortemŠ", self.postmortem)
|
self.w.postmortembutton = W.Button((190, -30, 100, 16), "Post mortemƒ", self.postmortem)
|
||||||
|
|
||||||
self.w.setdefaultbutton(self.w.editbutton)
|
self.w.setdefaultbutton(self.w.editbutton)
|
||||||
self.w.bind("cmdb", self.w.browselocalsbutton.push)
|
self.w.bind("cmdb", self.w.browselocalsbutton.push)
|
||||||
|
|
|
@ -568,7 +568,7 @@ def FrontWindowInsert(stuff):
|
||||||
pass
|
pass
|
||||||
import EasyDialogs
|
import EasyDialogs
|
||||||
if EasyDialogs.AskYesNoCancel(
|
if EasyDialogs.AskYesNoCancel(
|
||||||
"Can¹t find window or widget to insert text into; copy to clipboard instead?",
|
"CanÕt find window or widget to insert text into; copy to clipboard instead?",
|
||||||
1) == 1:
|
1) == 1:
|
||||||
import Scrap
|
import Scrap
|
||||||
Scrap.ZeroScrap()
|
Scrap.ZeroScrap()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue