rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
return self._untagged_response(typ, name) | return self._untagged_response(typ, dat, name) | def search(self, charset, criteria): """Search mailbox for matching messages. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
if typ == 'OK': self.state = 'SELECTED' elif typ == 'NO': self.state = 'AUTH' if not readonly and not self.untagged_responses.has_key('READ-WRITE'): raise self.error('%s is not writable' % mailbox) | if typ != 'OK': self.state = 'AUTH' return typ, dat self.state = 'SELECTED' if not self.untagged_responses.has_key('READ-WRITE') \ and not readonly: if __debug__ and self.debug >= 1: _dump_ur(self.untagged_responses) raise self.readonly('%s is not writable' % mailbox) | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
def socket(self): """Return socket instance used to connect to IMAP4 server. socket = <instance>.socket() """ return self.sock | def select(self, mailbox='INBOX', readonly=None): """Select a mailbox. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py | |
return self._untagged_response(typ, name) | return self._untagged_response(typ, dat, name) | def status(self, mailbox, names): """Request named status conditions for mailbox. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
return self._untagged_response(typ, 'FETCH') | return self._untagged_response(typ, dat, 'FETCH') | def store(self, message_set, command, flag_list): """Alters flag dispositions for messages in mailbox. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
typ, dat2 = self._untagged_response(typ, name) if dat2[-1]: dat = dat2 return typ, dat | return self._untagged_response(typ, dat, name) | def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, rather than message number. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
if __debug__ and self.debug >= 5: print '\tuntagged_responses[%s] %s += %s' % (typ, len(`ur[typ]`), _trunc(20, `dat`)) | def _append_untagged(self, typ, dat): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py | |
if self.untagged_responses.has_key('OK'): del self.untagged_responses['OK'] | for typ in ('OK', 'NO', 'BAD'): if self.untagged_responses.has_key(typ): del self.untagged_responses[typ] if self.untagged_responses.has_key('READ-WRITE') \ and self.untagged_responses.has_key('READ-ONLY'): del self.untagged_responses['READ-WRITE'] raise self.readonly('mailbox status changed to READ-ONLY') | def _command(self, name, *args): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print '\t> %s' % data | _mesg('> %s' % data) | def _command(self, name, *args): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print '\twrite literal size %s' % len(literal) | _mesg('write literal size %s' % len(literal)) | def _command(self, name, *args): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print '\tread literal size %s' % size | _mesg('read literal size %s' % size) | def _get_response(self): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
raise EOFError | raise self.abort('socket error: EOF') | def _get_line(self): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print '\t< %s' % line | _mesg('< %s' % line) | def _get_line(self): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print "\tmatched r'%s' => %s" % (cre.pattern, `self.mo.groups()`) | _mesg("\tmatched r'%s' => %s" % (cre.pattern, `self.mo.groups()`)) | def _match(self, cre, s): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
def _untagged_response(self, typ, name): | def _untagged_response(self, typ, dat, name): if typ == 'NO': return typ, dat | def _untagged_response(self, typ, name): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print '\tuntagged_responses[%s] => %s' % (name, _trunc(20, `data`)) | _mesg('untagged_responses[%s] => %s' % (name, data)) | def _untagged_response(self, typ, name): | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
def _trunc(m, s): if len(s) <= m: return s return '%.*s..' % (m, s) | def _mesg(s): sys.stderr.write('\t'+s+'\n') sys.stderr.flush() def _dump_ur(dict): l = dict.items() if not l: return t = '\n\t\t' j = string.join l = map(lambda x,j=j:'%s: "%s"' % (x[0], x[1][0] and j(x[1], '" "') or ''), l) _mesg('untagged responses dump:%s%s' % (t, j(l, t))) | def _trunc(m, s): if len(s) <= m: return s return '%.*s..' % (m, s) | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print ' %s %s\n => %s %s' % (cmd, args, typ, dat) | _mesg(' %s %s\n => %s %s' % (cmd, args, typ, dat)) | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
print 'PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION | _mesg('PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION) | def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py |
if map(max, Squares(3), Squares(2)) != [0, 1, None]: | if map(max, Squares(3), Squares(2)) != [0, 1, 4]: | def plus(*v): accu = 0 for i in v: accu = accu + i return accu | f69c6526c8d825b87eb03c2e7e759dd2034bdcb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f69c6526c8d825b87eb03c2e7e759dd2034bdcb5/test_b1.py |
print>>sys.__stderr__, "Idle accepted connection from ", address | def accept(self): working_sock, address = self.listening_sock.accept() if address[0] == '127.0.0.1': print>>sys.__stderr__, "Idle accepted connection from ", address SocketIO.__init__(self, working_sock) else: print>>sys.__stderr__, "Invalid host: ", address raise socket.error | 24e012d82bd97af6530c1f8f64d1fa0786a2a446 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24e012d82bd97af6530c1f8f64d1fa0786a2a446/rpc.py | |
print>>sys.__stderr__, "Invalid host: ", address | print>>sys.__stderr__, "** Invalid host: ", address | def accept(self): working_sock, address = self.listening_sock.accept() if address[0] == '127.0.0.1': print>>sys.__stderr__, "Idle accepted connection from ", address SocketIO.__init__(self, working_sock) else: print>>sys.__stderr__, "Invalid host: ", address raise socket.error | 24e012d82bd97af6530c1f8f64d1fa0786a2a446 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/24e012d82bd97af6530c1f8f64d1fa0786a2a446/rpc.py |
def nuke_release_tree (self, base_dir): try: self.execute (rmtree, (base_dir,), "removing %s" % base_dir) except (IOError, OSError), exc: if exc.filename: msg = "error removing %s: %s (%s)" % \ (base_dir, exc.strerror, exc.filename) else: msg = "error removing %s: %s" % (base_dir, exc.strerror) self.warn (msg) | def make_release_tree (self, base_dir, files): | e2d24863d861b93918d78c907b8da25b4636854a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e2d24863d861b93918d78c907b8da25b4636854a/sdist.py | |
self.nuke_release_tree (base_dir) | remove_tree (base_dir, self.verbose, self.dry_run) | def make_distribution (self): | e2d24863d861b93918d78c907b8da25b4636854a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e2d24863d861b93918d78c907b8da25b4636854a/sdist.py |
print "\n<PRE>Cookies:", cookies, "</PRE>" | def get_cookie(self): | 8444855ec7715a0c8feec24e18d13e1108a0f535 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8444855ec7715a0c8feec24e18d13e1108a0f535/faqmain.py | |
mime_header = re.compile('([ \t(]|^)([-a-zA-Z0-9_+]*[\177-\377][-a-zA-Z0-9_+\177-\377]*)([ \t)]|\n)') | mime_header = re.compile('([ \t(]|^)([-a-zA-Z0-9_+]*[\177-\377][-a-zA-Z0-9_+\177-\377]*)(?=[ \t)]|\n)') | def mime_encode(line, header): """Code a single line as quoted-printable. If header is set, quote some extra characters.""" if header: reg = mime_header_char else: reg = mime_char newline = '' pos = 0 if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = ('=%02x'... | 5ab421320178613d27b332e4570ed1d1d1df26ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ab421320178613d27b332e4570ed1d1d1df26ee/mimify.py |
newline = '%s%s%s=?%s?Q?%s?=%s' % \ | newline = '%s%s%s=?%s?Q?%s?=' % \ | def mime_encode_header(line): """Code a single header line as quoted-printable.""" newline = '' pos = 0 while 1: res = mime_header.search(line, pos) if res is None: break newline = '%s%s%s=?%s?Q?%s?=%s' % \ (newline, line[pos:res.start(0)], res.group(1), CHARSET, mime_encode(res.group(2), 1), res.group(3)) pos = res.en... | 5ab421320178613d27b332e4570ed1d1d1df26ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ab421320178613d27b332e4570ed1d1d1df26ee/mimify.py |
CHARSET, mime_encode(res.group(2), 1), res.group(3)) | CHARSET, mime_encode(res.group(2), 1)) | def mime_encode_header(line): """Code a single header line as quoted-printable.""" newline = '' pos = 0 while 1: res = mime_header.search(line, pos) if res is None: break newline = '%s%s%s=?%s?Q?%s?=%s' % \ (newline, line[pos:res.start(0)], res.group(1), CHARSET, mime_encode(res.group(2), 1), res.group(3)) pos = res.en... | 5ab421320178613d27b332e4570ed1d1d1df26ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5ab421320178613d27b332e4570ed1d1d1df26ee/mimify.py |
host = [host] try: addr = socket.gethostbyname(host[0]) if addr != host: | rawHost, port = splitport(host) host = [rawHost] try: addr = socket.gethostbyname(rawHost) if addr != rawHost: | def proxy_bypass(host): try: import _winreg import re except ImportError: # Std modules, so should be around - but you never know! return 0 try: internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Internet Settings') proxyEnable = _winreg.QueryValueEx(internetSettin... | c206a1bbc52dc04f2360bc914df5d74cb48b5037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c206a1bbc52dc04f2360bc914df5d74cb48b5037/urllib.py |
except: | except IOError: | def is_zipfile(filename): """Quickly see if file is a ZIP file by checking the magic number. Will not accept a ZIP archive with an ending comment. """ try: fpin = open(filename, "rb") fpin.seek(-22, 2) # Seek to end-of-file record endrec = fpin.read() fpin.close() if endrec[0:4] == "PK\005\006" and endre... | dab985b19343f08bfaf73f8f7d41b5e8352f4c53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dab985b19343f08bfaf73f8f7d41b5e8352f4c53/zipfile.py |
import os | def verisnot(a, b): if a is b: raise TestFailed, "%r is %r" % (a, b) | f5c9c3ad6e4c86d46c226a4e5f42c2b3630e63c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f5c9c3ad6e4c86d46c226a4e5f42c2b3630e63c1/test_bool.py | |
if cl.super: | if hasattr(cl, "super") and cl.super: | def listclasses(self): dir, file = os.path.split(self.file) name, ext = os.path.splitext(file) if os.path.normcase(ext) != ".py": return [] try: dict = pyclbr.readmodule_ex(name, [dir] + sys.path) except ImportError, msg: return [] items = [] self.classes = {} for key, cl in dict.items(): if cl.module == name: s = key ... | cae8451f2521ff928aa802aff2b13ef8b6188994 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cae8451f2521ff928aa802aff2b13ef8b6188994/ClassBrowser.py |
path = sys.path | path = sys.path[:] | def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path modargs = 0 debug = 1 odir = '' win = sys.platform[:3] == 'win' # modules that are imported by the Python runtime implicits = ["s... | bfdc8d3fbfc193ee9f6416848fe7dfde7550786d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bfdc8d3fbfc193ee9f6416848fe7dfde7550786d/freeze.py |
if args[0][-3:] != ".py": usage('the script name must have a .py suffix') | def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path modargs = 0 debug = 1 odir = '' win = sys.platform[:3] == 'win' # modules that are imported by the Python runtime implicits = ["s... | bfdc8d3fbfc193ee9f6416848fe7dfde7550786d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bfdc8d3fbfc193ee9f6416848fe7dfde7550786d/freeze.py | |
import StringIO f = StringIO.StringIO(s) g = StringIO.StringIO() encode(f, g) return g.getvalue() | pieces = [] for i in range(0, len(s), MAXBINSIZE): chunk = s[i : i + MAXBINSIZE] pieces.append(binascii.b2a_base64(chunk)) return "".join(pieces) | def encodestring(s): """Encode a string.""" import StringIO f = StringIO.StringIO(s) g = StringIO.StringIO() encode(f, g) return g.getvalue() | c76cf91859eeedfc5799e6a0064f84d68c54ed47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c76cf91859eeedfc5799e6a0064f84d68c54ed47/base64.py |
import StringIO f = StringIO.StringIO(s) g = StringIO.StringIO() decode(f, g) return g.getvalue() | return binascii.a2b_base64(s) | def decodestring(s): """Decode a string.""" import StringIO f = StringIO.StringIO(s) g = StringIO.StringIO() decode(f, g) return g.getvalue() | c76cf91859eeedfc5799e6a0064f84d68c54ed47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c76cf91859eeedfc5799e6a0064f84d68c54ed47/base64.py |
dict = {} | r=[] | def parse_qs(qs, keep_blank_values=0, strict_parsing=0): """Parse a query given as a string argument. Arguments: qs: URL-encoded query string to be parsed keep_blank_values: flag indicating whether blank values in URL encoded queries should be treated as blank strings. A true value inicates that blanks should be ret... | 206977e1f914ee36b2d87d56d426fbc08b93f0ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/206977e1f914ee36b2d87d56d426fbc08b93f0ad/cgi.py |
if len(value) or keep_blank_values: if dict.has_key (name): dict[name].append(value) else: dict[name] = [value] return dict | r.append(name, value) return r | def parse_qs(qs, keep_blank_values=0, strict_parsing=0): """Parse a query given as a string argument. Arguments: qs: URL-encoded query string to be parsed keep_blank_values: flag indicating whether blank values in URL encoded queries should be treated as blank strings. A true value inicates that blanks should be ret... | 206977e1f914ee36b2d87d56d426fbc08b93f0ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/206977e1f914ee36b2d87d56d426fbc08b93f0ad/cgi.py |
dict = parse_qs(qs, self.keep_blank_values, self.strict_parsing) self.list = [] for key, valuelist in dict.items(): for value in valuelist: self.list.append(MiniFieldStorage(key, value)) | self.list = list = [] for key, value in parse_qsl(qs, self.keep_blank_values, self.strict_parsing): list.append(MiniFieldStorage(key, value)) | def read_urlencoded(self): """Internal: read data in query string format.""" qs = self.fp.read(self.length) dict = parse_qs(qs, self.keep_blank_values, self.strict_parsing) self.list = [] for key, valuelist in dict.items(): for value in valuelist: self.list.append(MiniFieldStorage(key, value)) self.skip_lines() | 206977e1f914ee36b2d87d56d426fbc08b93f0ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/206977e1f914ee36b2d87d56d426fbc08b93f0ad/cgi.py |
if line == '.': line = '..' | if line[:1] == '.': line = '.' + line | def post(self, f): resp = self.shortcmd('POST') # Raises error_??? if posting is not allowed if resp[0] <> '3': raise error_reply, resp while 1: line = f.readline() if not line: break if line[-1] == '\n': line = line[:-1] if line == '.': line = '..' self.putline(line) self.putline('.') return self.getresp() | 6d2cbfce951ee4977f7514daabbc48a8e0d522c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6d2cbfce951ee4977f7514daabbc48a8e0d522c5/nntplib.py |
if line == '.': line = '..' | if line[:1] == '.': line = '.' + line | def ihave(self, id, f): resp = self.shortcmd('IHAVE ' + id) # Raises error_??? if the server already has it if resp[0] <> '3': raise error_reply, resp while 1: line = f.readline() if not line: break if line[-1] == '\n': line = line[:-1] if line == '.': line = '..' self.putline(line) self.putline('.') return self.getres... | 6d2cbfce951ee4977f7514daabbc48a8e0d522c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6d2cbfce951ee4977f7514daabbc48a8e0d522c5/nntplib.py |
self.show(name, headers['title'], text, 1) | self.show(name, headers['title'], text) | def do_show(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, title, text, 1) | self.show(name, title, text) | def do_all(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/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): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, headers['title'], text, 1) | self.show(name, headers['title'], text) | def do_recent(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, title, text, 1) | self.show(name, title, text) | def do_query(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, title, text) | self.show(name, title, text, edit=0) | def do_edit(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, title, text) | self.show(name, title, text, edit=0) | def do_review(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
self.show(name, title, text, 1) | self.show(name, title, text) | def checkin(self): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/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): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/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): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/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): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/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): | 100083995825129d5be5b69522070aa1f452e089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/100083995825129d5be5b69522070aa1f452e089/faqmain.py |
{'message' : 'foo', 'args' : ('foo',)}), | {'message' : 'foo', 'args' : ('foo',), 'filename' : None, 'errno' : None, 'strerror' : None}), | def testAttributes(self): # test that exception attributes are happy | 51cd0553157a16e1ac2d37ba96d1997bfb7d9dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51cd0553157a16e1ac2d37ba96d1997bfb7d9dec/test_exceptions.py |
{'message' : '', 'args' : ('foo', 'bar')}), | {'message' : '', 'args' : ('foo', 'bar'), 'filename' : None, 'errno' : 'foo', 'strerror' : 'bar'}), | def testAttributes(self): # test that exception attributes are happy | 51cd0553157a16e1ac2d37ba96d1997bfb7d9dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51cd0553157a16e1ac2d37ba96d1997bfb7d9dec/test_exceptions.py |
{'message' : '', 'args' : ('foo', 'bar')}), | {'message' : '', 'args' : ('foo', 'bar'), 'filename' : 'baz', 'errno' : 'foo', 'strerror' : 'bar'}), (IOError, ('foo', 'bar', 'baz', 'quux'), {'message' : '', 'args' : ('foo', 'bar', 'baz', 'quux')}), | def testAttributes(self): # test that exception attributes are happy | 51cd0553157a16e1ac2d37ba96d1997bfb7d9dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51cd0553157a16e1ac2d37ba96d1997bfb7d9dec/test_exceptions.py |
if type(klass) != types.ClassType: raise TypeError, "setLoggerClass is expecting a class" | def setLoggerClass(klass): """ Set the class to be used when instantiating a logger. The class should define __init__() such that only a name argument is required, and the __init__() should call Logger.__init__() """ if klass != Logger: if type(klass) != types.ClassType: raise TypeError, "setLoggerClass is expecting a ... | 97d6315e157134fdbf9ad6a95d8873599ad8122e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/97d6315e157134fdbf9ad6a95d8873599ad8122e/__init__.py | |
def test_both(): "Test mmap module on Unix systems and Windows" # Create an mmap'ed file f = open('foo', 'w+') # Write 2 pages worth of data to the file f.write('\0'* PAGESIZE) f.write('foo') f.write('\0'* (PAGESIZE-3) ) m = mmap.mmap(f.fileno(), 2 * PAGESIZE) f.close() # Simple sanity checks print ' Position of f... | a1c26341d1626e7fffe5ad7ad068fc2b507df0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1c26341d1626e7fffe5ad7ad068fc2b507df0be/test_mmap.py | ||
m.resize( 512 ) | m.resize( 512 ) | def test_both(): "Test mmap module on Unix systems and Windows" # Create an mmap'ed file f = open('foo', 'w+') # Write 2 pages worth of data to the file f.write('\0'* PAGESIZE) f.write('foo') f.write('\0'* (PAGESIZE-3) ) m = mmap.mmap(f.fileno(), 2 * PAGESIZE) f.close() # Simple sanity checks print ' Position of f... | a1c26341d1626e7fffe5ad7ad068fc2b507df0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1c26341d1626e7fffe5ad7ad068fc2b507df0be/test_mmap.py |
def test_both(): "Test mmap module on Unix systems and Windows" # Create an mmap'ed file f = open('foo', 'w+') # Write 2 pages worth of data to the file f.write('\0'* PAGESIZE) f.write('foo') f.write('\0'* (PAGESIZE-3) ) m = mmap.mmap(f.fileno(), 2 * PAGESIZE) f.close() # Simple sanity checks print ' Position of f... | a1c26341d1626e7fffe5ad7ad068fc2b507df0be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1c26341d1626e7fffe5ad7ad068fc2b507df0be/test_mmap.py | ||
if hasattr(os, 'chmod'): | if hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin': | def test_rmtree_errors(self): # filename is guaranteed not to exist filename = tempfile.mktemp() self.assertRaises(OSError, shutil.rmtree, filename) | 4ef2224155819a13d079b49a594cf319ac2f6f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4ef2224155819a13d079b49a594cf319ac2f6f4b/test_shutil.py |
global template if template == None: | global template, _pid if os.name == 'posix' and _pid and _pid != os.getpid(): template = None if template is None: | def gettempprefix(): global template if template == None: if os.name == 'posix': template = '@' + `os.getpid()` + '.' elif os.name == 'nt': template = '~' + `os.getpid()` + '-' elif os.name == 'mac': template = 'Python-Tmp-' else: template = 'tmp' # XXX might choose a better one return template | 48241ad1c8cafa6f04c304db116ed1035780260d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/48241ad1c8cafa6f04c304db116ed1035780260d/tempfile.py |
template = '@' + `os.getpid()` + '.' | _pid = os.getpid() template = '@' + `_pid` + '.' | def gettempprefix(): global template if template == None: if os.name == 'posix': template = '@' + `os.getpid()` + '.' elif os.name == 'nt': template = '~' + `os.getpid()` + '-' elif os.name == 'mac': template = 'Python-Tmp-' else: template = 'tmp' # XXX might choose a better one return template | 48241ad1c8cafa6f04c304db116ed1035780260d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/48241ad1c8cafa6f04c304db116ed1035780260d/tempfile.py |
if cl.super: | if hasattr(cl, 'super') and cl.super: | def listclasses(self): dir, file = os.path.split(self.file) name, ext = os.path.splitext(file) if os.path.normcase(ext) != ".py": return [] try: dict = pyclbr.readmodule_ex(name, [dir] + sys.path) except ImportError, msg: return [] items = [] self.classes = {} for key, cl in dict.items(): if cl.module == name: s = key ... | 31b565c8a5671618d0959595a540a322b045c292 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/31b565c8a5671618d0959595a540a322b045c292/ClassBrowser.py |
self.__current_realm = None | def __init__(self, password_mgr=None): if password_mgr is None: password_mgr = HTTPPasswordMgr() self.passwd = password_mgr self.add_password = self.passwd.add_password self.__current_realm = None # if __current_realm is not None, then the server must have # refused our name/password and is asking for authorization # a... | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py | |
if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None | def retry_http_basic_auth(self, host, req, realm): if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None user,pw = self.passwd.find_user_password(realm, host) if pw: raw = "%s:%s" % (user, pw) auth = base64.encodestring(raw).strip() req.add_header(self.header, 'Bas... | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py | |
auth = base64.encodestring(raw).strip() req.add_header(self.header, 'Basic %s' % auth) resp = self.parent.open(req) self.__current_realm = None return resp else: self.__current_realm = None | auth = 'Basic %s' % base64.encodestring(raw).strip() if req.headers.get(self.auth_header, None) == auth: return None req.add_header(self.auth_header, auth) return self.parent.open(req) else: | def retry_http_basic_auth(self, host, req, realm): if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None user,pw = self.passwd.find_user_password(realm, host) if pw: raw = "%s:%s" % (user, pw) auth = base64.encodestring(raw).strip() req.add_header(self.header, 'Bas... | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py |
header = 'Authorization' | auth_header = 'Authorization' | def retry_http_basic_auth(self, host, req, realm): if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm return None user,pw = self.passwd.find_user_password(realm, host) if pw: raw = "%s:%s" % (user, pw) auth = base64.encodestring(raw).strip() req.add_header(self.header, 'Bas... | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py |
header = 'Proxy-Authorization' | auth_header = 'Proxy-Authorization' | def http_error_401(self, req, fp, code, msg, headers): host = urlparse.urlparse(req.get_full_url())[1] return self.http_error_auth_reqed('www-authenticate', host, req, headers) | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py |
self.__current_realm = None | def __init__(self, passwd=None): if passwd is None: passwd = HTTPPasswordMgr() self.passwd = passwd self.add_password = self.passwd.add_password self.__current_realm = None | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py | |
authreq = headers.get(self.header, None) | authreq = headers.get(self.auth_header, None) | def http_error_auth_reqed(self, authreq, host, req, headers): authreq = headers.get(self.header, None) if authreq: kind = authreq.split()[0] if kind == 'Digest': return self.retry_http_digest_auth(req, authreq) | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py |
req.add_header(self.header, 'Digest %s' % auth) | auth_val = 'Digest %s' % auth if req.headers.get(self.auth_header, None) == auth_val: return None req.add_header(self.auth_header, auth_val) | def retry_http_digest_auth(self, req, auth): token, challenge = auth.split(' ', 1) chal = parse_keqv_list(parse_http_list(challenge)) auth = self.get_authorization(req, chal) if auth: req.add_header(self.header, 'Digest %s' % auth) resp = self.parent.open(req) self.__current_realm = None return resp | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py |
self.__current_realm = None | def retry_http_digest_auth(self, req, auth): token, challenge = auth.split(' ', 1) chal = parse_keqv_list(parse_http_list(challenge)) auth = self.get_authorization(req, chal) if auth: req.add_header(self.header, 'Digest %s' % auth) resp = self.parent.open(req) self.__current_realm = None return resp | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py | |
return None if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm | def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None | b9e8cfea89d64b99d4dc23c433ee2555096d3808 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b9e8cfea89d64b99d4dc23c433ee2555096d3808/urllib2.py | |
BLOCKSIZE = 8192 while 1: data = source.read(BLOCKSIZE) if not data: break outputfile.write(data) | shutil.copyfileobj(source, outputfile) | def copyfile(self, source, outputfile): """Copy all data between two file objects. | a6d99279659b66afb6aa6f1bec31d41d83e8eb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a6d99279659b66afb6aa6f1bec31d41d83e8eb2a/SimpleHTTPServer.py |
disp = disp + 'yes' else: disp = disp + 'no ' print '%-4dbreakpoint %s at %s:%d' % (self.number, disp, | disp = disp + 'yes ' else: disp = disp + 'no ' print '%-4dbreakpoint %s at %s:%d' % (self.number, disp, | def bpprint(self): if self.temporary: disp = 'del ' else: disp = 'keep ' if self.enabled: disp = disp + 'yes' else: disp = disp + 'no ' print '%-4dbreakpoint %s at %s:%d' % (self.number, disp, self.file, self.line) if self.cond: print '\tstop only if %s' % (self.cond,) if self.ignore: print '\tignore next %d hits' ... | 3a924291647fbabd6ef299b0253d82a70dc66243 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3a924291647fbabd6ef299b0253d82a70dc66243/bdb.py |
c = cmp(dict1, dict2) | if random.random() < 0.5: c = cmp(dict1, dict2) else: c = dict1 == dict2 | def test_one(n): global mutate, dict1, dict2, dict1keys, dict2keys # Fill the dicts without mutating them. mutate = 0 dict1keys = fill_dict(dict1, range(n), n) dict2keys = fill_dict(dict2, range(n), n) # Enable mutation, then compare the dicts so long as they have the # same size. mutate = 1 if verbose: print "trying... | afe323af8d4de4e7ef10b0e601299b013c6f344c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/afe323af8d4de4e7ef10b0e601299b013c6f344c/test_mutants.py |
menu.configure(postcommand=self.postwindowsmenu) | WindowList.register_callback(self.postwindowsmenu) | def __init__(self, flist=None, filename=None, key=None, root=None): self.flist = flist root = root or flist.root self.root = root if flist: self.vars = flist.vars self.menubar = Menu(root) self.top = top = self.Toplevel(root, menu=self.menubar) self.vbar = vbar = Scrollbar(top, name='vbar') self.text = text = Text(top,... | afb1dcedad30c7a24e7e1ed32328e9beb2eaddf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/afb1dcedad30c7a24e7e1ed32328e9beb2eaddf6/EditorWindow.py |
import WindowList | def postwindowsmenu(self): # Only called when Windows menu exists # XXX Actually, this Just-In-Time updating interferes # XXX badly with the tear-off feature. It would be better # XXX to update all Windows menus whenever the list of windows # XXX changes. menu = self.menudict['windows'] end = menu.index("end") if end ... | afb1dcedad30c7a24e7e1ed32328e9beb2eaddf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/afb1dcedad30c7a24e7e1ed32328e9beb2eaddf6/EditorWindow.py | |
if m[0] != '_' and m != 'config': | if m[0] != '_' and m != 'config' and m != 'configure': | def __init__(self, master=None, cnf={}, **kw): if kw: cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = apply(Frame, (master,), fcnf) self.vbar = Scrollbar(self.frame, name='vbar') self.vbar.pack(side=RIGHT, fill=Y) cnf['name'] = '... | 017655dade8bfffbee9521645ec3e633ff3ac382 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/017655dade8bfffbee9521645ec3e633ff3ac382/ScrolledText.py |
Should be able to handle anything rfc822.parseaddr can handle.""" | Should be able to handle anything rfc822.parseaddr can handle. """ | def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle.""" m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: #something weird here.. punt -ddm return addr else: return "<%s>" % m | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
Internet CRLF end-of-line.""" | Internet CRLF end-of-line. """ | 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)) | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
transaction.""" | transaction. """ | 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)) | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. By default, smtplib.SMTP_PORT is used. | If specified, `host' is the name of the remote host to which to connect. If specified, `port' specifies the port to which to connect. By default, smtplib.SMTP_PORT is used. | def __init__(self, host = '', port = 0): """Initialize a new instance. | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
A non-false value results in debug messages for connection and for all messages sent to and received from the server. | A non-false value results in debug messages for connection and for all messages sent to and received from the server. | def set_debuglevel(self, debuglevel): """Set the debug output level. | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
Note: This method is automatically invoked by __init__, if a host is specified during instantiation. | Note: This method is automatically invoked by __init__, if a host is specified during instantiation. | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
"""Send a command to the server. """ | """Send a command to the server.""" | def putcmd(self, cmd, args=""): """Send a command to the server. """ str = '%s %s%s' % (cmd, args, CRLF) self.send(str) | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
- server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (note : multiline responses converted to a single, multiline string) | - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (multiline responses are converted to a single, multiline string). | def getreply(self): """Get a reply from the server. Returns a tuple consisting of: - server response code (e.g. '250', or such, if all goes well) Note: returns -1 if it can't read response code. - server response string corresponding to response code (note : multiline responses converted to a single, multiline string)... | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
""" Send a command, and return its response code """ | """Send a command, and return its response code.""" | def docmd(self, cmd, args=""): """ Send a command, and return its response code """ self.putcmd(cmd,args) (code,msg)=self.getreply() return code | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
def docmd(self, cmd, args=""): """ Send a command, and return its response code """ self.putcmd(cmd,args) (code,msg)=self.getreply() return code | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py | ||
""" SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """ | """SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host. """ | def helo(self, name=''): """ SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("helo",name) (code,msg)=self.getreply() self.helo_resp=msg return code | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
name=socket.gethostbyaddr(socket.gethostname())[0] | name=socket.gethostbyaddr(socket.gethostname())[0] | def helo(self, name=''): """ SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("helo",name) (code,msg)=self.getreply() self.helo_resp=msg return code | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
""" SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ | """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ | def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # M... | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
name=socket.gethostbyaddr(socket.gethostname())[0] | name=socket.gethostbyaddr(socket.gethostname())[0] | def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # M... | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/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 | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/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 | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/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 | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/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() | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/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() | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
"""SMTP 'DATA' command. Sends message data to server. | """SMTP 'DATA' command -- sends message data to server. | 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" % (C... | 58a0b3fcac35fd85d6794fbcb62a4f4925cb00da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/58a0b3fcac35fd85d6794fbcb62a4f4925cb00da/smtplib.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.