All Samples(292) | Call(272) | Derive(0) | Import(20)
lstrip(s [,chars]) -> string Return a copy of the string s with leading whitespace removed. If chars is given and not None, remove characters in chars instead.
def lstrip(s, chars=None):
"""lstrip(s [,chars]) -> string
Return a copy of the string s with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
"""
return s.lstrip(chars)
import commands import re import os from string import lstrip, rstrip ## #
# Normalize the base path
self.branch = self.repourl[len(self.reporoot):]
self.branch = lstrip(rstrip(self.branch, '/'), '/')
else:
self.repourl = None
path = pathurl[len(svninfo.reporoot):]
# Strip off '/' from the left and right
path = lstrip(rstrip(path, '/'), '/')
return path
#
# The first characters is the Subversion status character
#
paths.append(lstrip(line[1:]))
return paths
src/s/v/svngroup-HEAD/trunk/server/sgserverutils.py svngroup(Download)
from sgversion import SVNGROUP_VERSION import os, sys, threading from string import lstrip, rstrip from os.path import basename from sqlobject import *
else:
pathname = group.branch + "/" + path.pathname
pathname = lstrip(rstrip(pathname, '/'), '/')
pathlist.append(pathname)
else:
path = g.branch + '/' + p.pathname
path = lstrip(rstrip(path, '/'), '/')
logger.debug("Looking at %s and %s" % (pathname,
path))
src/s/v/svngroup-HEAD/common/subversion.py svngroup(Download)
import commands import re import os from string import lstrip, rstrip ## #
# Normalize the base path
self.branch = self.repourl[len(self.reporoot):]
self.branch = lstrip(rstrip(self.branch, '/'), '/')
else:
self.repourl = None
path = pathurl[len(svninfo.reporoot):]
# Strip off '/' from the left and right
path = lstrip(rstrip(path, '/'), '/')
return path
#
# The first characters is the Subversion status character
#
paths.append(lstrip(line[1:]))
return paths
src/s/v/svngroup-HEAD/server/sgserverutils.py svngroup(Download)
from sgversion import SVNGROUP_VERSION import os, sys, threading from string import lstrip, rstrip from os.path import basename from sqlobject import *
else:
pathname = group.branch + "/" + path.pathname
pathname = lstrip(rstrip(pathname, '/'), '/')
pathlist.append(pathname)
else:
path = g.branch + '/' + p.pathname
path = lstrip(rstrip(path, '/'), '/')
logger.debug("Looking at %s and %s" % (pathname,
path))
src/s/v/svngroup-HEAD/trunk/clients/sgcommands.py svngroup(Download)
import time from getopt import getopt # Option processing from string import lstrip, rstrip import sgprefs from sgclientutils import *
# Normalize path, remove any preceding or trailing slash
# That is, /a/path/like/this would be a/path/like/this
# and, a/path/like/that would be a/path/like/that
pathname = lstrip(rstrip(pathname, '/'), '/')
# Package everything into an XML string for the server to carry out
root = create_root()
src/s/v/svngroup-HEAD/clients/sgcommands.py svngroup(Download)
import time from getopt import getopt # Option processing from string import lstrip, rstrip import sgprefs from sgclientutils import *
# Normalize path, remove any preceding or trailing slash
# That is, /a/path/like/this would be a/path/like/this
# and, a/path/like/that would be a/path/like/that
pathname = lstrip(rstrip(pathname, '/'), '/')
# Package everything into an XML string for the server to carry out
root = create_root()
src/h/a/happydoc-HEAD/trunk/happydoclib/docset/docset_TAL/hdExpressions.py happydoc(Download)
import re, sys
from hdTALES import Engine, CompilerError, _valid_name, NAME_RE, \
TALESError, Undefined, Default, _parse_expr
from string import strip, split, join, replace, lstrip
#from Acquisition import aq_base, aq_inner, aq_parent
self._subexprs = []
add = self._subexprs.append
for i in range(len(paths)):
path = lstrip(paths[i])
if _parse_expr(path):
# This part is the start of another expression type,
# so glue it back together and compile it.
add(engine.compile(lstrip(join(paths[i:], '|'))))
def __init__(self, name, expr, compiler):
#print 'NotExpr(%s, %s)' % (name, expr)
self._s = expr = lstrip(expr)
self._c = compiler.compile(expr)
def __call__(self, econtext):
return not econtext.evaluateBoolean(self._c)
def __init__(self, name, expr, compiler):
#print 'DeferExpr(%s, %s)' % (name, expr)
self._s = expr = lstrip(expr)
self._c = compiler.compile(expr)
def __call__(self, econtext):
return DeferWrapper(self._c, econtext)
src/h/a/happydoc-HEAD/happydoclib/docset/docset_TAL/hdExpressions.py happydoc(Download)
import re, sys
from hdTALES import Engine, CompilerError, _valid_name, NAME_RE, \
TALESError, Undefined, Default, _parse_expr
from string import strip, split, join, replace, lstrip
#from Acquisition import aq_base, aq_inner, aq_parent
self._subexprs = []
add = self._subexprs.append
for i in range(len(paths)):
path = lstrip(paths[i])
if _parse_expr(path):
# This part is the start of another expression type,
# so glue it back together and compile it.
add(engine.compile(lstrip(join(paths[i:], '|'))))
def __init__(self, name, expr, compiler):
#print 'NotExpr(%s, %s)' % (name, expr)
self._s = expr = lstrip(expr)
self._c = compiler.compile(expr)
def __call__(self, econtext):
return not econtext.evaluateBoolean(self._c)
def __init__(self, name, expr, compiler):
#print 'DeferExpr(%s, %s)' % (name, expr)
self._s = expr = lstrip(expr)
self._c = compiler.compile(expr)
def __call__(self, econtext):
return DeferWrapper(self._c, econtext)
src/w/s/wsat-HEAD/trunk/src/featureextraction/featureextractor.py wsat(Download)
""" from string import lstrip from string import rstrip import os, sys, getopt
emptyLineFound = False strippedFileContent = "" for line in fileObject: if lstrip(rstrip(line)) == "": emptyLineFound = True continue
else: currentFile = f.read() if not self.passEmptyStringsToPlugins and lstrip(rstrip(currentFile)) == "": continue
src/w/s/wsat-HEAD/src/featureextraction/featureextractor.py wsat(Download)
""" from string import lstrip from string import rstrip import os, sys, getopt
emptyLineFound = False strippedFileContent = "" for line in fileObject: if lstrip(rstrip(line)) == "": emptyLineFound = True continue
else: currentFile = f.read() if not self.passEmptyStringsToPlugins and lstrip(rstrip(currentFile)) == "": continue
1 | 2 Next