• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(5652)  |  Call(5256)  |  Derive(0)  |  Import(396)
strip(s [,chars]) -> string

Return a copy of the string s with leading and trailing
whitespace removed.
If chars is given and not None, remove characters in chars instead.
If chars is unicode, S will be converted to unicode before stripping.

        def strip(s, chars=None):
    """strip(s [,chars]) -> string

    Return a copy of the string s with leading and trailing
    whitespace removed.
    If chars is given and not None, remove characters in chars instead.
    If chars is unicode, S will be converted to unicode before stripping.

    """
    return s.strip(chars)
        


src/p/y/pymol-HEAD/trunk/pymol/examples/cookbook/dali.py   pymol(Download)
            os.remove(filename)
 
from pymol import cmd
from string import strip
import os
 
seen = {}
            if line[0:12]=='  NR. STRID1':
                input_state = 1
    elif input_state == 1:
        if strip(line)=='':
            input_state = 2
        elif line[4:5]==':':
            trg = strip(line[6:12])
            src = strip(line[13:19])
                seen[src_code]=1
            matrix = []
            for a in range(0,3):
                matrix.append(float(strip(line[29:38])))
                matrix.append(float(strip(line[39:48])))
                matrix.append(float(strip(line[49:58])))
                matrix.append(float(strip(line[59:78])))

src/p/y/pymol-HEAD/pymol/examples/cookbook/dali.py   pymol(Download)
            os.remove(filename)
 
from pymol import cmd
from string import strip
import os
 
seen = {}
            if line[0:12]=='  NR. STRID1':
                input_state = 1
    elif input_state == 1:
        if strip(line)=='':
            input_state = 2
        elif line[4:5]==':':
            trg = strip(line[6:12])
            src = strip(line[13:19])
                seen[src_code]=1
            matrix = []
            for a in range(0,3):
                matrix.append(float(strip(line[29:38])))
                matrix.append(float(strip(line[39:48])))
                matrix.append(float(strip(line[49:58])))
                matrix.append(float(strip(line[59:78])))

src/p/r/productiontrack-HEAD/pt1/tools/reportlab/tools/pythonpoint/demos/examples.py   productiontrack(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/p/r/productiontrack-HEAD/tools/reportlab/tools/pythonpoint/demos/examples.py   productiontrack(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/p/r/productiontrack-HEAD/pt1/tools/reportlab/tools/docco/examples.py   productiontrack(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/p/r/productiontrack-HEAD/tools/reportlab/tools/docco/examples.py   productiontrack(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/m/w/mwlib.ext-0.12.3/upstream-src/tools/pythonpoint/demos/examples.py   mwlib.ext(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/n/l/nlpy-HEAD/trunk/nlpy/Examples/bmark_ma27.py   nlpy(Download)
import pyma27
from pysparse import spmatrix
import numpy
from string import strip, atof
from nlpy_timing import cputime
 
def SolveSystem( A, rhs ):
    solve_f77 = {}
    for line in f77data:
        line = line.split()
        pbname = strip( line[0] )
	if pbname[-4:] == '.mtx': pbname = pbname[:-4]
        analyze_f77[pbname] = atof(line[1])
        solve_f77[pbname] = atof(line[2])
    solve_c = {}
    for line in cdata:
        line = line.split()
        pbname = strip( line[0] )
	if pbname[-4:] == '.mtx': pbname = pbname[:-4]
        analyze_c[pbname] = atof(line[1])
        solve_c[pbname] = atof(line[2])

src/m/w/mwlib.ext-0.12.3/upstream-src/tools/docco/examples.py   mwlib.ext(Download)
g = globals()
Dprime = {}
from types import StringType
from string import strip
for (a,b) in g.items():
    if a[:4]=="test" and type(b) is StringType:
        #print 'for', a
        #print b
        b = strip(b)
if __name__=="__main__":
    # then do the platypus hello world
    for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
        b = strip(b)
        exec(b+'\n')
    go()
 

src/n/l/nlpy-HEAD/nlpy/Examples/bmark_ma27.py   nlpy(Download)
import pyma27
from pysparse import spmatrix
import numpy
from string import strip, atof
from nlpy_timing import cputime
 
def SolveSystem( A, rhs ):
    solve_f77 = {}
    for line in f77data:
        line = line.split()
        pbname = strip( line[0] )
	if pbname[-4:] == '.mtx': pbname = pbname[:-4]
        analyze_f77[pbname] = atof(line[1])
        solve_f77[pbname] = atof(line[2])
    solve_c = {}
    for line in cdata:
        line = line.split()
        pbname = strip( line[0] )
	if pbname[-4:] == '.mtx': pbname = pbname[:-4]
        analyze_c[pbname] = atof(line[1])
        solve_c[pbname] = atof(line[2])

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next