File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/local/python
22
3- XXX This file needs some work for Python 0.9 .6 !!!
4-
53# A STDWIN-based front end for the Python interpreter.
64#
75# This is useful if you want to avoid console I/O and instead
2927from stdwinevents import *
3028import rand
3129import mainloop
32-
33- from util import readfile # 0.9.1
34-
35- try :
36- import mac
37- os = mac
38- except NameError :
39- import posix
40- os = posix
30+ import os
4131
4232
4333# Filename used to capture output from commands; change to suit your taste
@@ -213,8 +203,7 @@ def do_open(win):
213203 filename = stdwin .askfile ('Open file' , '' , 0 )
214204 win = makewindow ()
215205 win .filename = filename
216- win .editor .replace (readfile (filename )) # 0.9.1
217- # win.editor.replace(open(filename, 'r').read()) # 0.9.2
206+ win .editor .replace (open (filename , 'r' ).read ())
218207 win .editor .setfocus (0 , 0 )
219208 win .settitle (win .filename )
220209 #
You can’t perform that action at this time.
0 commit comments