Пример #1
0
def filediff(a, b, flags):  # Display differences between two text files
    diffcmd = "diff"
    if flags:
        diffcmd = diffcmd + mkarg(flags)
    diffcmd = diffcmd + mkarg(a) + mkarg(b)
    difftext = commands.getoutput(diffcmd)
    return textwin.open_readonly(mktitle(a, b), difftext)
Пример #2
0
def filediff(a, b, flags): # Display differences between two text files
	diffcmd = 'diff'
	if flags: diffcmd = diffcmd + mkarg(flags)
	diffcmd = diffcmd + mkarg(a) + mkarg(b)
	difftext = commands.getoutput(diffcmd)
	return textwin.open_readonly(mktitle(a, b), difftext)
Пример #3
0
def open_readonly(fn):  # Open a file window
    fp = __builtin__.open(fn, 'r')
    w = textwin.open_readonly(fn, fp.read())
    w.fn = fn
    return w
Пример #4
0
def open_readonly(fn): # Open a file window
       w = textwin.open_readonly(fn, readfile(fn))
       w.fn = fn
       return w
Пример #5
0
def open_readonly(fn): # Open a file window
	w = textwin.open_readonly(fn, readfile(fn))
	w.fn = fn
	return w
Пример #6
0
def open_readonly(fn): # Open a file window
	fp = __builtin__.open(fn, 'r')
	w = textwin.open_readonly(fn, fp.read())
	w.fn = fn
	return w