<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload_to_pypi():
 """ Upload sdist and bdist_eggs to pypi """

    # One more safety input and then we are ready to go :)
    x = prompt("Are you sure to upload the current version to pypi?")
    if not x or not x.lower() in ["y", "yes"]:
        return

    local("rm -rf dist")
    local("python setup.py sdist")
    version = _get_cur_version()
    fn = "RPIO-%s.tar.gz" % version
    put("dist/%s" % fn, "/tmp/")
    with cd("/tmp"):
        run("tar -xf /tmp/%s" % fn)
    with cd("/tmp/RPIO-%s" % version):
        run("python2.6 setup.py bdist_egg upload")
        run("python2.7 setup.py bdist_egg upload")
        run("python3.2 setup.py bdist_egg upload")
    local("python setup.py sdist upload")