rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
"Handle an unparsed entity declaration event."
"Handle an unparsed entity declaration event."
def unparsedEntityDecl(self, name, publicId, systemId, ndata):
84da8aa7e2f1bdaf8692dbfd9981430c84278038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84da8aa7e2f1bdaf8692dbfd9981430c84278038/handler.py
"""Resolve the system identifier of an entity and return either
"""Resolve the system identifier of an entity and return either
def resolveEntity(self, publicId, systemId):
84da8aa7e2f1bdaf8692dbfd9981430c84278038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84da8aa7e2f1bdaf8692dbfd9981430c84278038/handler.py
return systemId
return systemId
def resolveEntity(self, publicId, systemId):
84da8aa7e2f1bdaf8692dbfd9981430c84278038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84da8aa7e2f1bdaf8692dbfd9981430c84278038/handler.py
extern int _QdRGB_Convert(PyObject *, RGBColorPtr *);
extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
#ifdef USE_TOOLBOX_OBJECT_GLUE
0c995756b3ec0968fddd7352e81742549827a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0c995756b3ec0968fddd7352e81742549827a87f/qdsupport.py
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColorPtr, QdRGB_Convert);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
#ifdef USE_TOOLBOX_OBJECT_GLUE
0c995756b3ec0968fddd7352e81742549827a87f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0c995756b3ec0968fddd7352e81742549827a87f/qdsupport.py
sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName)
sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found\n" % defaultMapName)
def checkextensions(unknown, extra_inis, prefix): # Create a table of frozen extensions defaultMapName = os.path.join( os.path.split(sys.argv[0])[0], "extensions_win32.ini") if not os.path.isfile(defaultMapName): sys.stderr.write("WARNING: %s can not be found - standard extensions may not be found" % mapFileName) else: # must go on end, so other inis can override. extra_inis.append(defaultMapName) ret = [] for mod in unknown: for ini in extra_inis:
8f81c93b8c1b5aecf94a89c22d9f74eeb228a277 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8f81c93b8c1b5aecf94a89c22d9f74eeb228a277/checkextensions_win32.py
return swi.swi('OS_File', '5s;i', p)!=0
try: return swi.swi('OS_File', '5s;i', p)!=0 except swi.error: return 0
def exists(p): """
bceccf5f43b51d166951ea97cff086c8828b745b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bceccf5f43b51d166951ea97cff086c8828b745b/riscospath.py
return swi.swi('OS_File', '5s;i', p) in [2, 3]
try: return swi.swi('OS_File', '5s;i', p) in [2, 3] except swi.error: return 0
def isdir(p): """
bceccf5f43b51d166951ea97cff086c8828b745b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bceccf5f43b51d166951ea97cff086c8828b745b/riscospath.py
return swi.swi('OS_File', '5s;i', p) in [1, 3]
try: return swi.swi('OS_File', '5s;i', p) in [1, 3] except swi.error: return 0
def isfile(p): """
bceccf5f43b51d166951ea97cff086c8828b745b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bceccf5f43b51d166951ea97cff086c8828b745b/riscospath.py
if sys.platform in ['unixware7']: testit('atan2(0, 1)', math.atan2(0, 1), math.pi) else: testit('atan2(0, 1)', math.atan2(0, 1), 0)
testit('atan2(0, 1)', math.atan2(0, 1), 0)
def testit(name, value, expected): if abs(value-expected) > eps: raise TestFailed, '%s returned %f, expected %f'%\ (name, value, expected)
4642cb9ac9636dec1e939a75f5da3fc263b51326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4642cb9ac9636dec1e939a75f5da3fc263b51326/test_math.py
_wordchars_re = re.compile(r'[^\\\'\"\ ]*')
_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
def grok_environment_error (exc, prefix="error: "): """Generate a useful error message from an EnvironmentError (IOError or OSError) exception object. Handles Python 1.5.1 and 1.5.2 styles, and does what it can to deal with exception objects that don't have a filename (which happens when the error is due to a two-file operation, such as 'rename()' or 'link()'. Returns the error message as a string prefixed with 'prefix'. """ # check for Python 1.5.2-style {IO,OS}Error exception objects if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): if exc.filename: error = prefix + "%s: %s" % (exc.filename, exc.strerror) else: # two-argument functions in posix module don't # include the filename in the exception object! error = prefix + "%s" % exc.strerror else: error = prefix + str(exc[-1]) return error
2b042ded19bc7efa43551da297c29dc142b7d73c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2b042ded19bc7efa43551da297c29dc142b7d73c/util.py
if s[end] == ' ':
if s[end] in string.whitespace:
def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character escape sequence, leaving only the escaped character. The quote characters are stripped from any quoted string. Returns a list of words. """ # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... s = string.strip(s) words = [] pos = 0 while s: m = _wordchars_re.match(s, pos) end = m.end() if end == len(s): words.append(s[:end]) break if s[end] == ' ': # unescaped, unquoted space: now words.append(s[:end]) # we definitely have a word delimiter s = string.lstrip(s[end:]) pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; # will become part of the current word s = s[:end] + s[end+1:] pos = end+1 else: if s[end] == "'": # slurp singly-quoted string m = _squote_re.match(s, end) elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: raise RuntimeError, \ "this can't happen (bad char '%c')" % s[end] if m is None: raise ValueError, \ "bad string (mismatched %s quotes?)" % s[end] (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] pos = m.end() - 2 if pos >= len(s): words.append(s) break return words
2b042ded19bc7efa43551da297c29dc142b7d73c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2b042ded19bc7efa43551da297c29dc142b7d73c/util.py
data = convert_path(f[1])
data = convert_path(data)
def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: self.warn("setup script did not provide a directory for " "'%s' -- installing right in '%s'" % (f, self.install_dir)) (out, _) = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: # it's a tuple with path to install to and a list of files dir = convert_path(f[0]) if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self.root: dir = change_root(self.root, dir) self.mkpath(dir) for data in f[1]: data = convert_path(f[1]) (out, _) = self.copy_file(data, dir) self.outfiles.append(out)
1b26b6a5f16636c58296b852d7adaa10a44640f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b26b6a5f16636c58296b852d7adaa10a44640f7/install_data.py
x = property(getx, setx, delx)
x = property(getx, setx, delx, doc="I'm the x property.")
def delx(self): del self.__x
66c1a525e08fda439ddda3b6371236df1398cfd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66c1a525e08fda439ddda3b6371236df1398cfd5/test_descr.py
def __eq__(self, other): try: return abs(self - other) <= 1e-6 except: return NotImplemented
66c1a525e08fda439ddda3b6371236df1398cfd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66c1a525e08fda439ddda3b6371236df1398cfd5/test_descr.py
content = open(filename).read()
content = open(filename,'rb').read()
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run)
5cb784629f4d05a2621db28e6c2a07e6f38095c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5cb784629f4d05a2621db28e6c2a07e6f38095c9/upload.py
if item > self.len-1 or item < -self.len: raise IndexError if item < 0: item += self.len return strftime(self.format, (item,)*9).capitalize()
if isinstance(item, int): if item < 0: item += self.len if not 0 <= item < self.len: raise IndexError, "out of range" return strftime(self.format, (item,)*9).capitalize() elif isinstance(item, type(slice(0))): return [self[e] for e in range(self.len)].__getslice__(item.start, item.stop)
def __getitem__(self, item): if item > self.len-1 or item < -self.len: raise IndexError if item < 0: item += self.len return strftime(self.format, (item,)*9).capitalize()
1b9c177c5de0cf0d2d506748209dc840b0eb48d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b9c177c5de0cf0d2d506748209dc840b0eb48d9/calendar.py
month_name = _localized_name('%B', 12) month_abbr = _localized_name('%b', 12)
month_name = _localized_name('%B', 13) month_abbr = _localized_name('%b', 13)
def __len__(self): return self.len
1b9c177c5de0cf0d2d506748209dc840b0eb48d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b9c177c5de0cf0d2d506748209dc840b0eb48d9/calendar.py
raise ValueError, "Mode " + mode + " not supported"
raise IOError, "Mode " + mode + " not supported"
def __init__(self, filename=None, mode=None, compresslevel=9, fileobj=None): if fileobj is None: fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') if filename is None: if hasattr(fileobj, 'name'): filename = fileobj.name else: filename = '' if mode is None: if hasattr(fileobj, 'mode'): mode = fileobj.mode else: mode = 'rb'
db044899539e3ae047dcab87229013b8abb11a1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/db044899539e3ae047dcab87229013b8abb11a1f/gzip.py
a method of the same name to preform each SMTP comand, and there is a method called 'sendmail' that will do an entiere mail
a method of the same name to perform each SMTP command, and there is a method called 'sendmail' that will do an entire mail
def quotedata(data): """Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line.""" return re.sub(r'(?m)^\.', '..', re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
If the hostname ends with a colon (`:') followed by a number, and there is no port specified, that suffix will be stripped off and the number interpreted as the port number to use.
If the hostname ends with a colon (`:') followed by a number, and there is no port specified, that suffix will be stripped off and the number interpreted as the port number to use.
def connect(self, host='localhost', port = 0): """Connect to a host on a given port.
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'help' command. Returns help text from server """
"""SMTP 'help' command. Returns help text from server."""
def help(self, args=''): """ SMTP 'help' command. Returns help text from server """ self.putcmd("help", args) (code,msg)=self.getreply() return msg
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'rset' command. Resets session. """
"""SMTP 'rset' command. Resets session."""
def rset(self): """ SMTP 'rset' command. Resets session. """ code=self.docmd("rset") return code
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'noop' command. Doesn't do anything :> """
"""SMTP 'noop' command. Doesn't do anything :>"""
def noop(self): """ SMTP 'noop' command. Doesn't do anything :> """ code=self.docmd("noop") return code
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'mail' command. Begins mail xfer session. """
"""SMTP 'mail' command. Begins mail xfer session."""
def mail(self,sender,options=[]): """ SMTP 'mail' command. Begins mail xfer session. """ optionlist = '' if options and self.does_esmtp: optionlist = string.join(options, ' ') self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist)) return self.getreply()
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'rcpt' command. Indicates 1 recipient for this mail. """
"""SMTP 'rcpt' command. Indicates 1 recipient for this mail."""
def rcpt(self,recip,options=[]): """ SMTP 'rcpt' command. Indicates 1 recipient for this mail. """ optionlist = '' if options and self.does_esmtp: optionlist = string.join(options, ' ') self.putcmd("rcpt","TO:%s %s" % (quoteaddr(recip),optionlist)) return self.getreply()
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821. """
"""SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821. """
def data(self,msg): """ SMTP 'DATA' command. Sends message data to server. Automatically quotes lines beginning with a period per rfc821. """ self.putcmd("data") (code,repl)=self.getreply() if self.debuglevel >0 : print "data:", (code,repl) if code <> 354: return -1 else: self.send(quotedata(msg)) self.send("%s.%s" % (CRLF, CRLF)) (code,msg)=self.getreply() if self.debuglevel >0 : print "data:", (code,msg) return code
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
def vrfy(self, address): return self.verify(address)
def vrfy(self, address): return self.verify(address)
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'verify' command. Checks for address validity. """
"""SMTP 'verify' command. Checks for address validity."""
def verify(self, address): """ SMTP 'verify' command. Checks for address validity. """ self.putcmd("vrfy", quoteaddr(address)) return self.getreply()
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" SMTP 'verify' command. Checks for address validity. """
"""SMTP 'verify' command. Checks for address validity."""
def expn(self, address): """ SMTP 'verify' command. Checks for address validity. """ self.putcmd("expn", quoteaddr(address)) return self.getreply()
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
def expn(self, address): """ SMTP 'verify' command. Checks for address validity. """ self.putcmd("expn", quoteaddr(address)) return self.getreply()
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
""" This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to (a string will be treated as a list with 1 address) - msg : the message to send. - mail_options : list of ESMTP options (such as 8bitmime) for the mail command - rcpt_options : List of ESMTP options (such as DSN commands) for all the rcpt commands If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. If the server does ESMTP, message size and each of the specified options will be passed to it. If EHLO fails, HELO will be tried and ESMTP options suppressed. This method will return normally if the mail is accepted for at least one recipient. Otherwise it will throw an exception (either SMTPSenderRefused, SMTPRecipientsRefused, or SMTPDataError) That is, if this method does not throw an exception, then someone should get your mail. If this method does not throw an exception, it returns a dictionary, with one entry for each recipient that was refused.
"""This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : A list of addresses to send this mail to. A bare string will be treated as a list with 1 address. - msg : The message to send. - mail_options : List of ESMTP options (such as 8bitmime) for the mail command. - rcpt_options : List of ESMTP options (such as DSN commands) for all the rcpt commands. If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. If the server does ESMTP, message size and each of the specified options will be passed to it. If EHLO fails, HELO will be tried and ESMTP options suppressed. This method will return normally if the mail is accepted for at least one recipient. Otherwise it will throw an exception (either SMTPSenderRefused, SMTPRecipientsRefused, or SMTPDataError) That is, if this method does not throw an exception, then someone should get your mail. If this method does not throw an exception, it returns a dictionary, with one entry for each recipient that was refused.
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to (a string will be treated as a list with 1 address) - msg : the message to send. - mail_options : list of ESMTP options (such as 8bitmime) for the mail command - rcpt_options : List of ESMTP options (such as DSN commands) for all the rcpt commands If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. If the server does ESMTP, message size and each of the specified options will be passed to it. If EHLO fails, HELO will be tried and ESMTP options suppressed.
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. """
In the above example, the message was accepted for delivery to three of the four addresses, and one was rejected, with the error code 550. If all addresses are accepted, then the method will return an empty dictionary. """
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to (a string will be treated as a list with 1 address) - msg : the message to send. - mail_options : list of ESMTP options (such as 8bitmime) for the mail command - rcpt_options : List of ESMTP options (such as DSN commands) for all the rcpt commands If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. If the server does ESMTP, message size and each of the specified options will be passed to it. If EHLO fails, HELO will be tried and ESMTP options suppressed.
4c4bec86f494ba7da358b06d1f352059385037e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4c4bec86f494ba7da358b06d1f352059385037e0/smtplib.py
"""Base class for client errors."""
def _stringify(string): return string
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""Indicates an HTTP protocol error."""
def _stringify(string): return string
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""Indicates a broken response package"""
def __repr__(self): return ( "<ProtocolError for %s: %s %s>" % (self.url, self.errcode, self.errmsg) )
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""indicates a XML-RPC fault package"""
def __repr__(self): return ( "<ProtocolError for %s: %s %s>" % (self.url, self.errcode, self.errmsg) )
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
def __repr__(self): return ( "<Fault %s: %s>" % (self.faultCode, repr(self.faultString)) )
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""Convert any Python value to XML-RPC boolean."""
def boolean(value, truefalse=(False, True)): # convert any Python value to XML-RPC boolean return truefalse[operator.truth(value)]
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
def datetime(data): value = DateTime() value.decode(data) return value
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""XML parser using xmllib.XMLParser. This is about 10 times slower than sgmlop on roundtrip testing. """
def close(self): self._parser.Parse("", 1) # end of data del self._target, self._parser # get rid of circular references
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""Generate an XML-RPC params chunk from a Python data structure"""
"""Generate an XML-RPC params chunk from a Python data structure. Create a marshaller instance for each set of parameters, and use "dumps" method to convert your data (represented as a tuple) to a XML-RPC params chunk. to write a fault response, pass a Fault instance instead. You may prefer to use the "dumps" convenience function for this purpose (see below). """
def __init__(self, target): self.handle_xml = target.xml self.unknown_starttag = target.start self.handle_data = target.data self.unknown_endtag = target.end xmllib.XMLParser.__init__(self)
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
"""Unmarshal an XML-RPC response, based on incoming XML event messages (start, data, end). Call close() to get the resulting data structure. Note that this reader is fairly tolerant, and gladly accepts bogus XML-RPC data without complaining (but not bogus XML). """
def dump_instance(self, value): # check for special wrappers if value.__class__ in WRAPPERS: value.encode(self) else: # store instance attributes as a struct (really?) self.dump_struct(value.__dict__)
1b41079fd9408951fbf2d740a598090a5b6bb015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b41079fd9408951fbf2d740a598090a5b6bb015/xmlrpclib.py
('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('(%Z)', '(%s)' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
7944ea523ed1da2cfa99c922509caa07114b4096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7944ea523ed1da2cfa99c922509caa07114b4096/test_strftime.py
('(%Z)', '(%s)' % tz, 'time zone name'),
('%Z', '%s' % tz, 'time zone name'),
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('(%Z)', '(%s)' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
7944ea523ed1da2cfa99c922509caa07114b4096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7944ea523ed1da2cfa99c922509caa07114b4096/test_strftime.py
if result == e[1]: continue
if re.match(e[1], result): continue
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('(%Z)', '(%s)' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
7944ea523ed1da2cfa99c922509caa07114b4096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7944ea523ed1da2cfa99c922509caa07114b4096/test_strftime.py
if result == e[1]:
if re.match(e[1], result):
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('(%Z)', '(%s)' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
7944ea523ed1da2cfa99c922509caa07114b4096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7944ea523ed1da2cfa99c922509caa07114b4096/test_strftime.py
if hasattr(sys, "gettotalrefcount"):
if hasattr(set, "test_c_api"):
def test_weakref(self): s = self.thetype('gallahad') p = proxy(s) self.assertEqual(str(p), str(s)) s = None self.assertRaises(ReferenceError, str, p)
176014ffad8d39820293b63bf7177a7d2953343a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/176014ffad8d39820293b63bf7177a7d2953343a/test_set.py
'nooutput',
>>> def f(x):
3a3817f506801e4a1e62d8cd52e1c8aa0feb2993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a3817f506801e4a1e62d8cd52e1c8aa0feb2993/doctest.py
runner.run(self._dt_test, out=nooutput)
runner.run(self._dt_test)
def debug(self): r"""Run the test case without results and without catching exceptions
3a3817f506801e4a1e62d8cd52e1c8aa0feb2993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a3817f506801e4a1e62d8cd52e1c8aa0feb2993/doctest.py
def nooutput(*args): pass
def shortDescription(self): return "Doctest: " + self._dt_test.name
3a3817f506801e4a1e62d8cd52e1c8aa0feb2993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a3817f506801e4a1e62d8cd52e1c8aa0feb2993/doctest.py
elif type(signature) == StringType and len(signature) != 4:
elif type(signature) == StringType and len(signature) == 4:
def __init__(self, signature): """Create a communication channel with a particular application. Addressing the application is done by specifying either a 4-byte signature, an AEDesc or an object that will __aepack__ to an AEDesc. """ if type(signature) == AEDescType: self.target = signature elif type(signature) == InstanceType and hasattr(signature, '__aepack__'): self.target = signature.__aepack__() elif type(signature) == StringType and len(signature) != 4: self.target = AE.AECreateDesc(AppleEvents.typeApplSignature, signature) else: raise TypeError, "signature should be 4-char string or AEDesc" self.send_flags = AppleEvents.kAEWaitReply self.send_priority = AppleEvents.kAENormalPriority self.send_timeout = AppleEvents.kAEDefaultTimeout
7874b5d88cdf22154ac29927d9e747fecc1f0b2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7874b5d88cdf22154ac29927d9e747fecc1f0b2d/aetools.py
def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__("".join(L)) return self._rev
78e0fc74bce026ddf67d029030a90c9b8faffcb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/78e0fc74bce026ddf67d029030a90c9b8faffcb5/test_descr.py
verify(unicode(u).__class__ is unicode)
def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__(u"".join(L)) return self._rev
78e0fc74bce026ddf67d029030a90c9b8faffcb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/78e0fc74bce026ddf67d029030a90c9b8faffcb5/test_descr.py
self.passiveserver = 0
def connect(self, host = '', port = 0): '''Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port)''' if host: self.host = host if port: self.port = port self.passiveserver = 0 msg = "getaddrinfo returns an empty list" for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: self.sock = socket.socket(af, socktype, proto) self.sock.connect(sa) except socket.error, msg: if self.sock: self.sock.close() self.sock = None continue break if not self.sock: raise socket.error, msg self.af = af self.file = self.sock.makefile('rb') self.welcome = self.getresp() return self.welcome
2826fade49f0bc8770a6a5e89f9ca94b7264a677 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2826fade49f0bc8770a6a5e89f9ca94b7264a677/ftplib.py
parent and parent.__path__)
parent and parent.__path__, parent)
def import_module(self, partname, fqname, parent): self.msgin(3, "import_module", partname, fqname, parent) try: m = self.modules[fqname] except KeyError: pass else: self.msgout(3, "import_module ->", m) return m if self.badmodules.has_key(fqname): self.msgout(3, "import_module -> None") return None try: fp, pathname, stuff = self.find_module(partname, parent and parent.__path__) except ImportError: self.msgout(3, "import_module ->", None) return None try: m = self.load_module(fqname, fp, pathname, stuff) finally: if fp: fp.close() if parent: setattr(parent, partname, m) self.msgout(3, "import_module ->", m) return m
f0dfbaf4ef5fd4865d323666e9584ef7e76f9663 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f0dfbaf4ef5fd4865d323666e9584ef7e76f9663/modulefinder.py
def find_module(self, name, path): if path: fullname = '.'.join(path)+'.'+name
def find_module(self, name, path, parent=None): if parent is not None: fullname = parent.__name__+'.'+name
def find_module(self, name, path): if path: fullname = '.'.join(path)+'.'+name else: fullname = name if fullname in self.excludes: self.msgout(3, "find_module -> Excluded", fullname) raise ImportError, name
f0dfbaf4ef5fd4865d323666e9584ef7e76f9663 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f0dfbaf4ef5fd4865d323666e9584ef7e76f9663/modulefinder.py
if not os.isatty(slave_fd) and sys.platform not in fickle_isatty:
if not os.isatty(slave_fd):
def test_basic_pty(): try: debug("Calling master_open()") master_fd, slave_name = pty.master_open() debug("Got master_fd '%d', slave_name '%s'"%(master_fd, slave_name)) debug("Calling slave_open(%r)"%(slave_name,)) slave_fd = pty.slave_open(slave_name) debug("Got slave_fd '%d'"%slave_fd) except OSError: # " An optional feature could not be imported " ... ? raise TestSkipped, "Pseudo-terminals (seemingly) not functional." if not os.isatty(slave_fd) and sys.platform not in fickle_isatty: raise TestFailed, "slave_fd is not a tty" debug("Writing to slave_fd") os.write(slave_fd, TEST_STRING_1) s1 = os.read(master_fd, 1024) sys.stdout.write(normalize_output(s1)) debug("Writing chunked output") os.write(slave_fd, TEST_STRING_2[:5]) os.write(slave_fd, TEST_STRING_2[5:]) s2 = os.read(master_fd, 1024) sys.stdout.write(normalize_output(s2)) os.close(slave_fd) os.close(master_fd)
6dbff33be848ed875f3769be6b866438b099aa3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6dbff33be848ed875f3769be6b866438b099aa3a/test_pty.py
def classlink(self, object, modname, *dicts):
def classlink(self, object, modname):
def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name)
if sys.modules.has_key(object.__module__) and \ getattr(sys.modules[object.__module__], object.__name__) is object: return '<a href="%s.html object.__module__, object.__name__, name)
def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
def formattree(self, tree, modname, classes={}, parent=None):
def formattree(self, tree, modname, parent=None):
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
result = result + self.classlink(c, modname, classes)
result = result + self.classlink(c, modname)
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
parents.append(self.classlink(base, modname, classes))
parents.append(self.classlink(base, modname))
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
entry, modname, classes, c)
entry, modname, c)
def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
contents = [self.formattree( inspect.getclasstree(classlist, 1), name, cdict)]
contents = [ self.formattree(inspect.getclasstree(classlist, 1), name)]
def docmodule(self, object, name=None, mod=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink)
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
parents.append( self.classlink(base, object.__module__, classes))
parents.append(self.classlink(base, object.__module__))
def docclass(self, object, name=None, mod=None, funcs={}, classes={}): """Produce HTML documentation for a class object.""" realname = object.__name__ name = name or realname bases = object.__bases__ contents = ''
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
url = '%s.html imclass.__module__, imclass.__name__, name) note = ' from <a href="%s">%s</a>' % ( url, classname(imclass, mod))
note = ' from ' + self.classlink(imclass, mod)
def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: url = '%s.html#%s-%s' % ( imclass.__module__, imclass.__name__, name) note = ' from <a href="%s">%s</a>' % ( url, classname(imclass, mod)) skipdocs = 1 else: inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) object = object.im_func
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod))
if object.im_self: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: note = ' unbound %s method' % self.classlink(imclass,mod)
def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: url = '%s.html#%s-%s' % ( imclass.__module__, imclass.__name__, name) note = ' from <a href="%s">%s</a>' % ( url, classname(imclass, mod)) skipdocs = 1 else: inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) object = object.im_func
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod))
if object.im_self: note = ' method of %s instance' % classname( object.im_self.__class__, mod) else: note = ' unbound %s method' % classname(imclass,mod)
def docroutine(self, object, name=None, mod=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + classname(imclass, mod) skipdocs = 1 else: inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod)) object = object.im_func
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
def __init__(self, screenName=None, baseName=None, className='Tk'):
def __init__(self, screenName=None, baseName=None, className='Tix'):
def __init__(self, screenName=None, baseName=None, className='Tk'): Tkinter.Tk.__init__(self, screenName, baseName, className) tixlib = os.environ.get('TIX_LIBRARY') if tixlib is not None: self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib) self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib) # Load Tix - this should work dynamically or statically # If it's static, lib/tix8.1/pkgIndex.tcl should have 'load {} Tix' # If it's dynamic, it should have 'load libtix8.1.8.2.so Tix' self.tk.eval('package require Tix')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def __init__(self, screenName=None, baseName=None, className='Tk'): Tkinter.Tk.__init__(self, screenName, baseName, className) tixlib = os.environ.get('TIX_LIBRARY') if tixlib is not None: self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib) self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib) # Load Tix - this should work dynamically or statically # If it's static, lib/tix8.1/pkgIndex.tcl should have 'load {} Tix' # If it's dynamic, it should have 'load libtix8.1.8.2.so Tix' self.tk.eval('package require Tix')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
class TixWidget(Widget):
class TixWidget(Tkinter.Widget):
def slaves(self): return map(self._nametowidget, self.tk.splitlist( self.tk.call( 'tixForm', 'slaves', self._w)))
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
1) It is possible to give a list of options which must be part of
1) It is possible to give a list of options which must be part of
def slaves(self): return map(self._nametowidget, self.tk.splitlist( self.tk.call( 'tixForm', 'slaves', self._w)))
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def __getattr__(self, name): if self.subwidget_list.has_key(name): return self.subwidget_list[name] raise AttributeError, name
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def set_silent(self, value): self.tk.call('tixSetSilent', self._w, value)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def subwidget(self, name): n = self._subwidget_name(name) if not n: raise TclError, "Subwidget " + name + " not child of " + self._name # Remove header of name and leading dot n = n[len(self._w)+1:] return self._nametowidget(n)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def subwidgets_all(self): names = self._subwidget_names() if not names: return [] retlist = [] for name in names: name = name[len(self._w)+1:] try: retlist.append(self._nametowidget(name)) except: # some of the widgets are unknown e.g. border in LabelFrame pass return retlist
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def _subwidget_name(self,name): try: return self.tk.call(self._w, 'subwidget', name) except TclError: return None
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
def _subwidget_names(self): try: x = self.tk.call(self._w, 'subwidgets', '-all') return self.tk.split(x) except TclError: return None
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ButtonBox - A container for pushbuttons"""
"""ButtonBox - A container for pushbuttons. Subwidgets are the buttons added with the add method. """
def unbind_widget(self, widget): self.tk.call(self._w, 'unbind', widget._w)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ComboBox - an Entry field with a dropdown menu
"""ComboBox - an Entry field with a dropdown menu. The user can select a choice by either typing in the entry subwdget or selecting from the listbox subwidget.
def invoke(self, name): if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
slistbox ScrolledListBox tick Button } cross Button } present if created with the fancy option"""
slistbox ScrolledListBox tick Button cross Button : present if created with the fancy option"""
def invoke(self, name): if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""Control - An entry field with value change arrows.
"""Control - An entry field with value change arrows. The user can adjust the value by pressing the two arrow buttons or by entering the value directly into the entry. The new value will be checked against the user-defined upper and lower limits.
def pick(self, index): self.tk.call(self._w, 'pick', index)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""DirList - Directory Listing.
"""DirList - displays a list view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory.
def update(self): self.tk.call(self._w, 'update')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""DirList - Directory Listing in a hierarchical view.
"""DirTree - Directory Listing in a hierarchical view. Displays a tree view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory.
def chdir(self, dir): self.tk.call(self._w, 'chdir', dir)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
It is generally used for the user to choose a file. FileSelectBox stores the files mostly recently selected into a ComboBox widget so that they can be quickly selected again.
def popdown(self): self.tk.call(self._w, 'popdown')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""FileEntry - Entry field with button that invokes a FileSelectDialog
"""FileEntry - Entry field with button that invokes a FileSelectDialog. The user can type in the filename manually. Alternatively, the user can press the button widget that sits next to the entry, which will bring up a file selection dialog.
def popdown(self): self.tk.call(self._w, 'popdown')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""HList - Hierarchy display.
"""HList - Hierarchy display widget can be used to display any data that have a hierarchical structure, for example, file system directory trees. The list entries are indented and connected by branch lines according to their places in the hierachy.
def file_dialog(self): # XXX return python object pass
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""LabelEntry - Entry field with label.
"""LabelEntry - Entry field with label. Packages an entry widget and a label into one mega widget. It can beused be used to simplify the creation of ``entry-form'' type of interface.
def __init__ (self,master=None,cnf={}, **kw): TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""LabelFrame - Labelled Frame container.
"""LabelFrame - Labelled Frame container. Packages a frame widget and a label into one mega widget. To create widgets inside a LabelFrame widget, one creates the new widgets relative to the frame subwidget and manage them inside the frame subwidget.
def __init__ (self,master=None,cnf={}, **kw): TixWidget.__init__(self, master, 'tixLabelEntry', ['labelside','options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
<pages> g/p widgets added dynamically"""
<pages> page widgets added dynamically with the add method"""
def __init__ (self,master=None,cnf={}, **kw): TixWidget.__init__(self, master, 'tixLabelFrame', ['labelside','options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['frame'] = _dummyFrame(self, 'frame')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""OptionMenu - Option menu widget.
"""OptionMenu - creates a menu button of options.
def raised(self): return self.tk.call(self._w, 'raised')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""PanedWindow - Multi-pane container widget. Panes are resizable.
"""PanedWindow - Multi-pane container widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.The user changes the sizes of the panes by dragging the resize handle between two panes.
def enable(self, name): self.tk.call(self._w, 'enable', name)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
<panes> g/p widgets added dynamically"""
<panes> g/p widgets added dynamically with the add method."""
def enable(self, name): self.tk.call(self._w, 'enable', name)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""PopupMenu widget.
"""PopupMenu widget can be used as a replacement of the tk_popup command. The advantage of the Tix PopupMenu widget is it requires less application code to manipulate.
def panes(self): names = self.tk.call(self._w, 'panes') ret = [] for x in names: ret.append(self.subwidget(x)) return ret
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""Incomplete - no documentation in Tix for this !!!"""
"""Internal widget to draw resize handles on Scrolled widgets."""
def post_widget(self, widget, x, y): self.tk.call(self._w, 'post', widget._w, x, y)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ScrolledHList - HList with scrollbars."""
"""ScrolledHList - HList with automatic scrollbars."""
def attach_widget(self, widget): self.tk.call(self._w, 'attachwidget', widget._w)
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ScrolledListBox - Listbox with scrollbars."""
"""ScrolledListBox - Listbox with automatic scrollbars."""
def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixScrolledHList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ScrolledText - Text with scrollbars."""
"""ScrolledText - Text with automatic scrollbars."""
def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw) self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
"""ScrolledTList - TList with scrollbars."""
"""ScrolledTList - TList with automatic scrollbars."""
def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw) self.subwidget_list['text'] = _dummyText(self, 'text') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py