Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)
Convert a project or version name to its filename-escaped form

Any '-' characters are currently replaced with '_'.

        def to_filename(name):
    """Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    """
    return name.replace('-','_')
        


src/m/e/merlin-1-1.0/merlin/command/egg_info.py   merlin(Download)
from distutils.util import convert_path
from distutils.filelist import FileList
from merlin import parse_requirements, safe_name, parse_version, \
    safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename
from sdist import walk_revctrl
 
        self.ensure_dirname('egg_base')
        self.egg_info = to_filename(self.egg_name)+'.egg-info'
        if self.egg_base != os.curdir:
            self.egg_info = os.path.join(self.egg_base, self.egg_info)

src/m/e/merlin-1-1.0/merlin/command/sdist_egg.py   merlin(Download)
 
from merlin.command.bdist_egg import bdist_egg
from merlin import get_build_platform, to_filename
 
 
            # Compute filename of the output egg
            filename = "%s-%s" % (
                to_filename(ei_cmd.egg_name), to_filename(ei_cmd.egg_version)
                )
            platform = self.distribution.has_ext_modules() and self.plat_name