The concrete path objects can have access to filesystems and we will convert string to objects of this class. For example, To be more specific in conversions, we can use the PosixPath() and WindowsPath() constructors as well. As discussed, this library is only available to Python 3.4 ...
logger.debug("Using adapter '%s' to run bottle"% adapter) run(host=host, port=port, quiet=True, debug=False, server=adapter)exceptsocket.error, ex:if"already in use"ingetSafeExString(ex): logger.error("Address already in use ('%s:%s')"% (host, port))else:raise 开发者ID:HackingLab...
source.path = posixpath.normpath(source.path) parent = _abssource(repo._subparent, push, abort=False)ifparent: parent = util.url(util.pconvert(parent)) parent.path = posixpath.join(parent.pathor'', source.path) parent.path = posixpath.normpath(parent.path)returnstr(parent)else:# recursion...
singleTimeWarnMessage(warnMsg)ifisTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION): infoMsg ="trying to upload the file stager on '%s' "% directory infoMsg +="via UNION method"logger.info(infoMsg) stagerName ="tmpu%s.%s"% (randomStr(lowercase=True), self.webApi) self.webStagerFilePath = posix...
fill =Nonefornameinfiles:ifwin32andextand'.'notinposixpath.basename(name): newname ="%s.%s"% (name, ext)else: newname = name newfiles.append(newname) newpath = util.convert_path(newname) path = util.convert_path(name) content = [line.rstrip()forlineinfile(path)]iffillisnotNone: ...