Exemplo n.º 1
0
Arquivo: app.py Projeto: xxks-kkk/momo
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
Exemplo n.º 2
0
 def open(self, attrname='path'):
     attr = self.get_attr(attrname)
     open_default(attr.content)
Exemplo n.º 3
0
 def open(self, attrname='path'):
     attr = self.get_attr(attrname)
     open_default(attr.content)
Exemplo n.º 4
0
 def open(self):
     open_default(self.elem.content)
Exemplo n.º 5
0
 def open(self):
     open_default(self.elem.content)