Mercurial > cpython-lru_cache-weakref
comparison Mac/scripts/EditPythonPrefs.py @ 4550:f1244036ebab legacy-trunk
Fixed to allow sys.path initializer to be longer than 255 chars.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 20 Nov 1996 14:55:26 +0000 |
| parents | 85d38456adf0 |
| children | 77135da9f36c |
comparison
equal
deleted
inserted
replaced
| 4549:dbc98834eff2 | 4550:f1244036ebab |
|---|---|
| 143 pass | 143 pass |
| 144 d = GetNewDialog(DIALOG_ID, -1) | 144 d = GetNewDialog(DIALOG_ID, -1) |
| 145 tp, h, rect = d.GetDialogItem(TITLE_ITEM) | 145 tp, h, rect = d.GetDialogItem(TITLE_ITEM) |
| 146 SetDialogItemText(h, title) | 146 SetDialogItemText(h, title) |
| 147 tp, h, rect = d.GetDialogItem(TEXT_ITEM) | 147 tp, h, rect = d.GetDialogItem(TEXT_ITEM) |
| 148 SetDialogItemText(h, string.joinfields(list, '\r')) | 148 ## SetDialogItemText(h, string.joinfields(list, '\r')) |
| 149 h.data = string.joinfields(list, '\r') | |
| 150 d.SelectDialogItemText(TEXT_ITEM, 0, 32767) | |
| 151 d.SelectDialogItemText(TEXT_ITEM, 0, 0) | |
| 149 ## d.SetDialogDefaultItem(OK_ITEM) | 152 ## d.SetDialogDefaultItem(OK_ITEM) |
| 150 d.SetDialogCancelItem(CANCEL_ITEM) | 153 d.SetDialogCancelItem(CANCEL_ITEM) |
| 154 d.GetDialogWindow().ShowWindow() | |
| 155 d.DrawDialog() | |
| 151 while 1: | 156 while 1: |
| 152 n = ModalDialog(None) | 157 n = ModalDialog(None) |
| 153 if n == OK_ITEM: | 158 if n == OK_ITEM: |
| 154 break | 159 break |
| 155 if n == CANCEL_ITEM: | 160 if n == CANCEL_ITEM: |
| 160 fss, ok = macfs.GetDirectory('Select python home folder:') | 165 fss, ok = macfs.GetDirectory('Select python home folder:') |
| 161 if ok: | 166 if ok: |
| 162 pythondir = fss | 167 pythondir = fss |
| 163 if n == OPTIONS_ITEM: | 168 if n == OPTIONS_ITEM: |
| 164 options = optinteract(options) | 169 options = optinteract(options) |
| 165 tmp = string.splitfields(GetDialogItemText(h), '\r') | 170 tmp = string.splitfields(h.data, '\r') |
| 166 rv = [] | 171 rv = [] |
| 167 for i in tmp: | 172 for i in tmp: |
| 168 if i: | 173 if i: |
| 169 rv.append(i) | 174 rv.append(i) |
| 170 return rv, pythondir, options | 175 return rv, pythondir, options |
