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

All Samples(3304)  |  Call(3250)  |  Derive(0)  |  Import(54)
Return a list of all non-overlapping matches in the string.

If one or more groups are present in the pattern, return a
list of groups; this will be a list of tuples if the pattern
has more than one group.

Empty matches are included in the result.

        def findall(pattern, string, flags=0):
    """Return a list of all non-overlapping matches in the string.

    If one or more groups are present in the pattern, return a
    list of groups; this will be a list of tuples if the pattern
    has more than one group.

    Empty matches are included in the result."""
    return _compile(pattern, flags).findall(string)
        


src/a/s/asr-builder-HEAD/trunk/src/ASRBuilder/Parser.py   asr-builder(Download)
from md5 import md5
from os.path import join
from threading import Thread
from re import sub, split, match, findall
 
from HTKAssist import HTKAssist
from HTKWrapper import HTKWrapper
                                    tmp = split(r':\'', part)
                                    retrieve[tmp[0].upper()] = tmp[1].strip("'")
 
                                std = findall(r'.*(?=\<)', temp)[0]
                                cmdArgs = self._removeNulls(split(r' *', std))
                            else:
                                cmdArgs = self._removeNulls(split(r' *', temp))

src/d/o/dovlog-HEAD/trunk/dovlog/librules.py   dovlog(Download)
 
import config
import traceback, string, time, sys
from re import findall, sub, search
 
CTY_COUNTRY = 1
CTY_ZONE_CQ = 2
				for i in p:
					if '(' in i or '[' in i:
						cqitu = [info[1], info[2]]
						cq = findall('\((\d{1,2})\)', i)
						itu = findall('\[(\d{1,2})\]', i)
						if len(cq) == 1:
							cqitu[0] = cq[0]
	def mults(self, call, ex):
		m = findall('[A-Z]{2,2}', ex.upper())
		if len(m) == 1:
			return (m[0],)
		else:
			return (None,)
 
	def formatEx(self, rst, ex):
		'''Format recvd exchange'''
		p = ex.strip().upper().split(' ')
		if len(p) > 1:
			if findall('^[A-Z]{2,2}\d{2,2}$', p[0]) and findall('^\d+$', p[1]):
				loc = p[0]
				nr = int(p[1])
			elif findall('^[A-Z]{2,2}\d{2,2}$', p[1]) and findall('^\d+$', p[0]):

src/p/y/py-mycms-HEAD/trunk/MyCMS/WRAPPERS.py   py-mycms(Download)
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
 
from re import findall, sub, subn
from MyCMS.CONSTANTS import BASEURL, BASE, STRIPPRE
 
 
def percentOut(txt):
	for x in findall( P, txt ):
		txt = sub( P, PS+x, txt, 1 )
	return txt
 
 
def percentIn(txt):

src/a/s/asr-builder-HEAD/src/ASRBuilder/Parser.py   asr-builder(Download)
from md5 import md5
from os.path import join
from threading import Thread
from re import sub, split, match, findall
 
from HTKAssist import HTKAssist
from HTKWrapper import HTKWrapper
                                    tmp = split(r':\'', part)
                                    retrieve[tmp[0].upper()] = tmp[1].strip("'")
 
                                std = findall(r'.*(?=\<)', temp)[0]
                                cmdArgs = self._removeNulls(split(r' *', std))
                            else:
                                cmdArgs = self._removeNulls(split(r' *', temp))

src/d/o/dovlog-HEAD/dovlog/librules.py   dovlog(Download)
 
import config
import traceback, string, time, sys
from re import findall, sub, search
 
CTY_COUNTRY = 1
CTY_ZONE_CQ = 2
				for i in p:
					if '(' in i or '[' in i:
						cqitu = [info[1], info[2]]
						cq = findall('\((\d{1,2})\)', i)
						itu = findall('\[(\d{1,2})\]', i)
						if len(cq) == 1:
							cqitu[0] = cq[0]
	def mults(self, call, ex):
		m = findall('[A-Z]{2,2}', ex.upper())
		if len(m) == 1:
			return (m[0],)
		else:
			return (None,)
 
	def formatEx(self, rst, ex):
		'''Format recvd exchange'''
		p = ex.strip().upper().split(' ')
		if len(p) > 1:
			if findall('^[A-Z]{2,2}\d{2,2}$', p[0]) and findall('^\d+$', p[1]):
				loc = p[0]
				nr = int(p[1])
			elif findall('^[A-Z]{2,2}\d{2,2}$', p[1]) and findall('^\d+$', p[0]):

src/p/y/py-mycms-HEAD/MyCMS/WRAPPERS.py   py-mycms(Download)
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
 
from re import findall, sub, subn
from MyCMS.CONSTANTS import BASEURL, BASE, STRIPPRE
 
 
def percentOut(txt):
	for x in findall( P, txt ):
		txt = sub( P, PS+x, txt, 1 )
	return txt
 
 
def percentIn(txt):

src/p/y/py-mycms-HEAD/trunk/MyCMS/tools/atlas.py   py-mycms(Download)
 
from MyCMS import BASE, NUL, DATA_LOC, ATLAS
import cPickle
from re import sub, findall, subn
from MyCMS.html.form.field import FormField
 
 
		raise ValueError, LU_ERR % 2
	if debug:       print "states valid<BR>"
	states = states[0]['states']
	abr = findall( '\'\w{2}\'\:', states )
	for i in range(len(abr)):
		abr[i] = abr[i][1:-2]
	g = findall( '[\S\s]{5}[^\\\{\:\,]\'[^\}\:\,][\S\s]{5}', states )

src/p/o/powervpn-HEAD/trunk/source/powervpn-0.0.4/gui/setting.py   powervpn(Download)
#!/usr/bin/python
import gtk
from string import join
from re import findall, split
from sys import prefix
from powervpn.module import openvpn
from powervpn.sub import syslang, gui, pref, nav
	def _entry_check(self, widget, type=None):
		""" NOTE: Tooltip can be converted to a more appropriate building """
 
		text = getattr(self, widget).get_text()
 
		if (type == "ip") and (findall('[^0-9\.]+', text)):
			getattr(self, widget).set_text(join(split('[^0-9\.]+', text), ""))
			getattr(self, widget).set_tooltip_text(syslang.translate("TEXT_INVALID_CHARS_4", "info"))
			self._in_entry_check = False # So we do not remove tooltip immediately
			return False
 
		if (type == "numeric") and (findall('[^0-9]+', text)):
			self._in_entry_check = False # So we do not remove tooltip immediately
			return False
 
		if findall('[*?"<>|;$%\^]+', text):
			getattr(self, widget).set_text(join(split('[*?"<>|;$%\^]+', text), ""))
			getattr(self, widget).set_tooltip_text(syslang.translate("TEXT_INVALID_CHARS_2", "info"))
			self._in_entry_check = False # So we do not remove tooltip immediately

src/p/y/py-mycms-HEAD/MyCMS/tools/atlas.py   py-mycms(Download)
 
from MyCMS import BASE, NUL, DATA_LOC, ATLAS
import cPickle
from re import sub, findall, subn
from MyCMS.html.form.field import FormField
 
 
		raise ValueError, LU_ERR % 2
	if debug:       print "states valid<BR>"
	states = states[0]['states']
	abr = findall( '\'\w{2}\'\:', states )
	for i in range(len(abr)):
		abr[i] = abr[i][1:-2]
	g = findall( '[\S\s]{5}[^\\\{\:\,]\'[^\}\:\,][\S\s]{5}', states )

src/p/y/py-mycms-HEAD/trunk/MyCMS/tools/other/codeStructure.py   py-mycms(Download)
"""
 
from commands import getoutput as gop
from re import findall, split, search
from sys import argv
import cPickle
 
		                file = open(f)
		                code = file.read()
		                file.close()
		                cnt = len(findall('\n+',code))
		                self.docoutput = self.docoutput + "\n" + str(cnt) + "\t" + f + "\n"
		                talley = talley + cnt
				codeClasses[f], fout = self.codeAnalysis(f)

  1 | 2 | 3 | 4 | 5  Next