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

All Samples(1537)  |  Call(1422)  |  Derive(0)  |  Import(115)
upper(s) -> string

Return a copy of the string s converted to uppercase.

        def upper(s):
    """upper(s) -> string

    Return a copy of the string s converted to uppercase.

    """
    return s.upper()
        


src/p/o/postmod-HEAD/trunk/postmod/sample_exporter.py   postmod(Download)
 
        fname = filex.pathjoin(path, basename)
        root, ext = os.path.splitext(fname)
        if string.upper(ext) != ".WAV":
            fname = fname + ".wav"
 
        if self.makeUpper:
            fname = string.upper(fname)

src/p/o/postmod-HEAD/postmod/sample_exporter.py   postmod(Download)
 
        fname = filex.pathjoin(path, basename)
        root, ext = os.path.splitext(fname)
        if string.upper(ext) != ".WAV":
            fname = fname + ".wav"
 
        if self.makeUpper:
            fname = string.upper(fname)

src/c/l/clearsilver-0.10.1/clearsilver/python/examples/base/SafeHtml.py   clearsilver(Download)
  def unknown_starttag(self, tag, attrs):
    tag = string.upper(tag)
    if SafeHtml._stripTags.has_key(tag):
      self.safe_start_strip()
      # sys.stderr.write("Stripping tag %s: %d\n" % (tag, self._stripping))
    elif SafeHtml._skipTags.has_key(tag):
      # sys.stderr.write("Skipping tag %s\n" % tag)
  def unknown_endtag(self, tag):
    tag = string.upper(tag)
    if SafeHtml._stripTags.has_key(tag):
      self.safe_end_strip()
      # sys.stderr.write("End Stripping tag %s: %d\n" % (tag, self._stripping))
    elif SafeHtml._skipTags.has_key(tag):
      pass

src/p/y/pymol-HEAD/trunk/pymol/examples/cookbook/dali.py   pymol(Download)
def fetch_pdb(pdbCode,outFile):
    import urllib
    import gzip
    import os
    import string
 
    remoteCode = string.upper(pdbCode)

src/p/y/pymol-HEAD/pymol/examples/cookbook/dali.py   pymol(Download)
def fetch_pdb(pdbCode,outFile):
    import urllib
    import gzip
    import os
    import string
 
    remoteCode = string.upper(pdbCode)

src/d/j/django-navbar-0.3.0/examples/dbgp/_logging/handlers.py   django-navbar(Download)
    def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None):
        BaseRotatingHandler.__init__(self, filename, 'a', encoding)
        self.when = string.upper(when)
        self.backupCount = backupCount
        # Calculate the real rollover interval, which is just the number of
        # seconds between rollovers.  Also set the filename suffix used when
        # a rollover occurs.  Current 'when' events supported:
    def __init__(self, host, url, method="GET"):
        """
        Initialize the instance with the host, the request URL, and the method
        ("GET" or "POST")
        """
        logging.Handler.__init__(self)
        method = string.upper(method)

src/n/o/notmm-0.4.1/examples/lib/product/utils.py   notmm(Download)
def validation_yesno(value, product=None):
    """
    Validates that yes or no is entered. 
    Converts the yes or no to capitalized version
    """
    if string.upper(value) in ["YES","NO"]:
        return True, string.capitalize(value)

src/p/d/pdb2pqr-HEAD/trunk/pdb2pqr/pdb2pka/pKaIO_compat.py   pdb2pqr(Download)
                nline=string.replace(nline,')','')
                list=string.split(nline)
                if len(list[3])==1:
                    resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                else:
                    resid=string.zfill(list[2],4)+string.upper(list[1])
                    chainid=None
                nline=string.replace(nline,')','')
                list=string.split(nline)
                if len(list[3])==1:
                    resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                else:
                    resid=string.zfill(list[2],4)+string.upper(list[1])
                    chainid=None
                    nline=string.replace(nline,')','')
                    list=string.split(nline)
                    if len(list[3])==1:
                        partid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                    else:
                        partid=string.zfill(list[2],4)+string.upper(list[1])
                    if term2:
            nline=string.replace(nline,')','')
            list=string.split(nline)
            if len(list[3])==1:
                resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
            else:
                resid=string.zfill(list[2],4)+string.upper(list[1])
                chainid=None

src/p/d/pdb2pqr-HEAD/pdb2pqr/pdb2pka/pKaIO_compat.py   pdb2pqr(Download)
                nline=string.replace(nline,')','')
                list=string.split(nline)
                if len(list[3])==1:
                    resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                else:
                    resid=string.zfill(list[2],4)+string.upper(list[1])
                    chainid=None
                nline=string.replace(nline,')','')
                list=string.split(nline)
                if len(list[3])==1:
                    resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                else:
                    resid=string.zfill(list[2],4)+string.upper(list[1])
                    chainid=None
                    nline=string.replace(nline,')','')
                    list=string.split(nline)
                    if len(list[3])==1:
                        partid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
                    else:
                        partid=string.zfill(list[2],4)+string.upper(list[1])
                    if term2:
            nline=string.replace(nline,')','')
            list=string.split(nline)
            if len(list[3])==1:
                resid=string.zfill(list[2],4)+string.upper(list[1])+list[3]
            else:
                resid=string.zfill(list[2],4)+string.upper(list[1])
                chainid=None

src/p/y/pymca-HEAD/PyMca/EdfFile.py   pymca(Download)
                    break
 
                #if typeItem in self.Images[Index].StaticHeader.keys():          
                if (string.upper(typeItem)) in STATIC_HEADER_ELEMENTS_CAPS:
                    self.Images[Index].StaticHeader[typeItem] = valueItem
                else:
                    self.Images[Index].Header[typeItem] = valueItem
                self.Images[Index].ByteOrder = 'LowByteFirst'
            else:
                self.Images[Index].ByteOrder = 'HighByteFirst'
            if string.upper(self.SysByteOrder) != string.upper(self.Images[Index].ByteOrder):
                self.__data = self.__data.byteswap()
                self.Images[Index].ByteOrder = self.SysByteOrder
 
                        Data = numpy.concatenate((Data, line))
                Data = numpy.reshape(Data, (Size[2], Size[1], Size[0]))
 
        if string.upper(self.SysByteOrder) != string.upper(self.Images[Index].ByteOrder):
            Data = Data.byteswap()
        if DataType != "":
            Data = self.__SetDataType__ (Data, DataType)
                offset = offset + (Position[2] * size_img)
        self.File.seek(self.Images[Index].DataPosition + offset, 0)
        Data = numpy.fromstring(self.File.read(size_pixel), self.__GetDefaultNumpyType__(self.Images[Index].DataType, index=Index))
        if string.upper(self.SysByteOrder) != string.upper(self.Images[Index].ByteOrder):
            Data = Data.byteswap()
        Data = self.__SetDataType__ (Data, "DoubleValue")
        return Data[0]
        self.Images[Index].DataPosition = self.File.tell()
 
        #if self.Images[Index].StaticHeader["ByteOrder"] != self.SysByteOrder:
        if string.upper(self.Images[Index].ByteOrder) != string.upper(self.SysByteOrder):
            self.File.write((Data.byteswap()).tostring())
        else:
            self.File.write(Data.tostring())
    def GetDefaultNumpyType(self, EdfType, index=None):
        """ Returns NumPy type according Edf type
        """
        if index is None:return GetDefaultNumpyType(EdfType)
        EdfType = string.upper(EdfType)
        if EdfType in ['SIGNED64']  :return numpy.int64
        if EdfType in ['UNSIGNED64']:return numpy.uint64
def GetDefaultNumpyType(EdfType):
    """ Returns NumPy type according Edf type
    """
    EdfType = string.upper(EdfType)
    if   EdfType == "SIGNEDBYTE":       return numpy.int8   # "b"
    elif EdfType == "UNSIGNEDBYTE":     return numpy.uint8  # "B"       
    elif EdfType == "SIGNEDSHORT":      return numpy.int16  # "h"
        newvalue = Dict[i]
        if Flag & KEYS:
            if Case == LOWER_CASE:  newkey = string.lower(newkey)
            else:                   newkey = string.upper(newkey)
        if Flag & VALUES:
            if Case == LOWER_CASE:  newvalue = string.lower(newvalue)
            else:                   newvalue = string.upper(newvalue)

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