def open_file(): """ Open the file on the local machine. This is useful only if the app is run on the same local machine as the client. """ filename = request.args.get('file') if filename is None: return 'No file specified' res = filename if os.path.exists(filename): open_default(filename) else: res = '%s :No such file or directory' % filename return res
def open(self, attrname='path'): attr = self.get_attr(attrname) open_default(attr.content)
def open(self): open_default(self.elem.content)