rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
('build_platlib', 'build_dir'), ('install_platlib', 'install_dir'))
('build_lib', 'build_dir'), ('install_lib', 'install_dir'))
def finalize_options (self): self.set_undefined_options ('install', ('build_platlib', 'build_dir'), ('install_platlib', 'install_dir'))
531349f28e6c87ca6ccfa3abd161ea259f10e32a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/531349f28e6c87ca6ccfa3abd161ea259f10e32a/install_ext.py
req.add_header(self.auth_header, auth_val)
req.add_unredirected_header(self.auth_header, auth_val)
def retry_http_digest_auth(self, req, auth): token, challenge = auth.split(' ', 1) chal = parse_keqv_list(parse_http_list(challenge)) auth = self.get_authorization(req, chal) if auth: auth_val = 'Digest %s' % auth if req.headers.get(self.auth_header, None) == auth_val: return None req.add_header(self.auth_header, auth_...
852bb008182c012bae6d53c8c8c8f83d1ec9445a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/852bb008182c012bae6d53c8c8c8f83d1ec9445a/urllib2.py
def group(i):
def group(self, i):
def group(i):
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
def assemble_set(self, position, labels):
def assemble(self, position, labels):
def assemble_set(self, position, labels):
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
if c in self.set[2]:
if c in self.set:
def assemble_set(self, position, labels):
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
result = result + `char`
result = result + char
def __repr__(self):
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
if stack[-1][0][1] > 0:
if stack[-1][0].register > 0:
def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n'...
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n'...
63e18195b8b7a064488d106537703861f08aa415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/63e18195b8b7a064488d106537703861f08aa415/re.py
raise DistutilsFileErorr, \
raise DistutilsFileError, \
def check_package (self, package, package_dir):
56359f591b361f41f661a14e5ed129bf8f22fa87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56359f591b361f41f661a14e5ed129bf8f22fa87/build_py.py
dict = {}
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package ...
3d548717f502b068a582f3f1de82084dbd100c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3d548717f502b068a582f3f1de82084dbd100c7a/pyclbr.py
dict = {'__path__': [file]}
dict['__path__'] = [file]
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package ...
3d548717f502b068a582f3f1de82084dbd100c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3d548717f502b068a582f3f1de82084dbd100c7a/pyclbr.py
return dict
path = [file] + path f, file, (suff, mode, type) = \ imp.find_module('__init__', [file])
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package ...
3d548717f502b068a582f3f1de82084dbd100c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3d548717f502b068a582f3f1de82084dbd100c7a/pyclbr.py
dict = {}
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package ...
3d548717f502b068a582f3f1de82084dbd100c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3d548717f502b068a582f3f1de82084dbd100c7a/pyclbr.py
dict = {}
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package ...
3d548717f502b068a582f3f1de82084dbd100c7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3d548717f502b068a582f3f1de82084dbd100c7a/pyclbr.py
path = os.path.join(host, path) if path[-1] == "/": path = path + "index.html"
if not path or path[-1] == "/": path = path + "index.html"
def savefilename(self, url): type, rest = urllib.splittype(url) host, path = urllib.splithost(rest) while path[:1] == "/": path = path[1:] user, host = urllib.splituser(host) host, port = urllib.splitnport(host) host = string.lower(host) path = os.path.join(host, path) if path[-1] == "/": path = path + "index.html" if ...
d328a9b5f41b38d6127d697b0f9fb5f85e52adfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d328a9b5f41b38d6127d697b0f9fb5f85e52adfa/websucker.py
if c not in '123': raise error_proto, resp return resp
raise error_proto, resp
def getresp(self): resp = self.getmultiline() if self.debugging: print '*resp*', self.sanitize(resp) self.lastresp = resp[:3] c = resp[:1] if c == '4': raise error_temp, resp if c == '5': raise error_perm, resp if c not in '123': raise error_proto, resp return resp
c88a6c75df1e2dac818b63a36db6c8282f4541f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c88a6c75df1e2dac818b63a36db6c8282f4541f7/ftplib.py
if resp[:3] <> '229':
if resp[:3] != '229':
def parse229(resp, peer): '''Parse the '229' response for a EPSV request. Raises error_proto if it does not contain '(|||port|)' Return ('host.addr.as.numbers', port#) tuple.''' if resp[:3] <> '229': raise error_reply, resp left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) if ...
c88a6c75df1e2dac818b63a36db6c8282f4541f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c88a6c75df1e2dac818b63a36db6c8282f4541f7/ftplib.py
if resp[left + 1] <> resp[right - 1]:
if resp[left + 1] != resp[right - 1]:
def parse229(resp, peer): '''Parse the '229' response for a EPSV request. Raises error_proto if it does not contain '(|||port|)' Return ('host.addr.as.numbers', port#) tuple.''' if resp[:3] <> '229': raise error_reply, resp left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) if ...
c88a6c75df1e2dac818b63a36db6c8282f4541f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c88a6c75df1e2dac818b63a36db6c8282f4541f7/ftplib.py
if len(parts) <> 5:
if len(parts) != 5:
def parse229(resp, peer): '''Parse the '229' response for a EPSV request. Raises error_proto if it does not contain '(|||port|)' Return ('host.addr.as.numbers', port#) tuple.''' if resp[:3] <> '229': raise error_reply, resp left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) if ...
c88a6c75df1e2dac818b63a36db6c8282f4541f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c88a6c75df1e2dac818b63a36db6c8282f4541f7/ftplib.py
Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...'''
Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ... -d dir -l list -p password ''' if len(sys.argv) < 2: print test.__doc__ sys.exit(0)
def test(): '''Test program. Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...''' debugging = 0 rcfile = None while sys.argv[1] == '-d': debugging = debugging+1 del sys.argv[1] if sys.argv[1][:2] == '-r': # get name of alternate ~/.netrc file: rcfile = sys.argv[1][2:] del sys.argv[1] host = sys.argv[...
c88a6c75df1e2dac818b63a36db6c8282f4541f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c88a6c75df1e2dac818b63a36db6c8282f4541f7/ftplib.py
(S_IFLNK, "l", S_IFREG, "-", S_IFBLK, "b", S_IFDIR, "d", S_IFCHR, "c", S_IFIFO, "p"), (TUREAD, "r"), (TUWRITE, "w"), (TUEXEC, "x", TSUID, "S", TUEXEC|TSUID, "s"), (TGREAD, "r"), (TGWRITE, "w"), (TGEXEC, "x", TSGID, "S", TGEXEC|TSGID, "s"), (TOREAD, "r"), (TOWRITE, "w"), (TOEXEC, "x", TSVTX, "T", TOEXEC|TSVTX, "t"...
((S_IFLNK, "l"), (S_IFREG, "-"), (S_IFBLK, "b"), (S_IFDIR, "d"), (S_IFCHR, "c"), (S_IFIFO, "p")), ((TUREAD, "r"),), ((TUWRITE, "w"),), ((TUEXEC|TSUID, "s"), (TSUID, "S"), (TUEXEC, "x")), ((TGREAD, "r"),), ((TGWRITE, "w"),), ((TGEXEC|TSGID, "s"), (TSGID,...
def copyfileobj(src, dst, length=None): """Copy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. """ if length == 0: return if length is None: shutil.copyfileobj(src, dst) return BUFSIZE = 16 * 1024 blocks, remainder = divmod(length, BUFSIZE) for b in xrange(blocks): buf = src....
8bc462fcafe9f11094f0185813f95c0f569b112e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bc462fcafe9f11094f0185813f95c0f569b112e/tarfile.py
s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
perm = [] for table in filemode_table: for bit, char in table: if mode & bit == bit: perm.append(char) break else: perm.append("-") return "".join(perm)
def filemode(mode): """Convert a file's mode to a string of the form -rwxrwxrwx. Used by TarFile.list() """ s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
8bc462fcafe9f11094f0185813f95c0f569b112e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bc462fcafe9f11094f0185813f95c0f569b112e/tarfile.py
l.grid(row=self.row, col=0, sticky="nw")
l.grid(row=self.row, column=0, sticky="nw")
def make_entry(self, label, var): l = Label(self.top, text=label) l.grid(row=self.row, col=0, sticky="nw") e = Entry(self.top, textvariable=var, exportselection=0) e.grid(row=self.row, col=1, sticky="nwe") self.row = self.row + 1 return e
4fc904708bc3175669d158d647b8a2fd14036373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fc904708bc3175669d158d647b8a2fd14036373/SearchDialogBase.py
e.grid(row=self.row, col=1, sticky="nwe")
e.grid(row=self.row, column=1, sticky="nwe")
def make_entry(self, label, var): l = Label(self.top, text=label) l.grid(row=self.row, col=0, sticky="nw") e = Entry(self.top, textvariable=var, exportselection=0) e.grid(row=self.row, col=1, sticky="nwe") self.row = self.row + 1 return e
4fc904708bc3175669d158d647b8a2fd14036373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fc904708bc3175669d158d647b8a2fd14036373/SearchDialogBase.py
l.grid(row=self.row, col=0, sticky="nw")
l.grid(row=self.row, column=0, sticky="nw")
def make_frame(self,labeltext=None): if labeltext: l = Label(self.top, text=labeltext) l.grid(row=self.row, col=0, sticky="nw") f = Frame(self.top) f.grid(row=self.row, col=1, columnspan=1, sticky="nwe") self.row = self.row + 1 return f
4fc904708bc3175669d158d647b8a2fd14036373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fc904708bc3175669d158d647b8a2fd14036373/SearchDialogBase.py
f.grid(row=self.row, col=1, columnspan=1, sticky="nwe")
f.grid(row=self.row, column=1, columnspan=1, sticky="nwe")
def make_frame(self,labeltext=None): if labeltext: l = Label(self.top, text=labeltext) l.grid(row=self.row, col=0, sticky="nw") f = Frame(self.top) f.grid(row=self.row, col=1, columnspan=1, sticky="nwe") self.row = self.row + 1 return f
4fc904708bc3175669d158d647b8a2fd14036373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fc904708bc3175669d158d647b8a2fd14036373/SearchDialogBase.py
f.grid(row=0,col=2,padx=2,pady=2,ipadx=2,ipady=2)
f.grid(row=0,column=2,padx=2,pady=2,ipadx=2,ipady=2)
def create_command_buttons(self): # # place button frame on the right f = self.buttonframe = Frame(self.top) f.grid(row=0,col=2,padx=2,pady=2,ipadx=2,ipady=2)
4fc904708bc3175669d158d647b8a2fd14036373 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4fc904708bc3175669d158d647b8a2fd14036373/SearchDialogBase.py
def startElement(self, name, tagName, attrs):
def startElement(self, name, attrs):
def startElement(self, name, tagName, attrs): if not hasattr(self, "curNode"): # FIXME: hack! self.startDocument()
e84bf751bb0d18851877518dbb6d382f909f16b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e84bf751bb0d18851877518dbb6d382f909f16b4/pulldom.py
node = self.document.createElement(tagName) for attr in attrs.keys():
node = self.document.createElement(name) for (attr, value) in attrs.items():
def startElement(self, name, tagName, attrs): if not hasattr(self, "curNode"): # FIXME: hack! self.startDocument()
e84bf751bb0d18851877518dbb6d382f909f16b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e84bf751bb0d18851877518dbb6d382f909f16b4/pulldom.py
def startElement(self, name, tagName, attrs): if not hasattr(self, "curNode"): # FIXME: hack! self.startDocument()
e84bf751bb0d18851877518dbb6d382f909f16b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e84bf751bb0d18851877518dbb6d382f909f16b4/pulldom.py
def endElement(self, name, tagName):
def endElement(self, name):
def endElement(self, name, tagName): node = self.curNode self.lastEvent[1] = [(END_ELEMENT, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((END_ELEMENT, node)) self.curNode = node.parentNode
e84bf751bb0d18851877518dbb6d382f909f16b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e84bf751bb0d18851877518dbb6d382f909f16b4/pulldom.py
exts.append( Extension('pwd', ['pwdmodule.c']) ) exts.append( Extension('grp', ['grpmodule.c']) )
if platform not in ['mac']: exts.append( Extension('pwd', ['pwdmodule.c']) ) exts.append( Extension('grp', ['grpmodule.c']) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py
if platform not in ['atheos']:
if platform not in ['atheos', 'mac']:
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py
exts.append( Extension('syslog', ['syslogmodule.c']) )
if platform not in ['mac']: exts.append( Extension('syslog', ['syslogmodule.c']) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py
if self.compiler.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
if platform not in ['mac']: if self.compiler.find_library_file(lib_dirs, 'crypt'): libs = ['crypt'] else: libs = [] exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py
if platform not in ['cygwin']:
if platform not in ['cygwin', 'mac']:
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py
strftime_output = time.strftime("%c", self.time_tuple) self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date_time, self.time_tuple), "LC_date_time incorrect")
def test_date_time(self): # Check that LC_date_time, LC_date, and LC_time are correct strftime_output = time.strftime("%c", self.time_tuple) self.failUnless(strftime_output == time.strftime(self.LT_ins.LC_date_time, self.time_tuple), "LC_date_time incorrect") strftime_output = time.strftime("%x", self.time_tuple) self....
472c5229c4876fad95fca103fd81d35b7dd9fc13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/472c5229c4876fad95fca103fd81d35b7dd9fc13/test_strptime.py
on connect to the Net for testing.
on connecting to the Net for testing.
def hexescape(char): """Escape char as RFC 2396 specifies""" hex_repr = hex(ord(char))[2:].upper() if len(hex_repr) == 1: hex_repr = "0%s" % hex_repr return "%" + hex_repr
f1a2f9ec41e3477ae09da0ead52a573ec578de42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f1a2f9ec41e3477ae09da0ead52a573ec578de42/test_urllib.py
return apply(Open, (), options).show()
return Open(**options).show()
def askopenfilename(**options): "Ask for a filename to open" return apply(Open, (), options).show()
25ee87cc50ab99a1342091b5067c074878c9b212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/25ee87cc50ab99a1342091b5067c074878c9b212/tkFileDialog.py
return apply(SaveAs, (), options).show()
return SaveAs(**options).show()
def asksaveasfilename(**options): "Ask for a filename to save as" return apply(SaveAs, (), options).show()
25ee87cc50ab99a1342091b5067c074878c9b212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/25ee87cc50ab99a1342091b5067c074878c9b212/tkFileDialog.py
filename = apply(Open, (), options).show()
filename = Open(**options).show()
def askopenfile(mode = "r", **options): "Ask for a filename to open, and returned the opened file" filename = apply(Open, (), options).show() if filename: return open(filename, mode) return None
25ee87cc50ab99a1342091b5067c074878c9b212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/25ee87cc50ab99a1342091b5067c074878c9b212/tkFileDialog.py
filename = apply(SaveAs, (), options).show()
filename = SaveAs(**options).show()
def asksaveasfile(mode = "w", **options): "Ask for a filename to save as, and returned the opened file" filename = apply(SaveAs, (), options).show() if filename: return open(filename, mode) return None
25ee87cc50ab99a1342091b5067c074878c9b212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/25ee87cc50ab99a1342091b5067c074878c9b212/tkFileDialog.py
self.top.wm_deiconify() self.top.tkraise()
def close(self): self.top.wm_deiconify() self.top.tkraise() reply = self.maybesave() if reply != "cancel": self._close() return reply
67716b5f53715e57d147cde9539b8d76a5a56e11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/67716b5f53715e57d147cde9539b8d76a5a56e11/EditorWindow.py
r'(?P<option>[-\w_.*,(){}]+)'
r'(?P<option>[]\-[\w_.*,(){}]+)'
def remove_section(self, section): """Remove a file section.""" if self.__sections.has_key(section): del self.__sections[section] return 1 else: return 0
d83bbbfd222d7e399fd8b2b17492c1448dc4f2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d83bbbfd222d7e399fd8b2b17492c1448dc4f2a2/ConfigParser.py
else: if __debug__: self.fail("AssertionError not raised by assert 0")
def testAssert(self): # assert_stmt: 'assert' test [',' test] assert 1 assert 1, 1 assert lambda x:x assert 1, lambda x:x+1 try: assert 0, "msg" except AssertionError, e: self.assertEquals(e.args[0], "msg") # we can not expect an assertion error to be raised # if the tests are run in an optimized python #else: # sel...
facd273198689d9c083056e55fca95c1db348d0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/facd273198689d9c083056e55fca95c1db348d0e/test_grammar.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch(self, frame, event, arg): timer = self.timer t = timer() t = t[0] + t[1] - self.t - self.bias
2e39d80925437b8f5aac6bd130188ead381792ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e39d80925437b8f5aac6bd130188ead381792ec/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_i(self, frame, event, arg): timer = self.timer t = timer() - self.t - self.bias
2e39d80925437b8f5aac6bd130188ead381792ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e39d80925437b8f5aac6bd130188ead381792ec/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_mac(self, frame, event, arg): timer = self.timer t = timer()/60.0 - self.t - self.bias
2e39d80925437b8f5aac6bd130188ead381792ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e39d80925437b8f5aac6bd130188ead381792ec/profile.py
self.c_func_name = arg
self.c_func_name = repr(arg)
def trace_dispatch_l(self, frame, event, arg): get_time = self.get_time t = get_time() - self.t - self.bias
2e39d80925437b8f5aac6bd130188ead381792ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2e39d80925437b8f5aac6bd130188ead381792ec/profile.py
import warnings warnings.warn("cookielib bug!", stacklevel=2) import traceback traceback.print_exc()
import warnings, traceback, StringIO f = StringIO.StringIO() traceback.print_exc(None, f) msg = f.getvalue() warnings.warn("cookielib bug!\n%s" % msg, stacklevel=2)
def reraise_unmasked_exceptions(unmasked=()): # There are a few catch-all except: statements in this module, for # catching input that's bad in unexpected ways. # This function re-raises some exceptions we don't want to trap. unmasked = unmasked + (KeyboardInterrupt, SystemExit, MemoryError) etype = sys.exc_info()[0] i...
ae40c2f795c038abbc5e6df05f050f3d8154c4a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ae40c2f795c038abbc5e6df05f050f3d8154c4a7/cookielib.py
print "<H3>Shell environment:</H3>"
print "<H3>Shell Environment:</H3>"
def print_environ(): """Dump the shell environment as HTML.""" keys = environ.keys() keys.sort() print print "<H3>Shell environment:</H3>" print "<DL>" for key in keys: print "<DT>", escape(key), "<DD>", escape(environ[key]) print "</DL>" print
503e50b0fa73e3e549dde6cf643bac27f5f6b124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/503e50b0fa73e3e549dde6cf643bac27f5f6b124/cgi.py
print "<H3>Form contents:</H3>"
print "<H3>Form Contents:</H3>"
def print_form(form): """Dump the contents of a form as HTML.""" keys = form.keys() keys.sort() print print "<H3>Form contents:</H3>" print "<DL>" for key in keys: print "<DT>" + escape(key) + ":", value = form[key] print "<i>" + escape(`type(value)`) + "</i>" print "<DD>" + escape(`value`) print "</DL>" print
503e50b0fa73e3e549dde6cf643bac27f5f6b124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/503e50b0fa73e3e549dde6cf643bac27f5f6b124/cgi.py
print "<H3>Command line Arguments:</H3>"
print "<H3>Command Line Arguments:</H3>"
def print_arguments(): print print "<H3>Command line Arguments:</H3>" print print sys.argv print
503e50b0fa73e3e549dde6cf643bac27f5f6b124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/503e50b0fa73e3e549dde6cf643bac27f5f6b124/cgi.py
def _call_chain(self, chain, kind, meth_name, *args): # XXX raise an exception if no one else should try to handle # this url. return None if you can't but someone else could. handlers = chain.get(kind, ()) for handler in handlers: func = getattr(handler, meth_name)
c5ffd9191189b00c9801f126604bb0b575e19e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c5ffd9191189b00c9801f126604bb0b575e19e16/urllib2.py
class CustomProxy: def __init__(self, proto, func=None, proxy_addr=None): self.proto = proto self.func = func self.addr = proxy_addr def handle(self, req): if self.func and self.func(req): return 1 def get_proxy(self): return self.addr class CustomProxyHandler(BaseHandler): handler_order = 100 def __init__(sel...
def proxy_open(self, req, proxy, type): orig_type = req.get_type() proxy_type, user, password, hostport = _parse_proxy(proxy) if proxy_type is None: proxy_type = orig_type if user and password: user_pass = '%s:%s' % (unquote(user), unquote(password)) creds = base64.encodestring(user_pass).strip() req.add_header('Proxy-...
c5ffd9191189b00c9801f126604bb0b575e19e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c5ffd9191189b00c9801f126604bb0b575e19e16/urllib2.py
class OpenerFactory: default_handlers = [UnknownHandler, HTTPHandler, HTTPDefaultErrorHandler, HTTPRedirectHandler, FTPHandler, FileHandler] handlers = [] replacement_handlers = [] def add_handler(self, h): self.handlers = self.handlers + [h] def replace_handler(self, h): pass def build_opener(self): opener = Ope...
def gopher_open(self, req): import gopherlib # this raises DeprecationWarning in 2.5 host = req.get_host() if not host: raise GopherError('no host given') host = unquote(host) selector = req.get_selector() type, selector = splitgophertype(selector) selector, query = splitquery(selector) selector = unquote(selector) if...
c5ffd9191189b00c9801f126604bb0b575e19e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c5ffd9191189b00c9801f126604bb0b575e19e16/urllib2.py
vout.setpf(1, -2))
vout.setpf((1, -2))
def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile...
f48b419a075dc237eb145e1b71cec12afdb7aff4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f48b419a075dc237eb145e1b71cec12afdb7aff4/Vrec.py
iv = (float(i)/float(maxi-1))-0.5
if maxi = 1: iv = 0 else: iv = (float(i)/float(maxi-1))-0.5
def initcmap(ybits,ibits,qbits,chrompack): if ybits+ibits+qbits > 11: raise 'Sorry, 11 bits max' maxy = pow(2,ybits) maxi = pow(2,ibits) maxq = pow(2,qbits) for i in range(2048,4096-256): mapcolor(i, 0, 255, 0) for y in range(maxy): yv = float(y)/float(maxy-1) for i in range(maxi): iv = (float(i)/float(maxi-1))-0.5 for...
696f91151c6fe3d885fc658056c3fd19aceb4943 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/696f91151c6fe3d885fc658056c3fd19aceb4943/video.py
qv = (float(q)/float(maxq-1))-0.5
if maxq = 1: qv = 0 else: qv = (float(q)/float(maxq-1))-0.5
def initcmap(ybits,ibits,qbits,chrompack): if ybits+ibits+qbits > 11: raise 'Sorry, 11 bits max' maxy = pow(2,ybits) maxi = pow(2,ibits) maxq = pow(2,qbits) for i in range(2048,4096-256): mapcolor(i, 0, 255, 0) for y in range(maxy): yv = float(y)/float(maxy-1) for i in range(maxi): iv = (float(i)/float(maxi-1))-0.5 for...
696f91151c6fe3d885fc658056c3fd19aceb4943 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/696f91151c6fe3d885fc658056c3fd19aceb4943/video.py
def initcmap(ybits,ibits,qbits,chrompack): if ybits+ibits+qbits > 11: raise 'Sorry, 11 bits max' maxy = pow(2,ybits) maxi = pow(2,ibits) maxq = pow(2,qbits) for i in range(2048,4096-256): mapcolor(i, 0, 255, 0) for y in range(maxy): yv = float(y)/float(maxy-1) for i in range(maxi): iv = (float(i)/float(maxi-1))-0.5 for...
696f91151c6fe3d885fc658056c3fd19aceb4943 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/696f91151c6fe3d885fc658056c3fd19aceb4943/video.py
(self.ac_out_buffer is '') and
(self.ac_out_buffer == '') and
def writable (self): "predicate for inclusion in the writable for select()" # return len(self.ac_out_buffer) or len(self.producer_fifo) or (not self.connected) # this is about twice as fast, though not as clear. return not ( (self.ac_out_buffer is '') and self.producer_fifo.is_empty() and self.connected )
6fd71206169c48daf9a45fe246b495bb8113fd10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6fd71206169c48daf9a45fe246b495bb8113fd10/asynchat.py
if os.path.exists(filename) or hasattr(getmodule(object), '__loader__'):
if os.path.exists(filename): return filename if filename[:1]!='<' and hasattr(getmodule(object), '__loader__'):
def getsourcefile(object): """Return the Python source file an object was defined in, if it exists.""" filename = getfile(object) if string.lower(filename[-4:]) in ('.pyc', '.pyo'): filename = filename[:-4] + '.py' for suffix, mode, kind in imp.get_suffixes(): if 'b' in mode and string.lower(filename[-len(suffix):]) ==...
72ae6c80d489ea9d26958616d57cc37a5bd27d46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/72ae6c80d489ea9d26958616d57cc37a5bd27d46/inspect.py
elif type( item )==StringType:
elif type( item ) in [StringType, UnicodeType]:
def _getName( item, nameFromNum ): "Helper function -- don't use it directly" if type( item ) == IntType: try: keyname = nameFromNum( item ) except (WindowsError, EnvironmentError): raise IndexError, item elif type( item )==StringType: keyname=item else: raise exceptions.TypeError, \ "Requires integer index or string ...
abfeff7f44fcc9451d7f4588bda53adebd2d4ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abfeff7f44fcc9451d7f4588bda53adebd2d4ea4/winreg.py
if type( data )==StringType:
if type( data ) in [StringType, UnicodeType]:
def setValue( self, valname, data, regtype=None ): "Set a data value's data (and optionally type)" if regtype: typeint=regtype.intval else: if type( data )==StringType: typeint=_winreg.REG_SZ elif type( data )==IntType: typeint=_winreg.REG_DWORD elif type( data )==array.ArrayType: typeint=_winreg.REG_BINARY data=data.t...
abfeff7f44fcc9451d7f4588bda53adebd2d4ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abfeff7f44fcc9451d7f4588bda53adebd2d4ea4/winreg.py
data=data.tostring()
def setValue( self, valname, data, regtype=None ): "Set a data value's data (and optionally type)" if regtype: typeint=regtype.intval else: if type( data )==StringType: typeint=_winreg.REG_SZ elif type( data )==IntType: typeint=_winreg.REG_DWORD elif type( data )==array.ArrayType: typeint=_winreg.REG_BINARY data=data.t...
abfeff7f44fcc9451d7f4588bda53adebd2d4ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/abfeff7f44fcc9451d7f4588bda53adebd2d4ea4/winreg.py
prefix = get_config_vars('prefix', 'exec_prefix')
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
def finalize_options (self):
e918b6fdb52bcb904b63da1d14256d76ae48ede6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e918b6fdb52bcb904b63da1d14256d76ae48ede6/install.py
zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file.
zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file.
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
try: import zipfile except ImportError: zipfile = None
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
try: spawn(["zip", "-rq", zip_filename, base_dir], dry_run=dry_run) except DistutilsExecError:
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
if zipfile is None: if verbose: zipoptions = "-r" else: zipoptions = "-rq"
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
import zipfile except ImportError:
spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run) except DistutilsExecError:
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
("unable to create zip file '%s': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename
("unable to create zip file '%s': " "could neither import the 'zipfile' module nor " "find a standalone zip utility") % zip_filename
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
log.info("creating '%s' and adding '%s' to it",
else: log.info("creating '%s' and adding '%s' to it",
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If ne...
cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cdd215789c86f3cd729cf10c9d6fe6b3d5df5d7b/archive_util.py
return if address.lower().startswith('stimpy'): self.push('503 You suck %s' % address)
def smtp_RCPT(self, arg): print >> DEBUGSTREAM, '===> RCPT', arg if not self.__mailfrom: self.push('503 Error: need MAIL command') return address = self.__getaddr('TO:', arg) if not address: self.push('501 Syntax: RCPT TO: <address>') return if address.lower().startswith('stimpy'): self.push('503 You suck %s' % address...
bdc8289e06fb95578187e203048d7ae445e5bb6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bdc8289e06fb95578187e203048d7ae445e5bb6d/smtpd.py
_mesg('untagged responses dump:%s%s' % (t, j(l, t)))
_mesg('untagged responses dump:%s%s' % (t, t.join(l)))
def _dump_ur(dict): # Dump untagged responses (in `dict'). l = dict.items() if not l: return t = '\n\t\t' l = map(lambda x:'%s: "%s"' % (x[0], x[1][0] and '" "'.join(x[1]) or ''), l) _mesg('untagged responses dump:%s%s' % (t, j(l, t)))
34d97059437f81d2accb664758a31d2c4b863cf5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/34d97059437f81d2accb664758a31d2c4b863cf5/imaplib.py
if short_first: self.format_option_strings = self.format_option_strings_short_first else: self.format_option_strings = self.format_option_strings_long_first
self.short_first = short_first
def __init__ (self, indent_increment, max_help_position, width, short_first): self.indent_increment = indent_increment self.help_position = self.max_help_position = max_help_position self.width = width self.current_indent = 0 self.level = 0 self.help_width = width - max_help_position if short_first: self.format_option_...
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
raise NotImplementedError( "abstract method: use format_option_strings_short_first or " "format_option_strings_long_first instead.") def format_option_strings_short_first (self, option): opts = [] takes_value = option.takes_value() if takes_value:
if option.takes_value():
def format_option_strings (self, option): """Return a comma-separated list of option strings & metavariables.""" raise NotImplementedError( "abstract method: use format_option_strings_short_first or " "format_option_strings_long_first instead.")
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
for sopt in option._short_opts: opts.append(sopt + metavar) for lopt in option._long_opts: opts.append(lopt + "=" + metavar) else: for opt in option._short_opts + option._long_opts: opts.append(opt)
short_opts = [sopt + metavar for sopt in option._short_opts] long_opts = [lopt + "=" + metavar for lopt in option._long_opts] else: short_opts = option._short_opts long_opts = option._long_opts if self.short_first: opts = short_opts + long_opts else: opts = long_opts + short_opts
def format_option_strings_short_first (self, option): opts = [] # list of "-a" or "--foo=FILE" strings takes_value = option.takes_value() if takes_value: metavar = option.metavar or option.dest.upper() for sopt in option._short_opts: opts.append(sopt + metavar) for lopt in option._long_opts: opts....
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
def format_option_strings_long_first (self, option): opts = [] takes_value = option.takes_value() if takes_value: metavar = option.metavar or option.dest.upper() for lopt in option._long_opts: opts.append(lopt + "=" + metavar) for sopt in option._short_opts: opts.append(sopt + metavar) else: for opt in option._long_op...
def format_option_strings_short_first (self, option): opts = [] # list of "-a" or "--foo=FILE" strings takes_value = option.takes_value() if takes_value: metavar = option.metavar or option.dest.upper() for sopt in option._short_opts: opts.append(sopt + metavar) for lopt in option._long_opts: opts....
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
self._short_opts = [] self._long_opts = []
def __init__ (self, *opts, **attrs): # Set _short_opts, _long_opts attrs from 'opts' tuple opts = self._check_opt_strings(opts) self._set_opt_strings(opts)
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
raise OptionError("at least one option string must be supplied", self)
raise TypeError("at least one option string must be supplied")
def _check_opt_strings (self, opts): # Filter out None because early versions of Optik had exactly # one short option and one long option, either of which # could be None. opts = filter(None, opts) if not opts: raise OptionError("at least one option string must be supplied", self) return opts
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
self._short_opts = [] self._long_opts = []
def _set_opt_strings (self, opts): self._short_opts = [] self._long_opts = [] for opt in opts: if len(opt) < 2: raise OptionError( "invalid option string %r: " "must be at least two characters long" % opt, self) elif len(opt) == 2: if not (opt[0] == "-" and opt[1] != "-"): raise OptionError( "invalid short option strin...
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
if self._short_opts or self._long_opts: return "/".join(self._short_opts + self._long_opts) else: raise RuntimeError, "short_opts and long_opts both empty!"
return "/".join(self._short_opts + self._long_opts)
def __str__ (self): if self._short_opts or self._long_opts: return "/".join(self._short_opts + self._long_opts) else: raise RuntimeError, "short_opts and long_opts both empty!"
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
setattr(values, dest, 1)
setattr(values, dest, True)
def take_action (self, action, dest, opt, value, values, parser): if action == "store": setattr(values, dest, value) elif action == "store_const": setattr(values, dest, self.const) elif action == "store_true": setattr(values, dest, 1) elif action == "store_false": setattr(values, dest, 0) elif action == "append": value...
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
setattr(values, dest, 0)
setattr(values, dest, False)
def take_action (self, action, dest, opt, value, values, parser): if action == "store": setattr(values, dest, value) elif action == "store_const": setattr(values, dest, self.const) elif action == "store_true": setattr(values, dest, 1) elif action == "store_false": setattr(values, dest, 0) elif action == "append": value...
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
your program (os.path.basename(sys.argv[0])).
your program (self.prog or os.path.basename(sys.argv[0])). prog : string the name of the current program (to override os.path.basename(sys.argv[0])).
def format_help (self, formatter): result = formatter.format_heading(self.title) formatter.indent() result += OptionContainer.format_help(self, formatter) formatter.dedent() return result
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
add_help_option=1):
add_help_option=1, prog=None):
def __init__ (self, usage=None, option_list=None, option_class=Option, version=None, conflict_handler="error", description=None, formatter=None, add_help_option=1): OptionContainer.__init__( self, option_class, conflict_handler, description) self.set_usage(usage) self.version = version self.allow_interspersed_args = 1 ...
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
lines = linecache.getlines(file, getmodule(object).__dict__)
module = getmodule(object) if module: lines = linecache.getlines(file, module.__dict__) else: lines = linecache.getlines(file)
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
208badda275a7aaf722a8db87297637e161fa7aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/208badda275a7aaf722a8db87297637e161fa7aa/inspect.py
moddir = os.path.join(os.getcwd(), 'Modules', srcdir)
moddir = os.path.join(os.getcwd(), srcdir, 'Modules')
def build_extensions(self):
726b78ecb8660278399abaf36f98dec56ecf1271 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/726b78ecb8660278399abaf36f98dec56ecf1271/setup.py
log.warn(("warngin: no files found matching '%s' " +
log.warn(("warning: no files found matching '%s' " +
def process_template_line (self, line):
cbd0b365c1f27d390827e74a88a96f3a13034e0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cbd0b365c1f27d390827e74a88a96f3a13034e0e/filelist.py
print msg % args
if not args: print msg else: print msg % args
def _log(self, level, msg, args): if level >= self.threshold: print msg % args sys.stdout.flush()
1c5a59f80a614df368cb7f545112862b2e7e1d5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1c5a59f80a614df368cb7f545112862b2e7e1d5e/log.py
fp = MyURLopener().open(url).fp
fp = urllib2.urlopen(url).fp
def appendURL(self, url, included=0): """Append packages from the database with the given URL. Only the first database should specify included=0, so the global information (maintainer, description) get stored.""" if url in self._urllist: return self._urllist.append(url) fp = MyURLopener().open(url).fp dict = plistlib....
47e5987256e6faf99bc8e474fd8351aa39808785 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/47e5987256e6faf99bc8e474fd8351aa39808785/pimp.py
def _help(): print "Usage: pimp [-v] -s [package ...] List installed status" print " pimp [-v] -l [package ...] Show package information" print " pimp [-vf] -i package ... Install packages" print " pimp -d Dump database to stdout" print "Options:" print " -v Verbose" pri...
47e5987256e6faf99bc8e474fd8351aa39808785 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/47e5987256e6faf99bc8e474fd8351aa39808785/pimp.py
def __init__(self, verbose=0): self.verbose = verbose self.reset()
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py
def reset(self): self.rawdata = '' self.stack = [] self.lasttag = '???' self.nomoretags = 0 self.literal = 0
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py
def setnomoretags(self): self.nomoretags = self.literal = 1
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py
def setliteral(self, *args): self.literal = 1
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py
def feed(self, data): self.rawdata = self.rawdata + data self.goahead(0)
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py
def report_unbalanced(self, tag): if self.verbose: print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
08f8dd6d0caead7891d1a70f956409a88d0ed5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08f8dd6d0caead7891d1a70f956409a88d0ed5a6/sgmllib.py