rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
'EXECUTION': ('ref/execframes', ''), 'NAMESPACES': ('ref/execframes', 'global ASSIGNMENT DELETION'), | 'EXECUTION': ('ref/naming', ''), 'NAMESPACES': ('ref/naming', 'global ASSIGNMENT DELETION'), | 'METHODS': ('lib/typesmethods', 'class def CLASSES TYPES'), | 9fbf287241e4561acb33255cfb71cba124e273ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9fbf287241e4561acb33255cfb71cba124e273ee/pydoc.py |
x = property(getx, setx, delx) | x = property(getx, setx, delx, doc="I'm the x property.") | def delx(self): del self.__x | ab807d7997aa654837802f28641cf3d8d7eb4ab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ab807d7997aa654837802f28641cf3d8d7eb4ab0/test_descr.py |
def __eq__(self, other): try: return abs(self - other) <= 1e-6 except: return NotImplemented | ab807d7997aa654837802f28641cf3d8d7eb4ab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ab807d7997aa654837802f28641cf3d8d7eb4ab0/test_descr.py | ||
if not modname: | if not modname or '.' in modname: | def search_function(encoding): # Cache lookup entry = _cache.get(encoding, _unknown) if entry is not _unknown: return entry # Import the module: # # First try to find an alias for the normalized encoding # name and lookup the module using the aliased name, then try to # lookup the module using the standard import sch... | 1b9bc9d76e4a948604df17d655dce056d60684d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b9bc9d76e4a948604df17d655dce056d60684d7/__init__.py |
np = lambda *f: norm(self.tempdir, *f) | def test_glob_literal(self): eq = self.assertSequencesEqual_noorder np = lambda *f: norm(self.tempdir, *f) eq(self.glob('a'), [self.norm('a')]) eq(self.glob('a', 'D'), [self.norm('a', 'D')]) eq(self.glob('aab'), [self.norm('aab')]) eq(self.glob('zymurgy'), []) | 204f33fc4e37986f56b2fd5b0c486f6912c711ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/204f33fc4e37986f56b2fd5b0c486f6912c711ac/test_glob.py | |
np = lambda *f: norm(self.tempdir, *f) | def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder np = lambda *f: norm(self.tempdir, *f) eq(self.glob('a*'), map(self.norm, ['a', 'aab', 'aaa'])) eq(self.glob('*a'), map(self.norm, ['a', 'aaa'])) eq(self.glob('aa?'), map(self.norm, ['aaa', 'aab'])) eq(self.glob('aa[ab]'), map(self.norm, ['aaa', ... | 204f33fc4e37986f56b2fd5b0c486f6912c711ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/204f33fc4e37986f56b2fd5b0c486f6912c711ac/test_glob.py | |
np = lambda *f: norm(self.tempdir, *f) | def test_glob_nested_directory(self): eq = self.assertSequencesEqual_noorder np = lambda *f: norm(self.tempdir, *f) if os.path.normcase("abCD") == "abCD": # case-sensitive filesystem eq(self.glob('a', 'bcd', 'E*'), [self.norm('a', 'bcd', 'EF')]) else: # case insensitive filesystem eq(self.glob('a', 'bcd', 'E*'), [self.... | 204f33fc4e37986f56b2fd5b0c486f6912c711ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/204f33fc4e37986f56b2fd5b0c486f6912c711ac/test_glob.py | |
np = lambda *f: norm(self.tempdir, *f) | def test_glob_directory_names(self): eq = self.assertSequencesEqual_noorder np = lambda *f: norm(self.tempdir, *f) eq(self.glob('*', 'D'), [self.norm('a', 'D')]) eq(self.glob('*', '*a'), []) eq(self.glob('a', '*', '*', '*a'), [self.norm('a', 'bcd', 'efg', 'ha')]) eq(self.glob('?a?', '*F'), map(self.norm, [os.path.join(... | 204f33fc4e37986f56b2fd5b0c486f6912c711ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/204f33fc4e37986f56b2fd5b0c486f6912c711ac/test_glob.py | |
def bind(self, sequence=None, command=None): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | ||
def bind(self, sequence=None, command=None): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | ||
class Bottom: """A "card-like" object to serve as the bottom for some stacks. Specifically, this is used by the deck and the suit stacks. """ def __init__(self, stack): """Constructor, taking the stack as an argument. We displays ourselves as a gray rectangle the size of a playing card, positioned at the stack... | def bind(self, sequence=None, command=None): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
turnover() -- turn the card (face up or down) & raise it onclick(handler), ondouble(handler), onmove(handler), onrelease(handler) -- set various mount event handlers reset() -- move the card out of sight, face down, and reset all event handlers Public instance variables: color, suit, value -- the card's color, suit a... | Public read-only instance variables: suit, value, color -- the card's suit, value and color | def __init__(self, stack): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
Semi-public instance variables (XXX should be made private): | Semi-public read-only instance variables (XXX should be made private): | def __init__(self, stack): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
is reversed.) | is reversed. The card is created face down.) | def __init__(self, stack): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
def __init__(self, game, suit, value): | def __init__(self, suit, value, canvas): """Card constructor. Arguments are the card's suit and value, and the canvas widget. The card is created at position (0, 0), with its face down (adding it to a stack will position it according to that stack's rules). """ | def __init__(self, game, suit, value): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.value = value canvas = game.canvas | self.face_shown = 0 | def __init__(self, game, suit, value): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.__rect = Rectangle(canvas, 0, 0, CARDWIDTH, CARDHEIGHT, outline='black', fill='white') text = "%s %s" % (VALNAMES[value], suit) self.__text = CanvasText(canvas, CARDWIDTH/2, 0, anchor=N, fill=self.color, text=text) self.group = Group(canvas) | def __init__(self, game, suit, value): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
self.group.addtag_withtag(self.__rect) self.group.addtag_withtag(self.__text) self.reset() | def __init__(self, game, suit, value): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
return "Card(game, %s, %s)" % (`self.suit`, `self.value`) | """Return a string for debug print statements.""" return "Card(%s, %s)" % (`self.suit`, `self.value`) | def __repr__(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
dx = x - self.x dy = y - self.y | """Move the card to absolute position (x, y).""" self.moveby(x - self.x, y - self.y) def moveby(self, dx, dy): """Move the card by (dx, dy).""" self.x = self.x + dx self.y = self.y + dy | def moveto(self, x, y): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.x = x self.y = y def moveby(self, dx, dy): self.moveto(self.x + dx, self.y + dy) | def moveto(self, x, y): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
def turnover(self): if self.face_shown: self.showback() | class Stack: """A generic stack of cards. This is used as a base class for all other stacks (e.g. the deck, the suit stacks, and the row stacks). Public methods: add(card) -- add a card to the stack delete(card) -- delete a card from the stack showtop() -- show the top card (if any) face up deal() -- delete and re... | def turnover(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.showface() def onclick(self, handler): self.group.bind('<1>', handler) def ondouble(self, handler): self.group.bind('<Double-1>', handler) def onmove(self, handler): self.group.bind('<B1-Motion>', handler) def onrelease(self, handler): self.group.bind('<ButtonRelease-1>', handler) def reset(self): self.moveto... | return if not card.face_shown: return self.moving = self.cards[i:] self.lastx = event.x self.lasty = event.y for card in self.moving: card.tkraise() def keepmoving(self, event): if not self.moving: return dx = event.x - self.lastx dy = event.y - self.lasty self.lastx = event.x self.lasty = event.y if dx or dy: for car... | def turnover(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.allcards.append(Card(self.game, suit, value)) self.reset() | self.add(Card(suit, value, self.game.canvas)) | def __init__(self, game): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
def deal(self): card = self.cards[-1] del self.cards[-1] return card def accept(self, card): if card not in self.cards: self.cards.append(card) def reset(self): self.cards = self.allcards[:] for card in self.cards: card.reset() | def userclickhandler(self): opendeck = self.game.opendeck card = self.deal() if not card: while 1: card = opendeck.deal() if not card: break self.add(card) card.showback() else: self.game.opendeck.add(card) card.showface() | def deal(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
class Stack: x = MARGIN y = MARGIN def __init__(self, game): self.game = game self.cards = [] def __repr__(self): return "<Stack at (%d, %d)>" % (self.x, self.y) def reset(self): self.cards = [] def acceptable(self, cards): return 1 def accept(self, card): self.cards.append(card) card.onclick(self.clickhandler) c... | class OpenStack(Stack): def usermovehandler(self, cards): card = cards[0] stack = self.game.closeststack(card) if not stack or stack is self or not stack.acceptable(cards): Stack.usermovehandler(self, cards) else: for card in cards: self.delete(card) stack.add(card) self.game.wincheck() def userdoubleclickhandler(se... | def randperm(n): r = range(n) x = [] while r: i = random.choice(r) x.append(i) r.remove(i) return x | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.game.turned.accept(card) del self.cards[-1] card.showface() def bottomhandler(self, event): cards = self.game.turned.cards cards.reverse() for card in cards: card.showback() self.accept(card) self.game.turned.reset() class MovingStack(Stack): thecards = None theindex = None def clickhandler(self, event): self.... | if not card.face_shown: self.userclickhandler() | def releasehandler(self, event): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
tag = tags[0] for i in range(len(self.cards)): card = self.cards[i] if tag == str(card.group): | for s in self.game.suits: if s.acceptable([card]): self.delete(card) s.add(card) self.game.wincheck() | def clickhandler(self, event): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
else: return self.theindex = i self.thecards = Group(self.game.canvas) for card in self.cards[i:]: self.thecards.addtag_withtag(card.group) self.thecards.tkraise() self.lastx = self.firstx = event.x self.lasty = self.firsty = event.y def movehandler(self, event): if not self.thecards: return card = self.cards[self.the... | class SuitStack(OpenStack): def makebottom(self): bottom = Rectangle(self.game.canvas, self.x, self.y, self.x+CARDWIDTH, self.y+CARDHEIGHT, outline='black', fill='') def userclickhandler(self): pass def userdoubleclickhandler(self): pass | def clickhandler(self, event): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
if not card.face_shown: return 0 | def acceptable(self, cards): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
if not topcard.face_shown: return 0 | def acceptable(self, cards): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
def doublehandler(self, event): pass def accept(self, card): MovingStack.accept(self, card) if card.value == KING: for s in self.game.suits: card = s.cards[-1] if card.value != KING: return self.game.win() self.game.deal() class RowStack(MovingStack): def __init__(self, game, i): self.index = i self.x = MARGIN + XS... | class RowStack(OpenStack): | def doublehandler(self, event): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
if not card.face_shown: return 0 | def acceptable(self, cards): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
if card.value != topcard.value - 1: return 0 if card.color == topcard.color: return 0 return 1 | return card.color != topcard.color and card.value == topcard.value - 1 def position(self, card): y = self.y for c in self.cards: if c == card: break if c.face_shown: y = y + 2*MARGIN else: y = y + OFFSET card.moveto(self.x, y) | def acceptable(self, cards): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.buttonframe = Frame(self.master, background=BACKGROUND) self.buttonframe.pack(fill=X) self.dealbutton = Button(self.buttonframe, | self.canvas = Canvas(self.master, background=BACKGROUND, highlightthickness=0, width=NROWS*XSPACING, height=3*YSPACING + 20 + MARGIN) self.canvas.pack(fill=BOTH, expand=TRUE) self.dealbutton = Button(self.canvas, | def __init__(self, master): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.dealbutton.pack(side=LEFT) self.canvas = Canvas(self.master, background=BACKGROUND, highlightthickness=0, width=NROWS*XSPACING, height=3*YSPACING) self.canvas.pack(fill=BOTH, expand=TRUE) self.deck = Deck(self) | Window(self.canvas, MARGIN, 3*YSPACING + 20, window=self.dealbutton, anchor=SW) x = MARGIN y = MARGIN self.deck = Deck(x, y, self) x = x + XSPACING self.opendeck = OpenStack(x, y, self) | def __init__(self, master): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.pool = PoolStack(self) self.turned = TurnedStack(self) | x = x + XSPACING | def __init__(self, master): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.suits.append(SuitStack(self, i)) | x = x + XSPACING self.suits.append(SuitStack(x, y, self)) x = MARGIN y = y + YSPACING | def __init__(self, master): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.rows.append(RowStack(self, i)) | self.rows.append(RowStack(x, y, self)) x = x + XSPACING | def __init__(self, master): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
cards = self.deck.allcards | cards = [] for s in self.suits: cards = cards + s.cards if not cards: return | def win(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
def reset(self): self.pool.reset() self.turned.reset() for stack in self.rows + self.suits: stack.reset() self.deck.reset() | def reset(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py | |
r.accept(card) | r.add(card) | def deal(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
try: | def reset(self): for stack in [self.opendeck] + self.suits + self.rows: | def deal(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
self.pool.accept(self.deck.deal()) except IndexError: pass | card = stack.deal() if not card: break self.deck.add(card) card.showback() | def deal(self): | 20ce2dd6aa77ea628b49c0c6b820d66211a9a61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20ce2dd6aa77ea628b49c0c6b820d66211a9a61d/solitaire.py |
if y.hasattr('__setstate__'): | if hasattr(y, '__setstate__'): | def _copy_inst(x): if hasattr(x, '__copy__'): return x.__copy__() if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() else: args = () y = apply(x.__class__, args) if hasattr(x, '__getstate__'): state = x.__getstate__() else: state = x.__dict__ if y.hasattr('__setstate__'): y.__setstate__(state) else: for key i... | c09878e3296d35d20826bed0902ac7b299db8419 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c09878e3296d35d20826bed0902ac7b299db8419/copy.py |
if y.hasattr('__setstate__'): | if hasattr(y, '__setstate__'): | def _deepcopy_inst(x, memo): if hasattr(x, '__deepcopy__'): return x.__deepcopy__() if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() args = deepcopy(args, memo) else: args = () y = apply(x.__class__, args) memo[id(x)] = y if hasattr(x, '__getstate__'): state = x.__getstate__() else: state = x.__dict__ state... | c09878e3296d35d20826bed0902ac7b299db8419 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c09878e3296d35d20826bed0902ac7b299db8419/copy.py |
def build_extensions (self, extensions): | 2626a17a8d5576a7869bd17cd3ff4e162aa85372 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2626a17a8d5576a7869bd17cd3ff4e162aa85372/build_ext.py | ||
libraries, library_dirs) | libraries, library_dirs, build_info) | def build_extensions (self, extensions): | 2626a17a8d5576a7869bd17cd3ff4e162aa85372 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2626a17a8d5576a7869bd17cd3ff4e162aa85372/build_ext.py |
import Scrap | from Carbon import Scrap | def domenu_copy(self, *args): sel = self.getselectedobjects() selitems = [] for key, value, dummy, dummy in sel: selitems.append(double_repr(key, value)) text = string.join(selitems, '\r') if text: import Scrap Scrap.ZeroScrap() Scrap.PutScrap('TEXT', text) | 6ac3dcb57e304952ee904329ba39c67107b9092b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ac3dcb57e304952ee904329ba39c67107b9092b/PyBrowser.py |
self.checkequal(('http://www.python.org', '', ''), S, 'rpartition', '?') | self.checkequal(('', '', 'http://www.python.org'), S, 'rpartition', '?') | def test_rpartition(self): | 39db609f0f07a68f556e0f04c32ba81434aed23d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/39db609f0f07a68f556e0f04c32ba81434aed23d/string_tests.py |
host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))).strip() req.add_header('Proxy-authorization', 'Basic ' + user_pass) | if not type or r_type.isdigit(): type = orig_type host = proxy else: host, r_host = splithost(r_type) user_pass, host = splituser(host) user, password = splitpasswd(user_pass) if user and password: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))).st... | def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))... | 0ad5445d432c3a8a059bea614705456f9de80f00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ad5445d432c3a8a059bea614705456f9de80f00/urllib2.py |
self.d.GetDialogWindow().ShowWindow() | self.w.ShowWindow() | def __init__(self, title="Working...", maxval=100, label="", id=263): self.maxval = maxval self.curval = -1 self.d = GetNewDialog(id, -1) self.label(label) self._update(0) self.d.AutoSizeDialog() self.title(title) self.d.GetDialogWindow().ShowWindow() self.d.DrawDialog() | 0bcf9416d9970e28428dd0af7801902cd5398c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0bcf9416d9970e28428dd0af7801902cd5398c1e/EasyDialogs.py |
self.d.BringToFront() self.d.HideWindow() | self.w.BringToFront() self.w.HideWindow() del self.w | def __del__( self ): self.d.BringToFront() self.d.HideWindow() del self.d | 0bcf9416d9970e28428dd0af7801902cd5398c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0bcf9416d9970e28428dd0af7801902cd5398c1e/EasyDialogs.py |
w = self.d.GetDialogWindow() w.BringToFront() w.SetWTitle(newstr) | self.w.BringToFront() self.w.SetWTitle(newstr) | def title(self, newstr=""): """title(text) - Set title of progress window""" w = self.d.GetDialogWindow() w.BringToFront() w.SetWTitle(newstr) | 0bcf9416d9970e28428dd0af7801902cd5398c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0bcf9416d9970e28428dd0af7801902cd5398c1e/EasyDialogs.py |
self.d.GetDialogWindow().BringToFront() | self.w.BringToFront() | def label( self, *newstr ): """label(text) - Set text in progress box""" self.d.GetDialogWindow().BringToFront() if newstr: self._label = lf2cr(newstr[0]) text_h = self.d.GetDialogItemAsControl(2) SetDialogItemText(text_h, self._label) | 0bcf9416d9970e28428dd0af7801902cd5398c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0bcf9416d9970e28428dd0af7801902cd5398c1e/EasyDialogs.py |
return "-R" + dir | compiler = os.path.basename(sysconfig.get_config_var("CC")) if compiler == "gcc" or compiler == "g++": return "-Wl,-R" + dir else: return "-R" + dir | def runtime_library_dir_option (self, dir): return "-R" + dir | c8af4420f0ea3e6d97b6f2350e6fe000bdcd8bbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8af4420f0ea3e6d97b6f2350e6fe000bdcd8bbd/unixccompiler.py |
tarinfo = self.tarfile.next() if not tarinfo: self.tarfile._loaded = True raise StopIteration | if not self.tarfile._loaded: tarinfo = self.tarfile.next() if not tarinfo: self.tarfile._loaded = True raise StopIteration else: try: tarinfo = self.tarfile.members[self.index] except IndexError: raise StopIteration self.index += 1 | def next(self): """Return the next item using TarFile's next() method. When all members have been read, set TarFile as _loaded. """ tarinfo = self.tarfile.next() if not tarinfo: self.tarfile._loaded = True raise StopIteration return tarinfo | 7f2b9cd3f3dd53b10719e62aeb94b417e0b12307 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7f2b9cd3f3dd53b10719e62aeb94b417e0b12307/tarfile.py |
print "reinitialize_command: command=%s" % command print " before: have_run =", self.have_run | def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied value... | 7c04d132f40e66010904dda5acf76c7e6460cdac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c04d132f40e66010904dda5acf76c7e6460cdac/dist.py | |
print " after: have_run =", self.have_run | def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied value... | 7c04d132f40e66010904dda5acf76c7e6460cdac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c04d132f40e66010904dda5acf76c7e6460cdac/dist.py | |
print (" reinitializing sub-commands: %s" % command.get_sub_commands()) | def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied value... | 7c04d132f40e66010904dda5acf76c7e6460cdac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c04d132f40e66010904dda5acf76c7e6460cdac/dist.py | |
if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") | try: if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: raise DistutilsPlatformError, \ ("The .NET Framework SDK needs to be installed before " "building extensions for Python.") | def load_macros(self, version): vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot")... | dbe9df771b52068510777bb73fbdcf6915e2aa80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dbe9df771b52068510777bb73fbdcf6915e2aa80/msvccompiler.py |
ad = self.getaddress() if ad: return ad + self.getaddrlist() else: return [] | result = [] while 1: ad = self.getaddress() if ad: result += ad else: break return result | def getaddrlist(self): """Parse all addresses. | 02c9f8b0ef4318089fe5161c8fbdb951c85adfa5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/02c9f8b0ef4318089fe5161c8fbdb951c85adfa5/rfc822.py |
dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) | dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) | def _testElementReprAndStrUnicodeNS(): dom=Document() el=dom.appendChild( dom.createElementNS( u"http://www.slashdot.org", u"slash:abc" )) string1=repr( el ) string2=str( el ) confirm( string1==string2 ) confirm( string1.find("slash:abc" )!=-1 ) dom.unlink() | a933e5bb7cfa887eaef94ae2f388a23d4550fdda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a933e5bb7cfa887eaef94ae2f388a23d4550fdda/test_minidom.py |
fullurl = unwrap(fullurl) | fullurl = unwrap(toBytes(fullurl)) | def open(self, fullurl, data=None): """Use URLopener().open(file) instead of open(file, 'r').""" fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) i... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
type, url = splittype(fullurl) if not type: type = 'file' if self.proxies.has_key(type): proxy = self.proxies[type] type, proxyhost = splittype(proxy) | urltype, url = splittype(fullurl) if not urltype: urltype = 'file' if self.proxies.has_key(urltype): proxy = self.proxies[urltype] urltype, proxyhost = splittype(proxy) | def open(self, fullurl, data=None): """Use URLopener().open(file) instead of open(file, 'r').""" fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) i... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
name = 'open_' + type self.type = type | name = 'open_' + urltype self.type = urltype | def open(self, fullurl, data=None): """Use URLopener().open(file) instead of open(file, 'r').""" fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) i... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
url = unwrap(url) | url = unwrap(toBytes(url)) | def retrieve(self, url, filename=None, reporthook=None, data=None): """retrieve(url) returns (filename, None) for a local object or (tempfilename, headers) for a remote object.""" url = unwrap(url) if self.tempcache and self.tempcache.has_key(url): return self.tempcache[url] type, url1 = splittype(url) if not filename ... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
if type(url) is type(""): | if type(url) is types.StringType: | def open_http(self, url, data=None): """Use HTTP protocol.""" import httplib user_passwd = None if type(url) is type(""): 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 user_passw... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
if type(url) is type(""): | if type(url) in types.StringTypes: | def open_https(self, url, data=None): """Use HTTPS protocol.""" import httplib user_passwd = None if type(url) is type(""): 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 user_pas... | 981256a54299a948f48723a9867f77f575ad3634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/981256a54299a948f48723a9867f77f575ad3634/urllib.py |
if os.sep != '/' and os.sep in pathname: raise ValueError, \ "path '%s' cannot contain '%c' character" % \ (pathname, os.sep) paths = string.split (pathname, '/') return apply (os.path.join, paths) | if os.sep != '/': if os.sep in pathname: raise ValueError, \ "path '%s' cannot contain '%c' character" % (pathname, os.sep) else: paths = string.split (pathname, '/') return apply (os.path.join, paths) | def native_path (pathname): """Return 'pathname' as a name that will work on the native filesystem, i.e. split it on '/' and put it back together again using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local convention... | 7b21461ca7a04b276cd685ba319a6b8cc3cbaed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7b21461ca7a04b276cd685ba319a6b8cc3cbaed4/util.py |
return s[:1] == '/' | return s.startswith('/') | def isabs(s): """Test whether a path is absolute""" return s[:1] == '/' | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
if b[:1] == '/': | if b.startswith('/'): | def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
elif path == '' or path[-1:] == '/': path = path + b | elif path == '' or path.endswith('/'): path += b | def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
path = path + '/' + b | path += '/' + b | def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
while head[-1] == '/': head = head[:-1] | head = head.rstrip('/') | def split(p): """Split a pathname. Returns tuple "(head, tail)" where "tail" is everything after the final slash. Either part may be empty.""" i = p.rfind('/') + 1 head, tail = p[:i], p[i:] if head and head != '/'*len(head): while head[-1] == '/': head = head[:-1] return head, tail | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
if i == 0: return '' | if i == 0: return '' | def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
if path[:1] != '~': | if not path.startswith('~'): | def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
i = i + 1 | i += 1 | def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
userhome = pwd.getpwuid(os.getuid())[5] | userhome = pwd.getpwuid(os.getuid()).pw_dir | def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
userhome = pwent[5] if userhome[-1:] == '/': i = i + 1 | userhome = pwent.pw_dir if userhome.endswith('/'): i += 1 | def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HO... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
if name[:1] == '{' and name[-1:] == '}': | if name.startswith('{') and name.endswith('}'): | def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables are left unchanged.""" global _varprog if '$' not in path: return path if not _varprog: import re _varprog = re.compile(r'\$(\w+|\{[^}]*\})') i = 0 while True: m = _varprog.search(path, i) if not m: break i, j = m.span(0) name =... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
path = path + tail | path += tail | def expandvars(path): """Expand shell variables of form $var and ${var}. Unknown variables are left unchanged.""" global _varprog if '$' not in path: return path if not _varprog: import re _varprog = re.compile(r'\$(\w+|\{[^}]*\})') i = 0 while True: m = _varprog.search(path, i) if not m: break i, j = m.span(0) name =... | c95a55943ea1c83ad71e85b7a460d2a68ebd2eee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c95a55943ea1c83ad71e85b7a460d2a68ebd2eee/posixpath.py |
main() | def testtype(type, example): a = array.array(type) a.append(example) if verbose: print 40*'*' print 'array after append: ', a a.typecode a.itemsize if a.typecode in ('i', 'b', 'h', 'l'): a.byteswap() if a.typecode == 'c': f = open(TESTFN, "w") f.write("The quick brown fox jumps over the lazy dog.\n") f.close() f = op... | 1b0c7f2fe597c14db2a3ce4cb2d2c772cc721d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1b0c7f2fe597c14db2a3ce4cb2d2c772cc721d33/test_array.py | |
def test_warning(self): warnings.filterwarnings("error", category=RuntimeWarning, message="mktemp") self.assertRaises(RuntimeWarning, tempfile.mktemp, (), { 'dir': self.dir }) | def test_warning(self): # mktemp issues a warning when used warnings.filterwarnings("error", category=RuntimeWarning, message="mktemp") self.assertRaises(RuntimeWarning, tempfile.mktemp, (), { 'dir': self.dir }) | f034dcabf6d9bcf0431f62f4785f61f543fadc07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f034dcabf6d9bcf0431f62f4785f61f543fadc07/test_tempfile.py | |
return self.socket.recvfrom(max_packet_size) | return self.socket.recvfrom(self.max_packet_size) | def get_request(self): | 8ed3d716934cf9753fa438aabddd4c52e382dfb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8ed3d716934cf9753fa438aabddd4c52e382dfb7/SocketServer.py |
def _split(self, s, charset, firstline=False): # Split up a header safely for use with encode_chunks. BAW: this # appears to be a private convenience method. splittable = charset.to_splittable(s) encoded = charset.from_splittable(splittable) elen = charset.encoded_header_len(encoded) | 2746831de5545348b57989f201fbded791657748 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2746831de5545348b57989f201fbded791657748/Header.py | ||
host, port = splitport(host) if port is None: port = ftplib.FTP_PORT user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = unquote(host) user = unquote(user or '') passwd = unquote(passwd or '') | 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... | c27cb135d358501f2a6358e5ef5e7d2a1948b11c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c27cb135d358501f2a6358e5ef5e7d2a1948b11c/urllib2.py | |
host, port = splitport(host) if port is None: port = ftplib.FTP_PORT | 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... | c27cb135d358501f2a6358e5ef5e7d2a1948b11c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c27cb135d358501f2a6358e5ef5e7d2a1948b11c/urllib2.py | |
user = passwd = '' | 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... | c27cb135d358501f2a6358e5ef5e7d2a1948b11c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c27cb135d358501f2a6358e5ef5e7d2a1948b11c/urllib2.py | |
print " setting options:" for (option, (source, value)) in options.items(): print " %s = %s (from %s)" % (option, value, source) if not hasattr(cmd_obj, option): raise DistutilsOptionError, \ ("%s: command '%s' has no such option '%s'") % \ (source, command, option) setattr(cmd_obj, option, value) | self._set_command_options(cmd_obj, options) | def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ cmd_obj = self.command_ob... | b5c8ca95214606762bed76667c51849737c46adf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b5c8ca95214606762bed76667c51849737c46adf/dist.py |
return EOFError, "Reached EOF" | raise EOFError, "Reached EOF" | def _read(self, size=1024): if self.fileobj is None: raise EOFError, "Reached EOF" | 599bf5ef8adfe3306b098638c06c335e76c78b24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/599bf5ef8adfe3306b098638c06c335e76c78b24/gzip.py |
install = self.reinitialize_command('install') | install = self.reinitialize_command('install', reinit_subcommands=1) | def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | cec65938d800499688d8b2c5d6c6a0e63f54db63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cec65938d800499688d8b2c5d6c6a0e63f54db63/bdist_wininst.py |
prefix = PREFIX | prefix = None | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
opts, args = getopt.getopt(sys.argv[1:], 'e:p:P:') | opts, args = getopt.getopt(sys.argv[1:], 'e:o:p:P:') | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
if exec_prefix is None: exec_prefix = EXEC_PREFIX if exec_prefix is None: | if not exec_prefix: if prefix: | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
binlib = os.path.join(exec_prefix, 'lib/python1.4/config') incldir = os.path.join(prefix, 'include/python1.4') | version = sys.version[:3] binlib = os.path.join(exec_prefix, 'lib/python%s/config' % version) incldir = os.path.join(prefix, 'include/python%s' % version) | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
files = ['$(OPT)', '$(LDFLAGS)', config_c, frozen_c] + \ | files = ['$(OPT)', '$(LDFLAGS)', base_config_c, base_frozen_c] + \ | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
makemakefile.makemakefile(outfp, somevars, files, target) | makemakefile.makemakefile(outfp, somevars, files, base_target) | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
print 'Now run make to build the target:', target | if odir: print 'Now run make in', odir, print 'to build the target:', base_target else: print 'Now run make to build the target:', base_target | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: o... | 1ef23af01200b5597684f183a54a806811b98f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ef23af01200b5597684f183a54a806811b98f42/freeze.py |
sys.stdout.flush() os.system("/depot/gnu/plat/bin/rlog -r %s </dev/null 2>&1" % self.name) | p = os.popen("/depot/gnu/plat/bin/rlog -r %s </dev/null 2>&1" % self.name) output = p.read() p.close() print cgi.escape(output) | def do_info(self): | 6245eb2d27f293881257f927c77ba0f68974b7b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6245eb2d27f293881257f927c77ba0f68974b7b1/faqmain.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.