def anyopen(name): # Open any kind of document, ignore errors try: w = anywin.open(name) except (RuntimeError, os.error): stdwin.message('Can\'t open ' + name) return 0 addstatmenu(w, [name]) return w
def anyopen(name): # Open any kind of document, ignore errors try: w = anywin.open(name) except (RuntimeError, os.error): stdwin.message("Can't open " + name) return 0 addstatmenu(w, [name]) return w
def action(w, string, i, detail): (h, v), clicks, button, mask = detail if clicks = 2: name = path.cat(w.name, string) try: w2 = anywin.open(name) w2.parent = w except posix.error, why: stdwin.message('Can\'t open ' + name + ': ' + why[1])