def download_plugin(file_):
 global PLUGIN_EXTENSION
 plugins_installed_before = set(__get_all_plugin_descriptors())
 fileName = os.path.join(resources.PLUGINS, os.path.basename(file_))
 content = urlopen(file_)
 f = open(fileName, u'wb')
 f.write(content.read())
 f.close()
 zipFile = zipfile.ZipFile(fileName, u'r')
 zipFile.extractall(resources.PLUGINS)
 zipFile.close()
 os.remove(fileName)
 plugins_installed_after = set(__get_all_plugin_descriptors())
 new_plugin = (plugins_installed_after - plugins_installed_before).pop()
 return new_plugin

def download_plugin ( file_ ) : global PLUGIN_EXTENSION plugins_installed_before = set ( __get_all_plugin_descriptors ( ) ) fileName = os . path . join ( resources . PLUGINS , os . path . basename ( file_ ) ) content = urlopen ( file_ ) f = open ( fileName , u'wb' ) f . write ( content . read ( ) ) f . close ( ) zipFile = zipfile . ZipFile ( fileName , u'r' ) zipFile . extractall ( resources . PLUGINS ) zipFile . close ( ) os . remove ( fileName ) plugins_installed_after = set ( __get_all_plugin_descriptors ( ) ) new_plugin = ( plugins_installed_after - plugins_installed_before ) . pop ( ) return new_plugin
download a plugin specified by file_ .