Exemple #1
0
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
Exemple #2
0
 def open(self, attrname='path'):
     attr = self.get_attr(attrname)
     open_default(attr.content)
Exemple #3
0
 def open(self, attrname='path'):
     attr = self.get_attr(attrname)
     open_default(attr.content)
Exemple #4
0
 def open(self):
     open_default(self.elem.content)
Exemple #5
0
 def open(self):
     open_default(self.elem.content)