Logo Search packages:      
Sourcecode: webboard version File versions  Download package

def src::webboard::WebBoard::_get_file_path_from_dnd_dropped_uri (   self,
  uri 
) [private]
helper to get a useful path from a drop uri

Definition at line 110 of file webboard.py.

                                                      :
        """ helper to get a useful path from a drop uri"""
        path = urllib.url2pathname(uri) # escape special chars
        path = path.strip('\r\n\x00') # remove \r\n and NULL
        # get the path to file
        if path.startswith('file:\\\\\\'): # windows
            path = path[8:] # 8 is len('file:///')
        elif path.startswith('file://'): # nautilus, rox
            path = path[7:] # 7 is len('file://')
        elif path.startswith('file:'): # xffm
            path = path[5:] # 5 is len('file:')
        return path
    

Generated by  Doxygen 1.6.0   Back to index