@view_config(name='load-requirements',
             renderer='requirements_upload.html',
             context=resources.App)
def from_requirements(context, request):
    if request.method == "POST":
        req_text = request.POST['req_file'].file.read()
        index = request.index

        filename = 'temp-req.txt' / path(tempfile.gettempdir())
        filename.write_text(req_text)
        
        names = []
        rd_class = pipext.RequirementDownloader
        requirement_set, finder = rd_class.req_set_from_file(filename, request.file_root)
        downloader = rd_class(requirement_set, finder, seen=set(request.index_data))

        for pkginfo, outfile in downloader.download_all():
            name = pkginfo.name
            names.append(name)

        request.registry.notify(event.IndexUpdate(request.index_data_path, request.index))

        flash = request.session.flash
        if names:
            flash('The following packages were installed'
                  'from the requirements file: %s' % ", ".join(names))

        if downloader.skip:
            for dl in (x.filename for x in downloader.skip):
                flash("Skipped (already in index): %s" %dl)

        if downloader.errors:
            for error in downloader.errors:
                flash('Download issue: %s' %error)
        
        return HTTPFound('/load-requirements')
    return {}
dataset/ETHPy150Open SMFOSS/CheesePrism/cheeseprism/views.py/from_requirements/swapped operands of `/`