rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
return addinfo(fp, headers)
return addinfourl(fp, headers, self.openedurl)
def open_http(self, url): import httplib if type(url) is type(""): host, selector = splithost(url) user_passwd, host = splituser(host) else: host, selector = url urltype, rest = splittype(selector) if string.lower(urltype) == 'http': realhost, rest = splithost(rest) user_passwd, realhost = splituser(realhost) if user_p...
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
return addinfo(fp, noheaders())
return addinfourl(fp, noheaders(), self.openedurl)
def open_gopher(self, url): import gopherlib host, selector = splithost(url) if not host: raise IOError, ('gopher error', 'no host given') type, selector = splitgophertype(selector) selector, query = splitquery(selector) selector = unquote(selector) if query: query = unquote(query) fp = gopherlib.send_query(selector, q...
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
if not host: return addinfo(open(url2pathname(file), 'r'), noheaders())
if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(url2pathname(file), 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(url2pathname(file), 'r'), noheaders()) raise...
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
return addinfo(open(url2pathname(file), 'r'), noheaders())
return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(url2pathname(file), 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(url2pathname(file), 'r'), noheaders()) raise...
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
return addinfo(self.ftpcache[key].retrfile(file, type), noheaders())
return addinfourl(self.ftpcache[key].retrfile(file, type), noheaders(), self.openedurl)
def open_ftp(self, url): host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = socket.gethostbyname(host) if not port: import ftplib port = ftplib.FTP_PORT path...
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
return addinfo(fp, headers)
return addinfourl(fp, headers, self.openedurl)
def http_error_default(self, url, fp, errcode, errmsg, headers): return addinfo(fp, headers)
e6ad8913e20766e3769b346450dc952f0140462c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e6ad8913e20766e3769b346450dc952f0140462c/urllib.py
import sys
def whichmodule(cls, clsname): """Figure out the module in which a class occurs. Search sys.modules for the module. Cache in classmap. Return a module name. If the class cannot be found, return __main__. """ if classmap.has_key(cls): return classmap[cls] import sys for name, module in sys.modules.items(): if name != ...
743d17e3aa77b84a57531cd74e1daba87132f807 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/743d17e3aa77b84a57531cd74e1daba87132f807/pickle.py
value = apply(klass, args)
try: value = apply(klass, args) except TypeError, err: raise TypeError, "in constructor for %s: %s" % ( klass.__name__, str(err)), sys.exc_info()[2]
def load_inst(self): k = self.marker() args = tuple(self.stack[k+1:]) del self.stack[k:] module = self.readline()[:-1] name = self.readline()[:-1] klass = self.find_class(module, name) instantiated = 0 if (not args and type(klass) is ClassType and not hasattr(klass, "__getinitargs__")): try: value = _EmptyClass() value...
743d17e3aa77b84a57531cd74e1daba87132f807 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/743d17e3aa77b84a57531cd74e1daba87132f807/pickle.py
try: path = win32api.GetFullPathName(path) except win32api.error: pass
if path: try: path = win32api.GetFullPathName(path) except win32api.error: pass else: path = os.getcwd()
def _abspath(path): if not isabs(path): path = join(os.getcwd(), path) return normpath(path)
647d2fe1451b1e7cd558771fcbae3fbdce1ffcf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/647d2fe1451b1e7cd558771fcbae3fbdce1ffcf7/ntpath.py
sf = StringIO('Content-Length: %d\n' % retrlen) headers = mimetools.Message(sf) else: headers = noheaders()
headers += "Content-Length: %d\n" % retrlen sf = StringIO(headers) headers = mimetools.Message(sf)
def ftp_open(self, req): host = req.get_host() if not host: raise IOError, ('ftp error', 'no host given') # XXX handle custom username & password try: host = socket.gethostbyname(host) except socket.error, msg: raise URLError(msg) host, port = splitport(host) if port is None: port = ftplib.FTP_PORT path, attrs = splita...
833a8d86417f4832f5e3ad742f21fe10378388bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/833a8d86417f4832f5e3ad742f21fe10378388bb/urllib2.py
ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75)
ci.append((-2.5, -3.7, 1.0)) ci.append((-1.5, -3.7, 3.0)) ci.append((1.5, -3.7, -2.5)) ci.append((2.5, -3.7, -0.75))
def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a...
b4624b94a86cf792dec99a05b13ebe7d774ee032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b4624b94a86cf792dec99a05b13ebe7d774ee032/nurbs.py
ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0)
ci.append((-2.5, -2.0, 3.0)) ci.append((-1.5, -2.0, 4.0)) ci.append((1.5, -2.0, -3.0)) ci.append((2.5, -2.0, 0.0))
def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a...
b4624b94a86cf792dec99a05b13ebe7d774ee032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b4624b94a86cf792dec99a05b13ebe7d774ee032/nurbs.py
ci.append(-2.5, 2.0, 1.0) ci.append(-1.5, 2.0, 0.0) ci.append(1.5, 2.0, -1.0) ci.append(2.5, 2.0, 2.0)
ci.append((-2.5, 2.0, 1.0)) ci.append((-1.5, 2.0, 0.0)) ci.append((1.5, 2.0, -1.0)) ci.append((2.5, 2.0, 2.0))
def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a...
b4624b94a86cf792dec99a05b13ebe7d774ee032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b4624b94a86cf792dec99a05b13ebe7d774ee032/nurbs.py
ci.append(-2.5, 2.7, 1.25) ci.append(-1.5, 2.7, 0.1) ci.append(1.5, 2.7, -0.6) ci.append(2.5, 2.7, 0.2)
ci.append((-2.5, 2.7, 1.25)) ci.append((-1.5, 2.7, 0.1)) ci.append((1.5, 2.7, -0.6)) ci.append((2.5, 2.7, 0.2))
def make_ctlpoints(): c = [] # ci = [] ci.append(-2.5, -3.7, 1.0) ci.append(-1.5, -3.7, 3.0) ci.append(1.5, -3.7, -2.5) ci.append(2.5, -3.7, -0.75) c.append(ci) # ci = [] ci.append(-2.5, -2.0, 3.0) ci.append(-1.5, -2.0, 4.0) ci.append(1.5, -2.0, -3.0) ci.append(2.5, -2.0, 0.0) c.append(ci) # ci = [] ci.a...
b4624b94a86cf792dec99a05b13ebe7d774ee032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b4624b94a86cf792dec99a05b13ebe7d774ee032/nurbs.py
c.append(1.0, 0.0, 1.0) c.append(1.0, 1.0, 1.0) c.append(0.0, 2.0, 2.0) c.append(-1.0, 1.0, 1.0) c.append(-1.0, 0.0, 1.0) c.append(-1.0, -1.0, 1.0) c.append(0.0, -2.0, 2.0) c.append(1.0, -1.0, 1.0) c.append(1.0, 0.0, 1.0)
c.append((1.0, 0.0, 1.0)) c.append((1.0, 1.0, 1.0)) c.append((0.0, 2.0, 2.0)) c.append((-1.0, 1.0, 1.0)) c.append((-1.0, 0.0, 1.0)) c.append((-1.0, -1.0, 1.0)) c.append((0.0, -2.0, 2.0)) c.append((1.0, -1.0, 1.0) ) c.append((1.0, 0.0, 1.0))
def make_trimpoints(): c = [] c.append(1.0, 0.0, 1.0) c.append(1.0, 1.0, 1.0) c.append(0.0, 2.0, 2.0) c.append(-1.0, 1.0, 1.0) c.append(-1.0, 0.0, 1.0) c.append(-1.0, -1.0, 1.0) c.append(0.0, -2.0, 2.0) c.append(1.0, -1.0, 1.0) c.append(1.0, 0.0, 1.0) return c
b4624b94a86cf792dec99a05b13ebe7d774ee032 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b4624b94a86cf792dec99a05b13ebe7d774ee032/nurbs.py
self.show(name, headers['title'], text, 1)
self.show(name, headers['title'], text)
def do_show(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, title, text, 1)
self.show(name, title, text)
def do_all(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, headers['title'], text, 1) print '<P><A HREF="faq.py?req=roulette">Show another one</A>'
self.show(name, headers['title'], text) print "<P>Use `Reload' to show another one."
def do_roulette(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, headers['title'], text, 1)
self.show(name, headers['title'], text)
def do_recent(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, title, text, 1)
self.show(name, title, text)
def do_query(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, title, text)
self.show(name, title, text, edit=0)
def do_edit(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, title, text)
self.show(name, title, text, edit=0)
def do_review(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
self.show(name, title, text, 1)
self.show(name, title, text)
def checkin(self):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
Title: <INPUT TYPE=text SIZE=70 NAME=title VALUE="%s"<BR>
Title: <INPUT TYPE=text SIZE=70 NAME=title VALUE="%s"><BR>
def showedit(self, name, title, text):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
<CODE>Name : </CODE><INPUT TYPE=text SIZE=70 NAME=author VALUE="%s"<BR> <CODE>Email: </CODE><INPUT TYPE=text SIZE=70 NAME=email VALUE="%s"<BR>
<CODE>Name : </CODE><INPUT TYPE=text SIZE=40 NAME=author VALUE="%s"> <BR> <CODE>Email: </CODE><INPUT TYPE=text SIZE=40 NAME=email VALUE="%s"> <BR>
def showedit(self, name, title, text):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
return headers, text f = open(name) headers = rfc822.Message(f) text = f.read() f.close()
else: f = open(name) headers = rfc822.Message(f) text = f.read() f.close() self.headers = headers
def read(self, name):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
def show(self, name, title, text, edit=0):
def show(self, name, title, text, edit=1):
def show(self, name, title, text, edit=0):
ed531fd9df252b93d75593e5977cfd49eb36ae24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed531fd9df252b93d75593e5977cfd49eb36ae24/faqmain.py
def redirect_request(self, req, fp, code, msg, headers): """Return a Request or None in response to a redirect.
828023b6b5d4d84a3fc01e9907142662a33d45a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/828023b6b5d4d84a3fc01e9907142662a33d45a6/urllib2.py
if (code in (301, 302, 303, 307) and req.method() in ("GET", "HEAD") or code in (302, 303) and req.method() == "POST"):
if "location" in headers: newurl = headers["location"] elif "uri" in headers: newurl = headers["uri"] else: return newurl = urlparse.urljoin(req.get_full_url(), newurl) m = req.get_method() if (code in (301, 302, 303, 307) and m in ("GET", "HEAD") or code in (302, 303) and m == "POST"):
def redirect_request(self, req, fp, code, msg, headers): """Return a Request or None in response to a redirect.
828023b6b5d4d84a3fc01e9907142662a33d45a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/828023b6b5d4d84a3fc01e9907142662a33d45a6/urllib2.py
try: h = http_class(host) if req.has_data(): data = req.get_data() h.putrequest('POST', req.get_selector()) if not 'Content-type' in req.headers: h.putheader('Content-type', 'application/x-www-form-urlencoded') if not 'Content-length' in req.headers: h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('G...
h = http_class(host) if req.has_data(): data = req.get_data() h.putrequest('POST', req.get_selector()) if not 'Content-type' in req.headers: h.putheader('Content-type', 'application/x-www-form-urlencoded') if not 'Content-length' in req.headers: h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', ...
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
828023b6b5d4d84a3fc01e9907142662a33d45a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/828023b6b5d4d84a3fc01e9907142662a33d45a6/urllib2.py
h.endheaders()
try: h.endheaders() except socket.error, err: raise URLError(err)
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
828023b6b5d4d84a3fc01e9907142662a33d45a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/828023b6b5d4d84a3fc01e9907142662a33d45a6/urllib2.py
def writeln(self, *args): if args: self.write(*args)
def writeln(self, arg=None): if arg: self.write(arg)
def writeln(self, *args): if args: self.write(*args) self.write('\n') # text-mode streams translate to \r\n if needed
91dd19db6fe426c52a30843ab2b5bc8776c8c414 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/91dd19db6fe426c52a30843ab2b5bc8776c8c414/unittest.py
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0) IN_CLASSA_NET = 0xff000000
def IN_CLASSA(a): return ((((in_addr_t)(a)) & (-2147483648)) == 0) IN_CLASSA_NET = (-16777216)
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
IN_CLASSA_HOST = ((-1) & ~IN_CLASSA_NET)
def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000) IN_CLASSB_NET = 0xffff0000
def IN_CLASSB(a): return ((((in_addr_t)(a)) & (-1073741824)) == (-2147483648)) IN_CLASSB_NET = (-65536)
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
IN_CLASSB_HOST = ((-1) & ~IN_CLASSB_NET)
def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000) IN_CLASSC_NET = 0xffffff00
def IN_CLASSC(a): return ((((in_addr_t)(a)) & (-536870912)) == (-1073741824)) IN_CLASSC_NET = (-256)
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET) def IN_CLASSD(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
IN_CLASSC_HOST = ((-1) & ~IN_CLASSC_NET) def IN_CLASSD(a): return ((((in_addr_t)(a)) & (-268435456)) == (-536870912))
def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000) def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & (-536870912)) == (-536870912)) def IN_BADCLASS(a): return ((((in_addr_t)(a)) & (-268435456)) == (-268435456))
def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
PATH_MAX = 4095
PATH_MAX = 4096
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
SSIZE_MAX = INT_MAX
SSIZE_MAX = LONG_MAX
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
FILENAME_MAX = 4095
FILENAME_MAX = 4096
def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
529ec6a1ee36e3af820fdac9b19228c315206093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/529ec6a1ee36e3af820fdac9b19228c315206093/IN.py
self.sock.connect((host, port))
try: self.sock.connect((host, port)) except socket.error: self.close() raise
def connect(self, host='localhost', port = 0): """Connect to a host on a given port.
17bfef5860493a0195c999ab44d4c849660cac30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/17bfef5860493a0195c999ab44d4c849660cac30/smtplib.py
self._ent_handler.resolveEntity(publicId, systemId)
return self._ent_handler.resolveEntity(publicId, systemId)
def resolveEntity(self, publicId, systemId): self._ent_handler.resolveEntity(publicId, systemId)
e4772f3ada185a40232c2e2c9a74694e815c9574 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e4772f3ada185a40232c2e2c9a74694e815c9574/saxutils.py
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
if __name__ == '__main__': def test(): root = Tk() def doit(root=root): d = SimpleDialog(root,
def test(): root = Tk() def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go...
a3837a0d6394f9299e9cf5b4c67fcc705ec548ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3837a0d6394f9299e9cf5b4c67fcc705ec548ed/SimpleDialog.py
print d.go() t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) q.pack() t.mainloop()
print d.go() t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) q.pack() t.mainloop()
def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go()
a3837a0d6394f9299e9cf5b4c67fcc705ec548ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3837a0d6394f9299e9cf5b4c67fcc705ec548ed/SimpleDialog.py
if __name__ == '__main__':
def doit(root=root): d = SimpleDialog(root, text="This is a test dialog. " "Would this have been an actual dialog, " "the buttons below would have been glowing " "in soft pink light.\n" "Do you believe this?", buttons=["Yes", "No", "Cancel"], default=0, cancel=2, title="Test Dialog") print d.go()
a3837a0d6394f9299e9cf5b4c67fcc705ec548ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3837a0d6394f9299e9cf5b4c67fcc705ec548ed/SimpleDialog.py
if islink(component): resolved = os.readlink(component) (dir, file) = split(component) resolved = normpath(join(dir, resolved)) newpath = join(*([resolved] + bits[i:])) return realpath(newpath)
if islink(component): resolved = _resolve_link(component) if resolved is None: return join(*([component] + bits[i:])) else: newpath = join(*([resolved] + bits[i:])) return realpath(newpath)
def realpath(filename): """Return the canonical path of the specified filename, eliminating any
f50299c3787757bfe5d637f5de6d4b995d6beeb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f50299c3787757bfe5d637f5de6d4b995d6beeb0/posixpath.py
if type(url) in types.StringTypes:
if type(url) is types.StringType:
def open_https(self, url, data=None): """Use HTTPS protocol.""" import httplib user_passwd = None if type(url) in types.StringTypes: host, selector = splithost(url) if host: user_passwd, host = splituser(host) host = unquote(host) realhost = host else: host, selector = url urltype, rest = splittype(selector) url = rest...
b2a0a838e08b6d4e1d4ceffb7df90e121a70972d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b2a0a838e08b6d4e1d4ceffb7df90e121a70972d/urllib.py
return self.dict.len()
return len(self.dict)
def __len__(self): return self.dict.len()
5f8ea10bc24be5a02f62d7d8563078f8e4e3e793 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5f8ea10bc24be5a02f62d7d8563078f8e4e3e793/shelve.py
def capwords(str, pat):
def capwords(str, pat='[^a-zA-Z0-9_]+'):
def capwords(str, pat): import string words = split(str, pat, 1) for i in range(0, len(words), 2): words[i] = string.capitalize(words[i]) return string.joinfields(words, "")
7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3/regsub.py
words = split(str, pat, 1)
words = splitx(str, pat)
def capwords(str, pat): import string words = split(str, pat, 1) for i in range(0, len(words), 2): words[i] = string.capitalize(words[i]) return string.joinfields(words, "")
7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3/regsub.py
mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777
mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777
def run (self): if not self.skip_build: self.run_command('build_scripts') self.outfiles = self.copy_tree(self.build_dir, self.install_dir) if os.name == 'posix': # Set the executable bits (owner, group, and world) on # all the scripts we just installed. for file in self.get_outputs(): if self.dry_run: log.info("changin...
8e30bcdaaf1961e1c75d755b916b64fd577474bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8e30bcdaaf1961e1c75d755b916b64fd577474bb/install_scripts.py
if verbose: print 'Connecting to %s...' % host
if verbose: print 'Connecting to %s...' % `host`
def main(): global verbose, interactive, mac, rmok, nologin try: opts, args = getopt.getopt(sys.argv[1:], 'a:bil:mnp:qrs:v') except getopt.error, msg: usage(msg) login = '' passwd = '' account = '' for o, a in opts: if o == '-l': login = a if o == '-p': passwd = a if o == '-a': account = a if o == '-v': verbose = verbo...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Logging in as %s...' % (login or 'anonymous')
print 'Logging in as %s...' % `login or 'anonymous'`
def main(): global verbose, interactive, mac, rmok, nologin try: opts, args = getopt.getopt(sys.argv[1:], 'a:bil:mnp:qrs:v') except getopt.error, msg: usage(msg) login = '' passwd = '' account = '' for o, a in opts: if o == '-l': login = a if o == '-p': passwd = a if o == '-a': account = a if o == '-v': verbose = verbo...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose: print 'Creating local directory', localdir
if verbose: print 'Creating local directory', `localdir`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print "Failed to establish local directory", localdir
print "Failed to establish local directory", `localdir`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Bad mirror info in %s' % infofilename
print 'Bad mirror info in %s' % `infofilename`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose: print 'Listing remote directory %s...' % pwd
if verbose: print 'Listing remote directory %s...' % `pwd`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
filename = words[-1] if string.find(filename, " -> ") >= 0:
filename = string.lstrip(words[-1]) i = string.find(filename, " -> ") if i >= 0:
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Skipping symbolic link %s' % \ filename continue
print 'Found symbolic link %s' % `filename` linkto = filename[i+4:] filename = filename[:i]
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Skip pattern', pat, print 'matches', filename
print 'Skip pattern', `pat`, print 'matches', `filename`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Remembering subdirectory', filename
print 'Remembering subdirectory', `filename`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Already have this version of', filename
print 'Already have this version of',`filename`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
try: fp = open(tempname, 'wb') except IOError, msg: print "Can't create %s: %s" % (tempname, str(msg)) continue if verbose: print 'Retrieving %s from %s as %s...' % \ (filename, pwd, fullname) if verbose: fp1 = LoggingFile(fp, 1024, sys.stdout)
if mode[0] == 'l': if verbose: print "Creating symlink %s -> %s" % ( `filename`, `linkto`) try: os.symlink(linkto, tempname) except IOError, msg: print "Can't create %s: %s" % ( `tempname`, str(msg)) continue
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
fp1 = fp t0 = time.time() try: f.retrbinary('RETR ' + filename, fp1.write, 8*1024) except ftplib.error_perm, msg: print msg t1 = time.time() bytes = fp.tell() fp.close() if fp1 != fp: fp1.close()
try: fp = open(tempname, 'wb') except IOError, msg: print "Can't create %s: %s" % ( `tempname`, str(msg)) continue if verbose: print 'Retrieving %s from %s as %s...' % \ (`filename`, `pwd`, `fullname`) if verbose: fp1 = LoggingFile(fp, 1024, sys.stdout) else: fp1 = fp t0 = time.time() try: f.retrbinary('RETR ' + filena...
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print "Can't rename %s to %s: %s" % (tempname, fullname,
print "Can't rename %s to %s: %s" % (`tempname`, `fullname`,
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose:
if verbose and mode[0] != 'l':
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print filename, "in", localdir or "."
print `filename`, "in", `localdir or "."`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Skip pattern', pat, print 'matches', name
print 'Skip pattern', `pat`, print 'matches', `name`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Local file', fullname,
print 'Local file', `fullname`,
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose: print 'Removing local file/dir', fullname
if verbose: print 'Removing local file/dir', `fullname`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose: print 'Processing subdirectory', subdir
if verbose: print 'Processing subdirectory', `subdir`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print 'Remote directory now:', pwd print 'Remote cwd', subdir
print 'Remote directory now:', `pwd` print 'Remote cwd', `subdir`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
print "Can't chdir to", subdir, ":", msg
print "Can't chdir to", `subdir`, ":", `msg`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
if verbose: print 'Mirroring as', localsubdir
if verbose: print 'Mirroring as', `localsubdir`
def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
(fullname, str(msg))
(`fullname`, str(msg))
def remove(fullname): if os.path.isdir(fullname) and not os.path.islink(fullname): try: names = os.listdir(fullname) except os.error: names = [] ok = 1 for name in names: if not remove(os.path.join(fullname, name)): ok = 0 if not ok: return 0 try: os.rmdir(fullname) except os.error, msg: print "Can't remove local direc...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
(fullname, str(msg))
(`fullname`, str(msg))
def remove(fullname): if os.path.isdir(fullname) and not os.path.islink(fullname): try: names = os.listdir(fullname) except os.error: names = [] ok = 1 for name in names: if not remove(os.path.join(fullname, name)): ok = 0 if not ok: return 0 try: os.rmdir(fullname) except os.error, msg: print "Can't remove local direc...
a25969620ad128c95dde9cf500b28fa3e57611c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a25969620ad128c95dde9cf500b28fa3e57611c9/ftpmirror.py
def item_cget(self, col, opt): return self.tk.call(self._w, 'item', 'cget', col, opt)
def item_cget(self, entry, col, opt): return self.tk.call(self._w, 'item', 'cget', entry, col, opt)
def item_cget(self, col, opt): return self.tk.call(self._w, 'item', 'cget', col, opt)
3e048485f9c56066f347bc0e6a06056870847056 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e048485f9c56066f347bc0e6a06056870847056/Tix.py
def _interact(): """Make sure the application is in the foreground""" AE.AEInteractWithUser(50000000)
def _initialize(): global _initialized if _initialized: return macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
7451e3b4d5228a9e3efc837f6ecb2c156e07f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7451e3b4d5228a9e3efc837f6ecb2c156e07f538/EasyDialogs.py
def loop(timeout=30.0, use_poll=0, map=None):
def loop(timeout=30.0, use_poll=False, map=None):
def loop(timeout=30.0, use_poll=0, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
debug = 0 connected = 0 accepting = 0 closing = 0
debug = False connected = False accepting = False closing = False
def loop(timeout=30.0, use_poll=0, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def __init__(self, sock=None, map=None): if map is None: self._map = socket_map else: self._map = map
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.accepting = 1
self.accepting = True
def listen(self, num): self.accepting = 1 if os.name == 'nt' and num > 5: num = 1 return self.socket.listen(num)
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 0
self.connected = False
def connect(self, address): self.connected = 0 err = self.socket.connect_ex(address) # XXX Should interpret Winsock return values if err in (EINPROGRESS, EALREADY, EWOULDBLOCK): return if err in (0, EISCONN): self.addr = address self.connected = 1 self.handle_connect() else: raise socket.error, err
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def connect(self, address): self.connected = 0 err = self.socket.connect_ex(address) # XXX Should interpret Winsock return values if err in (EINPROGRESS, EALREADY, EWOULDBLOCK): return if err in (0, EISCONN): self.addr = address self.connected = 1 self.handle_connect() else: raise socket.error, err
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def handle_read_event(self): if self.accepting: # for an accepting socket, getting a read implies # that we are connected if not self.connected: self.connected = 1 self.handle_accept() elif not self.connected: self.handle_connect() self.connected = 1 self.handle_read() else: self.handle_read()
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def handle_read_event(self): if self.accepting: # for an accepting socket, getting a read implies # that we are connected if not self.connected: self.connected = 1 self.handle_accept() elif not self.connected: self.handle_connect() self.connected = 1 self.handle_read() else: self.handle_read()
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def handle_write_event(self): # getting a write implies that we are connected if not self.connected: self.handle_connect() self.connected = 1 self.handle_write()
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
self.connected = 1
self.connected = True
def __init__(self, fd): dispatcher.__init__(self) self.connected = 1 # set it to non-blocking mode flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0) flags = flags | os.O_NONBLOCK fcntl.fcntl(fd, fcntl.F_SETFL, flags) self.set_file(fd)
68522b18956b4417f5ab53ad513a6922370c9f2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68522b18956b4417f5ab53ad513a6922370c9f2e/asyncore.py
f = open(filename, 'rb')
f = open(filename, 'rT')
def showframe(self, stackindex): (frame, lineno) = self.stack[stackindex] W.SetCursor('watch') filename = frame.f_code.co_filename if filename <> self.file: editor = self.geteditor(filename) if editor: self.w.panes.bottom.src.source.set(editor.get(), filename) else: try: f = open(filename, 'rb') data = f.read() f.close...
f6b3fddfc332382935bdd94671c008fe66d306bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f6b3fddfc332382935bdd94671c008fe66d306bb/PyDebugger.py
f = open(filename, 'rb')
f = open(filename, 'rT')
def showframe(self, stackindex): (frame, lineno) = self.stack[stackindex] W.SetCursor('watch') filename = frame.f_code.co_filename if filename <> self.file: editor = self.geteditor(filename) if editor: self.w.panes.bottom.src.source.set(editor.get(), filename) else: try: f = open(filename, 'rb') data = f.read() f.close...
f6b3fddfc332382935bdd94671c008fe66d306bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f6b3fddfc332382935bdd94671c008fe66d306bb/PyDebugger.py
Ctrl-E Go to right edge (nospaces off) or end of line (nospaces on).
Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces on).
def rectangle(win, uly, ulx, lry, lrx): "Draw a rectangle." win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1) win.hline(uly, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.hline(lry, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.vline(uly+1, lrx, curses.ACS_VLINE, lry - uly - 1) win.addch(uly, ulx, curses.ACS_ULCORNER)...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
Ctrl-L Refresh screen
Ctrl-L Refresh screen.
def rectangle(win, uly, ulx, lry, lrx): "Draw a rectangle." win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1) win.hline(uly, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.hline(lry, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.vline(uly+1, lrx, curses.ACS_VLINE, lry - uly - 1) win.addch(uly, ulx, curses.ACS_ULCORNER)...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
def firstblank(self, y):
def _end_of_line(self, y):
def firstblank(self, y): "Go to the location of the first blank on the given line." last = self.maxx while 1: if ascii.ascii(self.win.inch(y, last)) != ascii.SP: last = last + 1 break elif last == 0: break last = last - 1 return last
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
self.win.move(y-1, self.firstblank(y-1))
self.win.move(y-1, self._end_of_line(y-1))
def do_command(self, ch): "Process a single editing command." (y, x) = self.win.getyx() self.lastcmd = ch if ascii.isprint(ch): if y < self.maxy or x < self.maxx: # The try-catch ignores the error we trigger from some curses # versions by trying to write into the lowest-rightmost spot # in the self.window. try: self.wi...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
self.win.move(y, self.firstblank(y))
self.win.move(y, self._end_of_line(y))
def do_command(self, ch): "Process a single editing command." (y, x) = self.win.getyx() self.lastcmd = ch if ascii.isprint(ch): if y < self.maxy or x < self.maxx: # The try-catch ignores the error we trigger from some curses # versions by trying to write into the lowest-rightmost spot # in the self.window. try: self.wi...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
if x == 0 and self.firstblank(y) == 0:
if x == 0 and self._end_of_line(y) == 0:
def do_command(self, ch): "Process a single editing command." (y, x) = self.win.getyx() self.lastcmd = ch if ascii.isprint(ch): if y < self.maxy or x < self.maxx: # The try-catch ignores the error we trigger from some curses # versions by trying to write into the lowest-rightmost spot # in the self.window. try: self.wi...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
stop = self.firstblank(y)
stop = self._end_of_line(y)
def gather(self): "Collect and return the contents of the window." result = "" for y in range(self.maxy+1): self.win.move(y, 0) stop = self.firstblank(y) #sys.stderr.write("y=%d, firstblank(y)=%d\n" % (y, stop)) if stop == 0 and self.stripspaces: continue for x in range(self.maxx+1): if self.stripspaces and x == stop: ...
5af256ded6190e899530de8df61fa77fe37686fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af256ded6190e899530de8df61fa77fe37686fc/textpad.py
def testWriteXML(): pass
def testWriteXML(): str = '<a b="c"/>' dom = parseString(str) domstr = dom.toxml() dom.unlink() confirm(str == domstr)
def testWriteXML(): pass
0a84a338f9fb578303eb4341dbf0e8514dafe7e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0a84a338f9fb578303eb4341dbf0e8514dafe7e0/test_minidom.py