def exe(self): filename = self.args[0] if type(self.args) == list else self.args filename = PathCleaner(filename).long() filepath = self.motes_path + filename CommandLogger('Motes will create a new mote name `' + PathCleaner(filename).short() + '`', True) pbs.touch(filepath) # create it anyway pbs.vim(filepath, _fg=True)
def editSpecFile(package): """ Use pypi2spec to setup a barebones spec for a pypi package :type package: str :param package: The package to download with pypi2spec """ pypi2spec(package) vim(getSpecPath(package), _fg=True)
def exe(self): if len(self.args) == 0: SiteCommand(self.motes_path, None).exe() else: filepath = self.motes_path + self.filename if not path.isfile(filepath): make_msg = 'Mote does not exist: do you want to create it?' make_file = yes_no(make_msg) if make_file: cmd = CreateCommand(self.motes_path, filename) cmd.exe() else: output = pbs.vim(filepath, _fg=True) if output == 0: CommandLogger('Mote closed.', True)