I’m trying to create a generalized build system that will work across my Python virtualenvs. My virtualenv is created at ~/.virtualenvs/project-name for each project. The project-name is the same as the last directory in the project path. I would like to be able to extract the last directory in the path from $project_path to use in my build system, but I’m not sure how to go about doing this. I had hoped Sublime might provide a variable for this, but it appears that is not the case. Does anyone know how I might achieve this?