我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用distutils.core.Command()。
def create_home_path(self): """Create directories under ~ """ if not self.user: return home = convert_path(os.path.expanduser("~")) for name, path in self.config_vars.iteritems(): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0700)" % path) os.makedirs(path, 0700) # -- Command execution methods -------------------------------------
def create_home_path(self): """Create directories under ~.""" if not self.user: return home = convert_path(os.path.expanduser("~")) for name, path in self.config_vars.items(): if path.startswith(home) and not os.path.isdir(path): self.debug_print("os.makedirs('%s', 0o700)" % path) os.makedirs(path, 0o700) # -- Command execution methods -------------------------------------
def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self .returncode)