示例#1
0
文件: basics.py 项目: scott91e1/pypad
def open_(event):
    path = askopenfilename()
    # If the user clicked 'Cancel', return without changing anything
    if not path:
        return

    with open(path, 'r+t') as infile:
        editor.add(Buffer(file=infile, text=infile.read()))
        editor.select('end')
示例#2
0
文件: basics.py 项目: Nazek42/pypad
def open_(event):
    path = askopenfilename()
    # If the user clicked 'Cancel', return without changing anything
    if not path:
        return

    with open(path, 'r+t') as infile:
        editor.add(Buffer(file=infile, text=infile.read()))
        editor.select('end')
示例#3
0
文件: basics.py 项目: scott91e1/pypad
def new(event):
    editor.add(Buffer())
    editor.select('end')
示例#4
0
文件: basics.py 项目: Nazek42/pypad
def new(event):
    editor.add(Buffer())
    editor.select('end')