Skip to content

Instantly share code, notes, and snippets.

@shanehull
Last active July 7, 2021 04:31
Show Gist options
  • Save shanehull/09427c02944f5111822c767197d84cf7 to your computer and use it in GitHub Desktop.
Save shanehull/09427c02944f5111822c767197d84cf7 to your computer and use it in GitHub Desktop.
Trace of issue when resampleing IB data.
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
dataseries.py(185): return o == o # False if NaN, True in other cases
resamplerfilter.py(527): if cond: # original is and, the 2nd term must also be true
resamplerfilter.py(528): if not onedge: # onedge true is sufficient
resamplerfilter.py(529): if docheckover:
resamplerfilter.py(530): cond = self._checkbarover(data, fromcheck=fromcheck,
resamplerfilter.py(531): forcedata=forcedata)
resamplerfilter.py(530): cond = self._checkbarover(data, fromcheck=fromcheck,
--- modulename: resamplerfilter, funcname: _checkbarover
resamplerfilter.py(143): chkdata = DTFaker(data, forcedata) if fromcheck else data
resamplerfilter.py(145): isover = False
resamplerfilter.py(146): if not self.componly and not self._barover(chkdata):
resamplerfilter.py(149): if self.subdays and self.p.bar2edge:
resamplerfilter.py(151): elif not fromcheck: # fromcheck doesn't increase compcount
resamplerfilter.py(152): self.compcount += 1
resamplerfilter.py(153): if not (self.compcount % self.p.compression):
resamplerfilter.py(155): isover = True
resamplerfilter.py(157): return isover
resamplerfilter.py(532): if cond:
resamplerfilter.py(533): dodeliver = False
resamplerfilter.py(534): if forcedata is not None:
resamplerfilter.py(546): dodeliver = True
resamplerfilter.py(548): if dodeliver:
resamplerfilter.py(549): if not onedge and self.doadjusttime:
resamplerfilter.py(550): self._adjusttime(greater=True, forcedata=forcedata)
--- modulename: resamplerfilter, funcname: _adjusttime
resamplerfilter.py(427): dtnum = self._calcadjtime(greater=greater)
--- modulename: resamplerfilter, funcname: _calcadjtime
resamplerfilter.py(363): if self._nexteos is None:
resamplerfilter.py(365): return self._lastdteos # utc-like
resamplerfilter.py(428): if greater and dtnum <= self.bar.datetime:
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
resamplerfilter.py(431): self.bar.datetime = dtnum
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
resamplerfilter.py(432): return True
resamplerfilter.py(552): data._add2stack(self.bar.lvalues())
--- modulename: autodict, funcname: lvalues
autodict.py(145): return py3lvalues(self)
--- modulename: py3, funcname: values
py3.py(116): def values(d): return list(d.values())
--- modulename: feed, funcname: _add2stack
feed.py(542): if not stash:
feed.py(543): self._barstack.append(bar)
resamplerfilter.py(553): self.bar.bstart(maxdate=True) # bar delivered -> restart
--- modulename: dataseries, funcname: bstart
dataseries.py(170): self.close = float('NaN')
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(171): self.low = float('inf')
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(172): self.high = float('-inf')
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(173): self.open = float('NaN')
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(174): self.volume = 0.0
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(175): self.openinterest = 0.0
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
dataseries.py(176): self.datetime = self.MAXDATE if maxdate else None
--- modulename: autodict, funcname: __setattr__
autodict.py(107): if key.startswith('_'):
autodict.py(111): self[key] = value
resamplerfilter.py(555): if not fromcheck:
resamplerfilter.py(556): if not consumed:
resamplerfilter.py(560): return True
feed.py(525): if retff: # bar removed from systemn
feed.py(526): break # out of the inner loop
feed.py(528): if retff: # bar removed from system - loop to get new bar
feed.py(529): continue # in the greater loop
feed.py(473): self.forward()
--- modulename: lineseries, funcname: forward
lineseries.py(554): self.lines.forward(value, size)
--- modulename: lineseries, funcname: forward
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
feed.py(475): if self._fromstack(): # bar is available
--- modulename: feed, funcname: _fromstack
feed.py(578): coll = self._barstack if not stash else self._barstash
feed.py(580): if coll:
feed.py(581): if forward:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
--- modulename: lineseries, funcname: __getattr__
lineseries.py(461): return getattr(self.lines, name)
--- modulename: lineseries, funcname: itersize
lineseries.py(197): return iter(self.lines[0:self.size()])
--- modulename: lineseries, funcname: size
lineseries.py(223): return len(self.lines) - self._getlinesextra()
--- modulename: lineseries, funcname: <lambda>
lineseries.py(148): classmethod(lambda cls: clsextralines))
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(585): line[0] = val
--- modulename: linebuffer, funcname: __setitem__
linebuffer.py(222): self.array[self.idx + ago] = value
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(223): for binding in self.bindings:
feed.py(584): for line, val in zip(self.itersize(), coll.popleft()):
feed.py(587): return True
feed.py(476): return True
feed.py(408): if not ret:
feed.py(412): if datamaster is None:
feed.py(414): if ticks:
feed.py(416): return ret
cerebro.py(1539): for d in datas:
cerebro.py(1544): d0ret = any((dret for dret in drets))
--- modulename: cerebro, funcname: <genexpr>
cerebro.py(1544): d0ret = any((dret for dret in drets))
--- modulename: cerebro, funcname: <genexpr>
cerebro.py(1544): d0ret = any((dret for dret in drets))
--- modulename: cerebro, funcname: <genexpr>
cerebro.py(1545): if not d0ret and any((dret is None for dret in drets)):
cerebro.py(1548): if d0ret:
cerebro.py(1549): dts = []
cerebro.py(1550): for i, ret in enumerate(drets):
cerebro.py(1551): dts.append(datas[i].datetime[0] if ret else None)
cerebro.py(1550): for i, ret in enumerate(drets):
cerebro.py(1551): dts.append(datas[i].datetime[0] if ret else None)
--- modulename: lineseries, funcname: __getattr__
lineseries.py(461): return getattr(self.lines, name)
--- modulename: lineseries, funcname: __get__
lineseries.py(62): return obj.lines[self.line]
--- modulename: linebuffer, funcname: __getitem__
linebuffer.py(163): return self.array[self.idx + ago]
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
cerebro.py(1550): for i, ret in enumerate(drets):
cerebro.py(1554): if onlyresample or noresample:
cerebro.py(1555): dt0 = min((d for d in dts if d is not None))
--- modulename: cerebro, funcname: <genexpr>
cerebro.py(1555): dt0 = min((d for d in dts if d is not None))
cerebro.py(1555): dt0 = min((d for d in dts if d is not None))
--- modulename: cerebro, funcname: <genexpr>
cerebro.py(1555): dt0 = min((d for d in dts if d is not None))
cerebro.py(1560): dmaster = datas[dts.index(dt0)] # and timemaster
cerebro.py(1561): self._dtmaster = dmaster.num2date(dt0)
--- modulename: feed, funcname: num2date
feed.py(253): if dt is None:
feed.py(256): return num2date(dt, tz or self._tz, naive)
--- modulename: dateintern, funcname: num2date
dateintern.py(165): ix = int(x)
dateintern.py(166): dt = datetime.datetime.fromordinal(ix)
dateintern.py(167): remainder = float(x) - ix
dateintern.py(168): hour, remainder = divmod(HOURS_PER_DAY * remainder, 1)
dateintern.py(169): minute, remainder = divmod(MINUTES_PER_HOUR * remainder, 1)
dateintern.py(170): second, remainder = divmod(SECONDS_PER_MINUTE * remainder, 1)
dateintern.py(171): microsecond = int(MUSECONDS_PER_SECOND * remainder)
dateintern.py(172): if microsecond < 10:
dateintern.py(173): microsecond = 0 # compensate for rounding errors
dateintern.py(175): if True and tz is not None:
dateintern.py(176): dt = datetime.datetime(
dateintern.py(177): dt.year, dt.month, dt.day, int(hour), int(minute), int(second),
dateintern.py(178): microsecond, tzinfo=UTC)
dateintern.py(176): dt = datetime.datetime(
dateintern.py(179): dt = dt.astimezone(tz)
--- modulename: dateintern, funcname: utcoffset
dateintern.py(91): return ZERO
--- modulename: tzinfo, funcname: fromutc
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(196): getattr(dt.tzinfo, '_tzinfos', None) is not self._tzinfos):
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(198): dt = dt.replace(tzinfo=None)
tzinfo.py(199): idx = max(0, bisect_right(self._utc_transition_times, dt) - 1)
tzinfo.py(200): inf = self._transition_info[idx]
tzinfo.py(201): return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
dateintern.py(180): if naive:
dateintern.py(181): dt = dt.replace(tzinfo=None)
dateintern.py(188): if microsecond > 999990: # compensate for rounding errors
dateintern.py(191): return dt
cerebro.py(1562): self._udtmaster = num2date(dt0)
--- modulename: dateintern, funcname: num2date
dateintern.py(165): ix = int(x)
dateintern.py(166): dt = datetime.datetime.fromordinal(ix)
dateintern.py(167): remainder = float(x) - ix
dateintern.py(168): hour, remainder = divmod(HOURS_PER_DAY * remainder, 1)
dateintern.py(169): minute, remainder = divmod(MINUTES_PER_HOUR * remainder, 1)
dateintern.py(170): second, remainder = divmod(SECONDS_PER_MINUTE * remainder, 1)
dateintern.py(171): microsecond = int(MUSECONDS_PER_SECOND * remainder)
dateintern.py(172): if microsecond < 10:
dateintern.py(173): microsecond = 0 # compensate for rounding errors
dateintern.py(175): if True and tz is not None:
dateintern.py(184): dt = datetime.datetime(
dateintern.py(185): dt.year, dt.month, dt.day, int(hour), int(minute), int(second),
dateintern.py(186): microsecond)
dateintern.py(184): dt = datetime.datetime(
dateintern.py(188): if microsecond > 999990: # compensate for rounding errors
dateintern.py(191): return dt
cerebro.py(1566): for i, ret in enumerate(drets):
cerebro.py(1567): if ret: # dts already contains a valid datetime for this i
cerebro.py(1571): d = datas[i]
cerebro.py(1572): d._check(forcedata=dmaster) # check to force output
--- modulename: feed, funcname: _check
feed.py(464): ret = 0
feed.py(465): for ff, fargs, fkwargs in self._filters:
feed.py(466): if not hasattr(ff, 'check'):
feed.py(468): ff.check(self, _forcedata=forcedata, *fargs, **fkwargs)
--- modulename: resamplerfilter, funcname: check
resamplerfilter.py(307): if not self.bar.isopen():
--- modulename: dataseries, funcname: isopen
dataseries.py(184): o = self.open
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
dataseries.py(185): return o == o # False if NaN, True in other cases
resamplerfilter.py(310): return self(data, fromcheck=True, forcedata=_forcedata)
--- modulename: resamplerfilter, funcname: __call__
resamplerfilter.py(497): consumed = False
resamplerfilter.py(498): onedge = False
resamplerfilter.py(499): docheckover = True
resamplerfilter.py(500): if not fromcheck:
resamplerfilter.py(521): if consumed:
resamplerfilter.py(526): cond = self.bar.isopen()
--- modulename: dataseries, funcname: isopen
dataseries.py(184): o = self.open
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
dataseries.py(185): return o == o # False if NaN, True in other cases
resamplerfilter.py(527): if cond: # original is and, the 2nd term must also be true
resamplerfilter.py(528): if not onedge: # onedge true is sufficient
resamplerfilter.py(529): if docheckover:
resamplerfilter.py(530): cond = self._checkbarover(data, fromcheck=fromcheck,
resamplerfilter.py(531): forcedata=forcedata)
resamplerfilter.py(530): cond = self._checkbarover(data, fromcheck=fromcheck,
--- modulename: resamplerfilter, funcname: _checkbarover
resamplerfilter.py(143): chkdata = DTFaker(data, forcedata) if fromcheck else data
--- modulename: resamplerfilter, funcname: __init__
resamplerfilter.py(48): self.data = data
resamplerfilter.py(51): self.datetime = self
resamplerfilter.py(52): self.p = self
resamplerfilter.py(54): if forcedata is None:
resamplerfilter.py(59): self._dt = forcedata.datetime[0] # utc-like time
--- modulename: lineseries, funcname: __getattr__
lineseries.py(461): return getattr(self.lines, name)
--- modulename: lineseries, funcname: __get__
lineseries.py(62): return obj.lines[self.line]
--- modulename: linebuffer, funcname: __getitem__
linebuffer.py(163): return self.array[self.idx + ago]
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
resamplerfilter.py(60): self._dtime = forcedata.datetime.datetime() # localized time
--- modulename: lineseries, funcname: __getattr__
lineseries.py(461): return getattr(self.lines, name)
--- modulename: lineseries, funcname: __get__
lineseries.py(62): return obj.lines[self.line]
--- modulename: linebuffer, funcname: datetime
linebuffer.py(387): return num2date(self.array[self.idx + ago],
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
linebuffer.py(388): tz=tz or self._tz, naive=naive)
linebuffer.py(387): return num2date(self.array[self.idx + ago],
--- modulename: dateintern, funcname: num2date
dateintern.py(165): ix = int(x)
dateintern.py(166): dt = datetime.datetime.fromordinal(ix)
dateintern.py(167): remainder = float(x) - ix
dateintern.py(168): hour, remainder = divmod(HOURS_PER_DAY * remainder, 1)
dateintern.py(169): minute, remainder = divmod(MINUTES_PER_HOUR * remainder, 1)
dateintern.py(170): second, remainder = divmod(SECONDS_PER_MINUTE * remainder, 1)
dateintern.py(171): microsecond = int(MUSECONDS_PER_SECOND * remainder)
dateintern.py(172): if microsecond < 10:
dateintern.py(173): microsecond = 0 # compensate for rounding errors
dateintern.py(175): if True and tz is not None:
dateintern.py(176): dt = datetime.datetime(
dateintern.py(177): dt.year, dt.month, dt.day, int(hour), int(minute), int(second),
dateintern.py(178): microsecond, tzinfo=UTC)
dateintern.py(176): dt = datetime.datetime(
dateintern.py(179): dt = dt.astimezone(tz)
--- modulename: dateintern, funcname: utcoffset
dateintern.py(91): return ZERO
--- modulename: tzinfo, funcname: fromutc
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(196): getattr(dt.tzinfo, '_tzinfos', None) is not self._tzinfos):
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(198): dt = dt.replace(tzinfo=None)
tzinfo.py(199): idx = max(0, bisect_right(self._utc_transition_times, dt) - 1)
tzinfo.py(200): inf = self._transition_info[idx]
tzinfo.py(201): return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
dateintern.py(180): if naive:
dateintern.py(181): dt = dt.replace(tzinfo=None)
dateintern.py(188): if microsecond > 999990: # compensate for rounding errors
dateintern.py(191): return dt
resamplerfilter.py(62): self.sessionend = data.p.sessionend
resamplerfilter.py(145): isover = False
resamplerfilter.py(146): if not self.componly and not self._barover(chkdata):
--- modulename: resamplerfilter, funcname: _barover
resamplerfilter.py(160): tframe = self.p.timeframe
resamplerfilter.py(162): if tframe == TimeFrame.Ticks:
resamplerfilter.py(166): elif tframe < TimeFrame.Days:
resamplerfilter.py(169): elif tframe == TimeFrame.Days:
resamplerfilter.py(170): return self._barover_days(data)
--- modulename: resamplerfilter, funcname: _barover_days
resamplerfilter.py(215): return self._eoscheck(data)
--- modulename: resamplerfilter, funcname: _eoscheck
resamplerfilter.py(187): if seteos:
resamplerfilter.py(188): self._eosset()
--- modulename: resamplerfilter, funcname: _eosset
resamplerfilter.py(182): if self._nexteos is None:
resamplerfilter.py(183): self._nexteos, self._nextdteos = self.data._getnexteos()
--- modulename: feed, funcname: _getnexteos
feed.py(213): if self._clone:
feed.py(216): if not len(self):
--- modulename: lineseries, funcname: __len__
lineseries.py(464): return len(self.lines)
--- modulename: lineseries, funcname: __len__
lineseries.py(220): return len(self.lines[0])
--- modulename: linebuffer, funcname: __len__
linebuffer.py(150): return self.lencount
feed.py(219): dt = self.lines.datetime[0]
--- modulename: lineseries, funcname: __get__
lineseries.py(62): return obj.lines[self.line]
--- modulename: linebuffer, funcname: __getitem__
linebuffer.py(163): return self.array[self.idx + ago]
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
feed.py(220): dtime = num2date(dt)
--- modulename: dateintern, funcname: num2date
dateintern.py(165): ix = int(x)
dateintern.py(166): dt = datetime.datetime.fromordinal(ix)
dateintern.py(167): remainder = float(x) - ix
dateintern.py(168): hour, remainder = divmod(HOURS_PER_DAY * remainder, 1)
dateintern.py(169): minute, remainder = divmod(MINUTES_PER_HOUR * remainder, 1)
dateintern.py(170): second, remainder = divmod(SECONDS_PER_MINUTE * remainder, 1)
dateintern.py(171): microsecond = int(MUSECONDS_PER_SECOND * remainder)
dateintern.py(172): if microsecond < 10:
dateintern.py(173): microsecond = 0 # compensate for rounding errors
dateintern.py(175): if True and tz is not None:
dateintern.py(184): dt = datetime.datetime(
dateintern.py(185): dt.year, dt.month, dt.day, int(hour), int(minute), int(second),
dateintern.py(186): microsecond)
dateintern.py(184): dt = datetime.datetime(
dateintern.py(188): if microsecond > 999990: # compensate for rounding errors
dateintern.py(191): return dt
feed.py(221): if self._calendar is None:
feed.py(222): nexteos = datetime.datetime.combine(dtime, self.p.sessionend)
feed.py(223): nextdteos = self.date2num(nexteos) # locl'ed -> utc-like
--- modulename: feed, funcname: date2num
feed.py(247): if self._tz is not None:
feed.py(248): return date2num(self._tz.localize(dt))
--- modulename: tzinfo, funcname: localize
tzinfo.py(317): if dt.tzinfo is not None:
tzinfo.py(321): possible_loc_dt = set()
tzinfo.py(322): for delta in [timedelta(days=-1), timedelta(days=1)]:
tzinfo.py(323): loc_dt = dt + delta
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(325): self._utc_transition_times, loc_dt) - 1)
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(325): self._utc_transition_times, loc_dt) - 1)
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(326): inf = self._transition_info[idx]
tzinfo.py(327): tzinfo = self._tzinfos[inf]
tzinfo.py(328): loc_dt = tzinfo.normalize(dt.replace(tzinfo=tzinfo))
--- modulename: tzinfo, funcname: normalize
tzinfo.py(248): if dt.tzinfo is None:
tzinfo.py(252): offset = dt.tzinfo._utcoffset
tzinfo.py(253): dt = dt.replace(tzinfo=None)
tzinfo.py(254): dt = dt - offset
tzinfo.py(256): return self.fromutc(dt)
--- modulename: tzinfo, funcname: fromutc
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(198): dt = dt.replace(tzinfo=None)
tzinfo.py(199): idx = max(0, bisect_right(self._utc_transition_times, dt) - 1)
tzinfo.py(200): inf = self._transition_info[idx]
tzinfo.py(201): return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
tzinfo.py(329): if loc_dt.replace(tzinfo=None) == dt:
tzinfo.py(330): possible_loc_dt.add(loc_dt)
--- modulename: tzinfo, funcname: utcoffset
tzinfo.py(419): if dt is None:
tzinfo.py(421): elif dt.tzinfo is not self:
tzinfo.py(425): return self._utcoffset
tzinfo.py(322): for delta in [timedelta(days=-1), timedelta(days=1)]:
tzinfo.py(323): loc_dt = dt + delta
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(325): self._utc_transition_times, loc_dt) - 1)
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(325): self._utc_transition_times, loc_dt) - 1)
tzinfo.py(324): idx = max(0, bisect_right(
tzinfo.py(326): inf = self._transition_info[idx]
tzinfo.py(327): tzinfo = self._tzinfos[inf]
tzinfo.py(328): loc_dt = tzinfo.normalize(dt.replace(tzinfo=tzinfo))
--- modulename: tzinfo, funcname: normalize
tzinfo.py(248): if dt.tzinfo is None:
tzinfo.py(252): offset = dt.tzinfo._utcoffset
tzinfo.py(253): dt = dt.replace(tzinfo=None)
tzinfo.py(254): dt = dt - offset
tzinfo.py(256): return self.fromutc(dt)
--- modulename: tzinfo, funcname: fromutc
tzinfo.py(195): if (dt.tzinfo is not None and
tzinfo.py(198): dt = dt.replace(tzinfo=None)
tzinfo.py(199): idx = max(0, bisect_right(self._utc_transition_times, dt) - 1)
tzinfo.py(200): inf = self._transition_info[idx]
tzinfo.py(201): return (dt + inf[0]).replace(tzinfo=self._tzinfos[inf])
tzinfo.py(329): if loc_dt.replace(tzinfo=None) == dt:
tzinfo.py(330): possible_loc_dt.add(loc_dt)
--- modulename: tzinfo, funcname: utcoffset
tzinfo.py(419): if dt is None:
tzinfo.py(421): elif dt.tzinfo is not self:
tzinfo.py(425): return self._utcoffset
tzinfo.py(322): for delta in [timedelta(days=-1), timedelta(days=1)]:
tzinfo.py(332): if len(possible_loc_dt) == 1:
tzinfo.py(333): return possible_loc_dt.pop()
--- modulename: dateintern, funcname: date2num
dateintern.py(208): if tz is not None:
dateintern.py(211): if hasattr(dt, 'tzinfo') and dt.tzinfo is not None:
dateintern.py(212): delta = dt.tzinfo.utcoffset(dt)
--- modulename: tzinfo, funcname: utcoffset
tzinfo.py(419): if dt is None:
tzinfo.py(421): elif dt.tzinfo is not self:
tzinfo.py(425): return self._utcoffset
dateintern.py(213): if delta is not None:
dateintern.py(214): dt -= delta
dateintern.py(216): base = float(dt.toordinal())
dateintern.py(217): if hasattr(dt, 'hour'):
dateintern.py(223): base = math.fsum(
dateintern.py(224): (base, dt.hour / HOURS_PER_DAY, dt.minute / MINUTES_PER_DAY,
dateintern.py(225): dt.second / SECONDS_PER_DAY, dt.microsecond / MUSECONDS_PER_DAY))
dateintern.py(224): (base, dt.hour / HOURS_PER_DAY, dt.minute / MINUTES_PER_DAY,
dateintern.py(223): base = math.fsum(
dateintern.py(227): return base
feed.py(224): nexteos = num2date(nextdteos) # utc
--- modulename: dateintern, funcname: num2date
dateintern.py(165): ix = int(x)
dateintern.py(166): dt = datetime.datetime.fromordinal(ix)
dateintern.py(167): remainder = float(x) - ix
dateintern.py(168): hour, remainder = divmod(HOURS_PER_DAY * remainder, 1)
dateintern.py(169): minute, remainder = divmod(MINUTES_PER_HOUR * remainder, 1)
dateintern.py(170): second, remainder = divmod(SECONDS_PER_MINUTE * remainder, 1)
dateintern.py(171): microsecond = int(MUSECONDS_PER_SECOND * remainder)
dateintern.py(172): if microsecond < 10:
dateintern.py(175): if True and tz is not None:
dateintern.py(184): dt = datetime.datetime(
dateintern.py(185): dt.year, dt.month, dt.day, int(hour), int(minute), int(second),
dateintern.py(186): microsecond)
dateintern.py(184): dt = datetime.datetime(
dateintern.py(188): if microsecond > 999990: # compensate for rounding errors
dateintern.py(189): dt += datetime.timedelta(microseconds=1e6 - microsecond)
dateintern.py(191): return dt
feed.py(225): while dtime > nexteos:
feed.py(228): nextdteos = date2num(nexteos) # -> utc-like
--- modulename: dateintern, funcname: date2num
dateintern.py(208): if tz is not None:
dateintern.py(211): if hasattr(dt, 'tzinfo') and dt.tzinfo is not None:
dateintern.py(216): base = float(dt.toordinal())
dateintern.py(217): if hasattr(dt, 'hour'):
dateintern.py(223): base = math.fsum(
dateintern.py(224): (base, dt.hour / HOURS_PER_DAY, dt.minute / MINUTES_PER_DAY,
dateintern.py(225): dt.second / SECONDS_PER_DAY, dt.microsecond / MUSECONDS_PER_DAY))
dateintern.py(224): (base, dt.hour / HOURS_PER_DAY, dt.minute / MINUTES_PER_DAY,
dateintern.py(223): base = math.fsum(
dateintern.py(227): return base
feed.py(235): return nexteos, nextdteos
resamplerfilter.py(184): return
resamplerfilter.py(190): equal = data.datetime[0] == self._nextdteos
--- modulename: resamplerfilter, funcname: __getitem__
resamplerfilter.py(84): return self._dt if idx == 0 else float('-inf')
resamplerfilter.py(191): grter = data.datetime[0] > self._nextdteos
--- modulename: resamplerfilter, funcname: __getitem__
resamplerfilter.py(84): return self._dt if idx == 0 else float('-inf')
resamplerfilter.py(193): if exact:
resamplerfilter.py(200): if grter:
resamplerfilter.py(201): ret = (self.bar.isopen() and
--- modulename: dataseries, funcname: isopen
dataseries.py(184): o = self.open
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
dataseries.py(185): return o == o # False if NaN, True in other cases
resamplerfilter.py(202): self.bar.datetime <= self._nextdteos)
--- modulename: autodict, funcname: __getattr__
autodict.py(101): if key.startswith('_'):
autodict.py(104): return self[key]
resamplerfilter.py(201): ret = (self.bar.isopen() and
resamplerfilter.py(206): if ret:
resamplerfilter.py(212): return ret
resamplerfilter.py(147): return isover
resamplerfilter.py(532): if cond:
resamplerfilter.py(555): if not fromcheck:
resamplerfilter.py(560): return True
feed.py(465): for ff, fargs, fkwargs in self._filters:
cerebro.py(1573): if d.next(datamaster=dmaster, ticks=False): # retry
--- modulename: feed, funcname: next
feed.py(402): if len(self) >= self.buflen():
--- modulename: lineseries, funcname: __len__
lineseries.py(464): return len(self.lines)
--- modulename: lineseries, funcname: __len__
lineseries.py(220): return len(self.lines[0])
--- modulename: linebuffer, funcname: __len__
linebuffer.py(150): return self.lencount
--- modulename: lineseries, funcname: __getattr__
lineseries.py(461): return getattr(self.lines, name)
--- modulename: lineseries, funcname: buflen
lineseries.py(302): return self.lines[line].buflen()
--- modulename: linebuffer, funcname: buflen
linebuffer.py(160): return len(self.array) - self.extension
feed.py(403): if ticks:
feed.py(407): ret = self.load()
--- modulename: feed, funcname: load
feed.py(473): self.forward()
--- modulename: lineseries, funcname: forward
lineseries.py(554): self.lines.forward(value, size)
--- modulename: lineseries, funcname: forward
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
lineseries.py(254): line.forward(value, size=size)
--- modulename: linebuffer, funcname: forward
linebuffer.py(254): self.idx += size
--- modulename: linebuffer, funcname: get_idx
linebuffer.py(83): return self._idx
--- modulename: linebuffer, funcname: set_idx
linebuffer.py(94): if self.mode == self.QBuffer:
linebuffer.py(98): self._idx = idx
linebuffer.py(255): self.lencount += size
linebuffer.py(257): for i in range(size):
linebuffer.py(258): self.array.append(value)
linebuffer.py(257): for i in range(size):
lineseries.py(253): for line in self.lines:
feed.py(475): if self._fromstack(): # bar is available
--- modulename: feed, funcname: _fromstack
feed.py(578): coll = self._barstack if not stash else self._barstash
feed.py(580): if coll:
feed.py(589): return False
feed.py(478): if not self._fromstack(stash=True):
--- modulename: feed, funcname: _fromstack
feed.py(578): coll = self._barstack if not stash else self._barstash
feed.py(580): if coll:
feed.py(589): return False
feed.py(479): _loadret = self._load()
--- modulename: ibdata, funcname: _load
ibdata.py(439): if self.contract is None or self._state == self._ST_OVER:
ibdata.py(443): if self._state == self._ST_LIVE:
ibdata.py(572): elif self._state == self._ST_HISTORBACK:
ibdata.py(573): msg = self.qhist.get()
--- modulename: queue, funcname: get
queue.py(165): with self.not_empty:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
queue.py(166): if not block:
queue.py(169): elif timeout is None:
queue.py(170): while not self._qsize():
--- modulename: queue, funcname: _qsize
queue.py(210): return len(self.queue)
queue.py(171): self.not_empty.wait()
--- modulename: threading, funcname: wait
threading.py(303): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(305): waiter = _allocate_lock()
threading.py(306): waiter.acquire()
threading.py(307): self._waiters.append(waiter)
threading.py(308): saved_state = self._release_save()
--- modulename: threading, funcname: _release_save
threading.py(266): self._lock.release() # No state to save
threading.py(309): gotit = False
threading.py(310): try: # restore state no matter what (e.g., KeyboardInterrupt)
threading.py(311): if timeout is None:
threading.py(312): waiter.acquire()
threading.py(319): return gotit
threading.py(321): self._acquire_restore(saved_state)
--- modulename: threading, funcname: _acquire_restore
threading.py(269): self._lock.acquire() # Ignore saved state
threading.py(322): if not gotit:
threading.py(323): try:
threading.py(324): self._waiters.remove(waiter)
threading.py(575): return signaled
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
threading.py(1265): if not self.finished.is_set():
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(1266): self.function(*self.args, **self.kwargs)
--- modulename: ibstore, funcname: reqCurrentTime
ibstore.py(557): self.conn.reqCurrentTime()
--- modulename: connection, funcname: __getattr__
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
--- modulename: sender, funcname: __getattr__
sender.py(66): try:
sender.py(67): value = getattr(self.client, name)
sender.py(70): if name not in self.clientMethodNames:
sender.py(72): return value
--- modulename: __init__, funcname: inner
__init__.py(58): lock.acquire()
__init__.py(59): try:
__init__.py(60): return func(*args, **kwds)
--- modulename: EClientSocket, funcname: reqCurrentTime
EClientSocket.py(1398): if not self.m_connected:
EClientSocket.py(1402): if self.m_serverVersion < 33:
EClientSocket.py(1405): VERSION = 1
EClientSocket.py(1406): try:
EClientSocket.py(1407): self.send(self.REQ_CURRENT_TIME)
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_3
EClientSocket.py(1765): self.send(str(val))
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_1
EClientSocket.py(1754): self.m_dos.write(val)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
EClientSocket.py(1755): self.sendEOL()
--- modulename: EClientSocket, funcname: sendEOL
EClientSocket.py(1744): self.m_dos.write(self.EOL)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(147): send(eol)
EClientSocket.py(1408): self.send(VERSION)
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_3
EClientSocket.py(1765): self.send(str(val))
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_1
EClientSocket.py(1754): self.m_dos.write(val)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
EClientSocket.py(1755): self.sendEOL()
--- modulename: EClientSocket, funcname: sendEOL
EClientSocket.py(1744): self.m_dos.write(self.EOL)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(147): send(eol)
__init__.py(62): lock.release()
__init__.py(60): return func(*args, **kwds)
threading.py(1267): self.finished.set()
--- modulename: threading, funcname: set
threading.py(542): with self._cond:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
threading.py(543): self._flag = True
threading.py(544): self._cond.notify_all()
--- modulename: threading, funcname: notify_all
threading.py(381): self.notify(len(self._waiters))
--- modulename: threading, funcname: notify
threading.py(361): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(363): all_waiters = self._waiters
threading.py(364): waiters_to_notify = _deque(_islice(all_waiters, n))
threading.py(365): if not waiters_to_notify:
threading.py(366): return
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
--- modulename: _weakrefset, funcname: _remove
_weakrefset.py(40): self = selfref()
_weakrefset.py(41): if self is not None:
_weakrefset.py(42): if self._iterating:
_weakrefset.py(45): self.data.discard(item)
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(897): break
EReader.py(900): strval = str(buf)
--- modulename: __init__, funcname: __str__
__init__.py(254): return join('', [chr(v) for v in self])
--- modulename: __init__, funcname: <listcomp>
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
EReader.py(901): return None if 0 == len(strval) else strval
EReader.py(911): return 0 if strval is None else Integer.parseInt(strval)
--- modulename: __init__, funcname: parseInt
__init__.py(188): return int(text or 0)
--- modulename: EReader, funcname: processMsg
EReader.py(123): if msgId == -1:
EReader.py(125): if msgId == self.TICK_PRICE:
EReader.py(154): elif msgId == self.TICK_SIZE:
EReader.py(160): elif msgId==self.POSITION:
EReader.py(181): elif msgId==self.POSITION_END:
EReader.py(184): elif msgId==self.ACCOUNT_SUMMARY:
EReader.py(192): elif msgId==self.ACCOUNT_SUMMARY_END:
EReader.py(196): elif msgId == self.TICK_OPTION_COMPUTATION:
EReader.py(234): elif msgId == self.TICK_GENERIC:
EReader.py(240): elif msgId == self.TICK_STRING:
EReader.py(246): elif msgId == self.TICK_EFP:
EReader.py(258): elif msgId == self.ORDER_STATUS:
EReader.py(281): elif msgId == self.ACCT_VALUE:
EReader.py(290): elif msgId == self.PORTFOLIO_VALUE:
EReader.py(324): elif msgId == self.ACCT_UPDATE_TIME:
EReader.py(328): elif msgId == self.ERR_MSG:
EReader.py(338): elif msgId == self.OPEN_ORDER:
EReader.py(566): elif msgId == self.NEXT_VALID_ID:
EReader.py(570): elif msgId == self.SCANNER_DATA:
EReader.py(599): elif msgId == self.CONTRACT_DATA:
EReader.py(650): elif msgId == self.BOND_CONTRACT_DATA:
EReader.py(699): elif msgId == self.EXECUTION_DATA:
EReader.py(745): elif msgId == self.MARKET_DEPTH:
EReader.py(754): elif msgId == self.MARKET_DEPTH_L2:
EReader.py(764): elif msgId == self.NEWS_BULLETINS:
EReader.py(771): elif msgId == self.MANAGED_ACCTS:
EReader.py(775): elif msgId == self.RECEIVE_FA:
EReader.py(780): elif msgId == self.HISTORICAL_DATA:
EReader.py(808): elif msgId == self.SCANNER_PARAMETERS:
EReader.py(812): elif msgId == self.CURRENT_TIME:
EReader.py(814): self.readInt()
--- modulename: EReader, funcname: readInt
EReader.py(910): strval = self.readStr()
--- modulename: EReader, funcname: readStr
EReader.py(893): buf = StringBuffer()
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(897): break
EReader.py(900): strval = str(buf)
--- modulename: __init__, funcname: __str__
__init__.py(254): return join('', [chr(v) for v in self])
--- modulename: __init__, funcname: <listcomp>
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
EReader.py(901): return None if 0 == len(strval) else strval
EReader.py(911): return 0 if strval is None else Integer.parseInt(strval)
--- modulename: __init__, funcname: parseInt
__init__.py(188): return int(text or 0)
EReader.py(815): time = self.readLong()
--- modulename: EReader, funcname: readLong
EReader.py(920): strval = self.readStr()
--- modulename: EReader, funcname: readStr
EReader.py(893): buf = StringBuffer()
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(898): buf.append(c)
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
EReader.py(896): if c == 0:
EReader.py(897): break
EReader.py(900): strval = str(buf)
--- modulename: __init__, funcname: __str__
__init__.py(254): return join('', [chr(v) for v in self])
--- modulename: __init__, funcname: <listcomp>
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
__init__.py(254): return join('', [chr(v) for v in self])
EReader.py(901): return None if 0 == len(strval) else strval
EReader.py(921): return 0 if strval is None else Long.parseLong(strval)
--- modulename: __init__, funcname: parseLong
__init__.py(197): return int(text or 0)
EReader.py(816): self.eWrapper().currentTime(time)
--- modulename: EReader, funcname: eWrapper
EReader.py(88): return self.parent().wrapper()
--- modulename: EReader, funcname: parent
EReader.py(84): return self.m_parent
--- modulename: EClientSocket, funcname: wrapper
EClientSocket.py(237): return self.m_anyWrapper
--- modulename: receiver, funcname: dispatchMethod
receiver.py(26): self.dispatcher(name, dict(list(zip(parameters, arguments))))
--- modulename: dispatcher, funcname: __call__
dispatcher.py(35): results = []
dispatcher.py(36): try:
dispatcher.py(37): messageType = self.messageTypes[name]
dispatcher.py(38): listeners = self.listeners[maybeName(messageType[0])]
--- modulename: __init__, funcname: maybeName
__init__.py(29): try:
__init__.py(30): return obj.__name__
dispatcher.py(41): message = messageType[0](**args)
--- modulename: message, funcname: __init__
message.py(84): for name in self.__slots__:
message.py(85): setattr(self, name, kwds.pop(name, None))
message.py(84): for name in self.__slots__:
message.py(86): assert not kwds
dispatcher.py(42): for listener in listeners:
dispatcher.py(43): try:
dispatcher.py(44): results.append(listener(message))
--- modulename: ibstore, funcname: currentTime
ibstore.py(561): if not self.p.timeoffset: # only if requested ... apply timeoffset
ibstore.py(563): curtime = datetime.fromtimestamp(float(msg.time))
ibstore.py(564): with self._lock_tmoffset:
ibstore.py(565): self.tmoffset = curtime - datetime.now()
ibstore.py(567): threading.Timer(self.p.timerefresh, self.reqCurrentTime).start()
--- modulename: threading, funcname: __init__
threading.py(1252): Thread.__init__(self)
--- modulename: threading, funcname: __init__
threading.py(800): assert group is None, "group argument must be None for now"
threading.py(801): if kwargs is None:
threading.py(802): kwargs = {}
threading.py(803): self._target = target
threading.py(804): self._name = str(name or _newname())
--- modulename: threading, funcname: _newname
threading.py(751): return template % _counter()
threading.py(805): self._args = args
threading.py(806): self._kwargs = kwargs
threading.py(807): if daemon is not None:
threading.py(810): self._daemonic = current_thread().daemon
--- modulename: threading, funcname: current_thread
threading.py(1325): try:
threading.py(1326): return _active[get_ident()]
--- modulename: threading, funcname: daemon
threading.py(1119): assert self._initialized, "Thread.__init__() not called"
threading.py(1120): return self._daemonic
threading.py(811): self._ident = None
threading.py(812): if _HAVE_THREAD_NATIVE_ID:
threading.py(813): self._native_id = None
threading.py(814): self._tstate_lock = None
threading.py(815): self._started = Event()
--- modulename: threading, funcname: __init__
threading.py(522): self._cond = Condition(Lock())
--- modulename: threading, funcname: __init__
threading.py(229): if lock is None:
threading.py(231): self._lock = lock
threading.py(233): self.acquire = lock.acquire
threading.py(234): self.release = lock.release
threading.py(238): try:
threading.py(239): self._release_save = lock._release_save
threading.py(240): except AttributeError:
threading.py(241): pass
threading.py(242): try:
threading.py(243): self._acquire_restore = lock._acquire_restore
threading.py(244): except AttributeError:
threading.py(245): pass
threading.py(246): try:
threading.py(247): self._is_owned = lock._is_owned
threading.py(248): except AttributeError:
threading.py(249): pass
threading.py(250): self._waiters = _deque()
threading.py(523): self._flag = False
threading.py(816): self._is_stopped = False
threading.py(817): self._initialized = True
threading.py(819): self._stderr = _sys.stderr
threading.py(820): self._invoke_excepthook = _make_invoke_excepthook()
--- modulename: threading, funcname: _make_invoke_excepthook
threading.py(1194): old_excepthook = excepthook
threading.py(1195): old_sys_excepthook = _sys.excepthook
threading.py(1196): if old_excepthook is None:
threading.py(1198): if old_sys_excepthook is None:
threading.py(1201): sys_exc_info = _sys.exc_info
threading.py(1202): local_print = print
threading.py(1203): local_sys = _sys
threading.py(1205): def invoke_excepthook(thread):
threading.py(1237): return invoke_excepthook
threading.py(822): _dangling.add(self)
--- modulename: _weakrefset, funcname: add
_weakrefset.py(83): if self._pending_removals:
_weakrefset.py(85): self.data.add(ref(item, self._remove))
threading.py(1253): self.interval = interval
threading.py(1254): self.function = function
threading.py(1255): self.args = args if args is not None else []
threading.py(1256): self.kwargs = kwargs if kwargs is not None else {}
threading.py(1257): self.finished = Event()
--- modulename: threading, funcname: __init__
threading.py(522): self._cond = Condition(Lock())
--- modulename: threading, funcname: __init__
threading.py(229): if lock is None:
threading.py(231): self._lock = lock
threading.py(233): self.acquire = lock.acquire
threading.py(234): self.release = lock.release
threading.py(238): try:
threading.py(239): self._release_save = lock._release_save
threading.py(240): except AttributeError:
threading.py(241): pass
threading.py(242): try:
threading.py(243): self._acquire_restore = lock._acquire_restore
threading.py(244): except AttributeError:
threading.py(245): pass
threading.py(246): try:
threading.py(247): self._is_owned = lock._is_owned
threading.py(248): except AttributeError:
threading.py(249): pass
threading.py(250): self._waiters = _deque()
threading.py(523): self._flag = False
--- modulename: threading, funcname: start
threading.py(865): if not self._initialized:
threading.py(868): if self._started.is_set():
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(871): with _active_limbo_lock:
threading.py(872): _limbo[self] = self
threading.py(873): try:
threading.py(874): _start_new_thread(self._bootstrap, ())
threading.py(879): self._started.wait()
--- modulename: threading, funcname: wait
threading.py(571): with self._cond:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
threading.py(572): signaled = self._flag
threading.py(573): if not signaled:
threading.py(574): signaled = self._cond.wait(timeout)
--- modulename: threading, funcname: wait
threading.py(303): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(305): waiter = _allocate_lock()
threading.py(306): waiter.acquire()
threading.py(307): self._waiters.append(waiter)
threading.py(308): saved_state = self._release_save()
--- modulename: threading, funcname: _release_save
threading.py(266): self._lock.release() # No state to save
threading.py(309): gotit = False
threading.py(310): try: # restore state no matter what (e.g., KeyboardInterrupt)
threading.py(311): if timeout is None:
threading.py(312): waiter.acquire()
--- modulename: threading, funcname: run
threading.py(1264): self.finished.wait(self.interval)
--- modulename: threading, funcname: wait
threading.py(571): with self._cond:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
threading.py(572): signaled = self._flag
threading.py(573): if not signaled:
threading.py(574): signaled = self._cond.wait(timeout)
--- modulename: threading, funcname: wait
threading.py(303): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(305): waiter = _allocate_lock()
threading.py(306): waiter.acquire()
threading.py(307): self._waiters.append(waiter)
threading.py(308): saved_state = self._release_save()
--- modulename: threading, funcname: _release_save
threading.py(266): self._lock.release() # No state to save
threading.py(309): gotit = False
threading.py(310): try: # restore state no matter what (e.g., KeyboardInterrupt)
threading.py(313): gotit = True
threading.py(319): return gotit
threading.py(321): self._acquire_restore(saved_state)
threading.py(311): if timeout is None:
--- modulename: threading, funcname: _acquire_restore
threading.py(269): self._lock.acquire() # Ignore saved state
threading.py(322): if not gotit:
threading.py(319): return gotit
threading.py(575): return signaled
threading.py(315): if timeout > 0:
--- modulename: threading, funcname: __exit__
threading.py(316): gotit = waiter.acquire(True, timeout)
threading.py(260): return self._lock.__exit__(*args)
dispatcher.py(42): for listener in listeners:
dispatcher.py(50): return results
EReader.py(889): return True
EReader.py(108): pass
EReader.py(107): while not self.isInterrupted() and self.processMsg(self.readInt()):
--- modulename: __init__, funcname: isInterrupted
__init__.py(369): return False
--- modulename: EReader, funcname: readInt
EReader.py(910): strval = self.readStr()
--- modulename: EReader, funcname: readStr
EReader.py(893): buf = StringBuffer()
EReader.py(895): c = self.m_dis.readByte()
--- modulename: __init__, funcname: readByte
__init__.py(125): return unpack('!b', self.recv(1))[0]
threading.py(319): return gotit
threading.py(321): self._acquire_restore(saved_state)
--- modulename: threading, funcname: _acquire_restore
threading.py(269): self._lock.acquire() # Ignore saved state
threading.py(322): if not gotit:
threading.py(323): try:
threading.py(324): self._waiters.remove(waiter)
threading.py(575): return signaled
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
threading.py(1265): if not self.finished.is_set():
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(1266): self.function(*self.args, **self.kwargs)
--- modulename: ibstore, funcname: reqCurrentTime
ibstore.py(557): self.conn.reqCurrentTime()
--- modulename: connection, funcname: __getattr__
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
--- modulename: sender, funcname: __getattr__
sender.py(66): try:
sender.py(67): value = getattr(self.client, name)
sender.py(70): if name not in self.clientMethodNames:
sender.py(72): return value
--- modulename: __init__, funcname: inner
__init__.py(58): lock.acquire()
__init__.py(59): try:
__init__.py(60): return func(*args, **kwds)
--- modulename: EClientSocket, funcname: reqCurrentTime
EClientSocket.py(1398): if not self.m_connected:
EClientSocket.py(1402): if self.m_serverVersion < 33:
EClientSocket.py(1405): VERSION = 1
EClientSocket.py(1406): try:
EClientSocket.py(1407): self.send(self.REQ_CURRENT_TIME)
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_3
EClientSocket.py(1765): self.send(str(val))
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_1
EClientSocket.py(1754): self.m_dos.write(val)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
EClientSocket.py(1755): self.sendEOL()
--- modulename: EClientSocket, funcname: sendEOL
EClientSocket.py(1744): self.m_dos.write(self.EOL)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(147): send(eol)
EClientSocket.py(1408): self.send(VERSION)
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_3
EClientSocket.py(1765): self.send(str(val))
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(82): return func(*args)
--- modulename: EClientSocket, funcname: send_1
EClientSocket.py(1754): self.m_dos.write(val)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(149): for char in data:
__init__.py(150): if sys.version_info[0] > 2:
__init__.py(151): char = char.encode('utf-8')
__init__.py(152): send(pack('!c', char))
__init__.py(149): for char in data:
EClientSocket.py(1755): self.sendEOL()
--- modulename: EClientSocket, funcname: sendEOL
EClientSocket.py(1744): self.m_dos.write(self.EOL)
--- modulename: __init__, funcname: write
__init__.py(145): send = self.send
__init__.py(146): if data == 0:
__init__.py(147): send(eol)
__init__.py(62): lock.release()
__init__.py(60): return func(*args, **kwds)
threading.py(1267): self.finished.set()
--- modulename: threading, funcname: set
threading.py(542): with self._cond:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
threading.py(543): self._flag = True
threading.py(544): self._cond.notify_all()
--- modulename: threading, funcname: notify_all
threading.py(381): self.notify(len(self._waiters))
--- modulename: threading, funcname: notify
threading.py(361): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(363): all_waiters = self._waiters
threading.py(364): waiters_to_notify = _deque(_islice(all_waiters, n))
threading.py(365): if not waiters_to_notify:
threading.py(366): return
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
--- modulename: _weakrefset, funcname: _remove
_weakrefset.py(40): self = selfref()
_weakrefset.py(41): if self is not None:
_weakrefset.py(42): if self._iterating:
_weakrefset.py(45): self.data.discard(item)
EReader.py(109): except Exception as ex:
EReader.py(110): if self.parent().isConnected():
--- modulename: EReader, funcname: parent
EReader.py(84): return self.m_parent
--- modulename: EClientSocket, funcname: isConnected
EClientSocket.py(249): return self.m_connected
EReader.py(111): self.eWrapper().error(ex)
--- modulename: EReader, funcname: eWrapper
EReader.py(88): return self.parent().wrapper()
--- modulename: EReader, funcname: parent
EReader.py(84): return self.m_parent
--- modulename: EClientSocket, funcname: wrapper
EClientSocket.py(237): return self.m_anyWrapper
--- modulename: overloading, funcname: __get__
overloading.py(56): if obj is None:
overloading.py(58): return instancemethod(self, obj)
--- modulename: overloading, funcname: __call__
overloading.py(78): types = tuple(map(type, args))
overloading.py(79): func = self.cache.get(types)
overloading.py(80): if func is None:
overloading.py(81): self.cache[types] = func = self.find_func(types)
--- modulename: overloading, funcname: find_func
overloading.py(90): func = self.registry.get(types)
overloading.py(91): if func is not None:
overloading.py(100): mros = tuple(t.__mro__ for t in types)
--- modulename: overloading, funcname: <genexpr>
overloading.py(100): mros = tuple(t.__mro__ for t in types)
--- modulename: overloading, funcname: <genexpr>
overloading.py(100): mros = tuple(t.__mro__ for t in types)
--- modulename: overloading, funcname: <genexpr>
overloading.py(100): mros = tuple(t.__mro__ for t in types)
overloading.py(101): n = len(mros)
overloading.py(102): candidates = [sig for sig in self.registry
--- modulename: overloading, funcname: <listcomp>
overloading.py(102): candidates = [sig for sig in self.registry
overloading.py(103): if len(sig) == n and
overloading.py(104): all(t in mro for t, mro in zip(sig, mros))]
--- modulename: overloading, funcname: <genexpr>
overloading.py(104): all(t in mro for t, mro in zip(sig, mros))]
--- modulename: overloading, funcname: <genexpr>
overloading.py(104): all(t in mro for t, mro in zip(sig, mros))]
--- modulename: overloading, funcname: <genexpr>
overloading.py(102): candidates = [sig for sig in self.registry
overloading.py(103): if len(sig) == n and
overloading.py(102): candidates = [sig for sig in self.registry
overloading.py(105): if not candidates:
overloading.py(107): return self.default_func
overloading.py(82): return func(*args)
--- modulename: receiver, funcname: error
receiver.py(75): self.dispatcher('error', dict(errorMsg=e))
--- modulename: dispatcher, funcname: __call__
dispatcher.py(35): results = []
dispatcher.py(36): try:
dispatcher.py(37): messageType = self.messageTypes[name]
dispatcher.py(38): listeners = self.listeners[maybeName(messageType[0])]
--- modulename: __init__, funcname: maybeName
__init__.py(29): try:
__init__.py(30): return obj.__name__
dispatcher.py(41): message = messageType[0](**args)
--- modulename: message, funcname: __init__
message.py(84): for name in self.__slots__:
message.py(85): setattr(self, name, kwds.pop(name, None))
message.py(84): for name in self.__slots__:
message.py(85): setattr(self, name, kwds.pop(name, None))
message.py(84): for name in self.__slots__:
message.py(85): setattr(self, name, kwds.pop(name, None))
message.py(84): for name in self.__slots__:
message.py(86): assert not kwds
dispatcher.py(42): for listener in listeners:
dispatcher.py(43): try:
dispatcher.py(44): results.append(listener(message))
--- modulename: ibstore, funcname: error
ibstore.py(455): if not self.p.notifyall:
ibstore.py(456): self.notifs.put((msg, tuple(msg.values()), dict(msg.items())))
--- modulename: message, funcname: values
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
--- modulename: message, funcname: keys
message.py(121): return self.__slots__
--- modulename: message, funcname: <listcomp>
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
--- modulename: message, funcname: items
message.py(107): return list(zip(list(self.keys()), list(self.values())))
--- modulename: message, funcname: keys
message.py(121): return self.__slots__
--- modulename: message, funcname: values
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
--- modulename: message, funcname: keys
message.py(121): return self.__slots__
--- modulename: message, funcname: <listcomp>
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
message.py(114): return [getattr(self, key, None) for key in list(self.keys())]
--- modulename: queue, funcname: put
queue.py(133): with self.not_full:
--- modulename: threading, funcname: __enter__
threading.py(257): return self._lock.__enter__()
queue.py(134): if self.maxsize > 0:
queue.py(150): self._put(item)
--- modulename: queue, funcname: _put
queue.py(214): self.queue.append(item)
queue.py(151): self.unfinished_tasks += 1
queue.py(152): self.not_empty.notify()
--- modulename: threading, funcname: notify
threading.py(361): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
threading.py(278): return True
threading.py(363): all_waiters = self._waiters
threading.py(364): waiters_to_notify = _deque(_islice(all_waiters, n))
threading.py(365): if not waiters_to_notify:
threading.py(366): return
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
ibstore.py(459): if msg.errorCode is None:
ibstore.py(461): pass
dispatcher.py(42): for listener in listeners:
dispatcher.py(50): return results
EReader.py(112): if self.parent().isConnected():
--- modulename: EReader, funcname: parent
EReader.py(84): return self.m_parent
--- modulename: EClientSocket, funcname: isConnected
EClientSocket.py(249): return self.m_connected
EReader.py(113): self.m_parent.close()
--- modulename: EClientSocket, funcname: close
EClientSocket.py(1713): self.eDisconnect()
--- modulename: __init__, funcname: inner
__init__.py(58): lock.acquire()
__init__.py(59): try:
__init__.py(60): return func(*args, **kwds)
--- modulename: EClientSocket, funcname: eDisconnect
EClientSocket.py(315): if self.m_dos is None:
EClientSocket.py(317): self.m_connected = False
EClientSocket.py(318): self.m_serverVersion = 0
EClientSocket.py(319): self.m_TwsTime = ""
EClientSocket.py(320): self.m_dos = None
EClientSocket.py(321): reader = self.m_reader
EClientSocket.py(322): self.m_reader = None
EClientSocket.py(323): socket = self.m_socket
EClientSocket.py(324): self.m_socket = None
EClientSocket.py(325): try:
EClientSocket.py(327): if reader is not None:
EClientSocket.py(328): reader.interrupt()
--- modulename: __init__, funcname: interrupt
__init__.py(362): return False
EClientSocket.py(331): try:
EClientSocket.py(333): if socket is not None:
EClientSocket.py(334): socket.disconnect()
--- modulename: __init__, funcname: disconnect
__init__.py(232): self.shutdown(socket.SHUT_RDWR)
EClientSocket.py(335): except Exception as e:
EClientSocket.py(336): pass
__init__.py(62): lock.release()
__init__.py(60): return func(*args, **kwds)
EClientSocket.py(1714): self.wrapper().connectionClosed()
--- modulename: EClientSocket, funcname: wrapper
EClientSocket.py(237): return self.m_anyWrapper
--- modulename: receiver, funcname: dispatchMethod
receiver.py(26): self.dispatcher(name, dict(list(zip(parameters, arguments))))
--- modulename: dispatcher, funcname: __call__
dispatcher.py(35): results = []
dispatcher.py(36): try:
dispatcher.py(37): messageType = self.messageTypes[name]
dispatcher.py(38): listeners = self.listeners[maybeName(messageType[0])]
--- modulename: __init__, funcname: maybeName
__init__.py(29): try:
__init__.py(30): return obj.__name__
dispatcher.py(41): message = messageType[0](**args)
--- modulename: message, funcname: __init__
message.py(84): for name in self.__slots__:
message.py(86): assert not kwds
dispatcher.py(42): for listener in listeners:
dispatcher.py(43): try:
dispatcher.py(44): results.append(listener(message))
--- modulename: ibstore, funcname: connectionClosed
ibstore.py(544): self.conn.disconnect()
--- modulename: connection, funcname: __getattr__
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
connection.py(54): except (AttributeError, ):
connection.py(55): pass
connection.py(51): for obj in (self.dispatcher, self.receiver, self.sender):
connection.py(52): try:
connection.py(53): return getattr(obj, name)
--- modulename: sender, funcname: disconnect
sender.py(55): client = self.client
sender.py(56): if client and client.isConnected():
--- modulename: EClientSocket, funcname: isConnected
EClientSocket.py(249): return self.m_connected
sender.py(59): return False
ibstore.py(545): self.stopdatas()
--- modulename: ibstore, funcname: stopdatas
ibstore.py(413): qs = list(self.qs.values())
ibstore.py(414): ts = list()
ibstore.py(415): for data in self.datas:
ibstore.py(416): t = threading.Thread(target=data.canceldata)
--- modulename: threading, funcname: __init__
threading.py(800): assert group is None, "group argument must be None for now"
threading.py(801): if kwargs is None:
threading.py(802): kwargs = {}
threading.py(803): self._target = target
threading.py(804): self._name = str(name or _newname())
--- modulename: threading, funcname: _newname
threading.py(751): return template % _counter()
threading.py(805): self._args = args
threading.py(806): self._kwargs = kwargs
threading.py(807): if daemon is not None:
threading.py(810): self._daemonic = current_thread().daemon
--- modulename: threading, funcname: current_thread
threading.py(1325): try:
threading.py(1326): return _active[get_ident()]
--- modulename: threading, funcname: daemon
threading.py(1119): assert self._initialized, "Thread.__init__() not called"
threading.py(1120): return self._daemonic
threading.py(811): self._ident = None
threading.py(812): if _HAVE_THREAD_NATIVE_ID:
threading.py(813): self._native_id = None
threading.py(814): self._tstate_lock = None
threading.py(815): self._started = Event()
--- modulename: threading, funcname: __init__
threading.py(522): self._cond = Condition(Lock())
--- modulename: threading, funcname: __init__
threading.py(229): if lock is None:
threading.py(231): self._lock = lock
threading.py(233): self.acquire = lock.acquire
threading.py(234): self.release = lock.release
threading.py(238): try:
threading.py(239): self._release_save = lock._release_save
threading.py(240): except AttributeError:
threading.py(241): pass
threading.py(242): try:
threading.py(243): self._acquire_restore = lock._acquire_restore
threading.py(244): except AttributeError:
threading.py(245): pass
threading.py(246): try:
threading.py(247): self._is_owned = lock._is_owned
threading.py(248): except AttributeError:
threading.py(249): pass
threading.py(250): self._waiters = _deque()
threading.py(523): self._flag = False
threading.py(816): self._is_stopped = False
threading.py(817): self._initialized = True
threading.py(819): self._stderr = _sys.stderr
threading.py(820): self._invoke_excepthook = _make_invoke_excepthook()
--- modulename: threading, funcname: _make_invoke_excepthook
threading.py(1194): old_excepthook = excepthook
threading.py(1195): old_sys_excepthook = _sys.excepthook
threading.py(1196): if old_excepthook is None:
threading.py(1198): if old_sys_excepthook is None:
threading.py(1201): sys_exc_info = _sys.exc_info
threading.py(1202): local_print = print
threading.py(1203): local_sys = _sys
threading.py(1205): def invoke_excepthook(thread):
threading.py(1237): return invoke_excepthook
threading.py(822): _dangling.add(self)
--- modulename: _weakrefset, funcname: add
_weakrefset.py(83): if self._pending_removals:
_weakrefset.py(85): self.data.add(ref(item, self._remove))
ibstore.py(417): t.start()
--- modulename: threading, funcname: start
threading.py(865): if not self._initialized:
threading.py(868): if self._started.is_set():
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(871): with _active_limbo_lock:
threading.py(872): _limbo[self] = self
threading.py(873): try:
threading.py(874): _start_new_thread(self._bootstrap, ())
threading.py(879): self._started.wait()
--- modulename: threading, funcname: wait
--- modulename: threading, funcname: run
threading.py(571): with self._cond:
threading.py(890): try:
--- modulename: threading, funcname: __enter__
threading.py(891): if self._target:
threading.py(257): return self._lock.__enter__()
threading.py(892): self._target(*self._args, **self._kwargs)
threading.py(572): signaled = self._flag
--- modulename: ibdata, funcname: canceldata
threading.py(573): if not signaled:
threading.py(575): return signaled
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
ibstore.py(418): ts.append(t)
ibstore.py(415): for data in self.datas:
ibstore.py(416): t = threading.Thread(target=data.canceldata)
--- modulename: threading, funcname: __init__
threading.py(800): assert group is None, "group argument must be None for now"
ibdata.py(427): if self.contract is None:
threading.py(801): if kwargs is None:
ibdata.py(430): if self._usertvol:
threading.py(802): kwargs = {}
ibdata.py(431): self.ib.cancelMktData(self.qlive)
threading.py(803): self._target = target
--- modulename: ibstore, funcname: cancelMktData
threading.py(804): self._name = str(name or _newname())
ibstore.py(872): with self._lock_q:
--- modulename: threading, funcname: _newname
ibstore.py(873): tickerId = self.ts.get(q, None)
ibstore.py(874): if tickerId is not None:
ibstore.py(877): self.cancelQueue(q, True)
threading.py(751): return template % _counter()
--- modulename: ibstore, funcname: cancelQueue
threading.py(805): self._args = args
ibstore.py(620): tickerId = self.ts.pop(q, None)
threading.py(806): self._kwargs = kwargs
ibstore.py(621): self.qs.pop(tickerId, None)
threading.py(807): if daemon is not None:
ibstore.py(623): self.iscash.pop(tickerId, None)
threading.py(810): self._daemonic = current_thread().daemon
ibstore.py(625): if sendnone:
--- modulename: threading, funcname: current_thread
ibstore.py(626): q.put(None)
threading.py(1325): try:
threading.py(1326): return _active[get_ident()]
--- modulename: threading, funcname: daemon
threading.py(1119): assert self._initialized, "Thread.__init__() not called"
threading.py(1120): return self._daemonic
--- modulename: queue, funcname: put
queue.py(133): with self.not_full:
threading.py(811): self._ident = None
--- modulename: threading, funcname: __enter__
threading.py(812): if _HAVE_THREAD_NATIVE_ID:
threading.py(257): return self._lock.__enter__()
threading.py(813): self._native_id = None
queue.py(134): if self.maxsize > 0:
queue.py(150): self._put(item)
--- modulename: queue, funcname: _put
threading.py(814): self._tstate_lock = None
queue.py(214): self.queue.append(item)
threading.py(815): self._started = Event()
queue.py(151): self.unfinished_tasks += 1
--- modulename: threading, funcname: __init__
queue.py(152): self.not_empty.notify()
threading.py(522): self._cond = Condition(Lock())
--- modulename: threading, funcname: notify
threading.py(361): if not self._is_owned():
--- modulename: threading, funcname: _is_owned
threading.py(274): if self._lock.acquire(False):
--- modulename: threading, funcname: __init__
threading.py(229): if lock is None:
threading.py(231): self._lock = lock
threading.py(278): return True
threading.py(363): all_waiters = self._waiters
threading.py(364): waiters_to_notify = _deque(_islice(all_waiters, n))
threading.py(365): if not waiters_to_notify:
threading.py(366): return
--- modulename: threading, funcname: __exit__
threading.py(260): return self._lock.__exit__(*args)
threading.py(896): del self._target, self._args, self._kwargs
threading.py(233): self.acquire = lock.acquire
threading.py(234): self.release = lock.release
threading.py(238): try:
threading.py(239): self._release_save = lock._release_save
threading.py(240): except AttributeError:
threading.py(241): pass
threading.py(242): try:
threading.py(243): self._acquire_restore = lock._acquire_restore
threading.py(244): except AttributeError:
threading.py(245): pass
threading.py(246): try:
threading.py(247): self._is_owned = lock._is_owned
threading.py(248): except AttributeError:
threading.py(249): pass
threading.py(250): self._waiters = _deque()
threading.py(523): self._flag = False
threading.py(816): self._is_stopped = False
threading.py(817): self._initialized = True
threading.py(819): self._stderr = _sys.stderr
threading.py(820): self._invoke_excepthook = _make_invoke_excepthook()
--- modulename: threading, funcname: _make_invoke_excepthook
threading.py(1194): old_excepthook = excepthook
threading.py(1195): old_sys_excepthook = _sys.excepthook
threading.py(1196): if old_excepthook is None:
threading.py(1198): if old_sys_excepthook is None:
threading.py(1201): sys_exc_info = _sys.exc_info
threading.py(1202): local_print = print
threading.py(1203): local_sys = _sys
threading.py(1205): def invoke_excepthook(thread):
threading.py(1237): return invoke_excepthook
threading.py(822): _dangling.add(self)
--- modulename: _weakrefset, funcname: add
_weakrefset.py(83): if self._pending_removals:
_weakrefset.py(85): self.data.add(ref(item, self._remove))
ibstore.py(417): t.start()
--- modulename: threading, funcname: start
threading.py(865): if not self._initialized:
threading.py(868): if self._started.is_set():
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(871): with _active_limbo_lock:
threading.py(872): _limbo[self] = self
threading.py(873): try:
threading.py(874): _start_new_thread(self._bootstrap, ())
threading.py(879): self._started.wait()
--- modulename: threading, funcname: run
--- modulename: threading, funcname: wait
threading.py(890): try:
threading.py(891): if self._target:
threading.py(571): with self._cond:
threading.py(892): self._target(*self._args, **self._kwargs)
--- modulename: threading, funcname: __enter__
--- modulename: ibdata, funcname: canceldata
ibdata.py(427): if self.contract is None:
threading.py(257): return self._lock.__enter__()
ibdata.py(430): if self._usertvol:
threading.py(572): signaled = self._flag
ibdata.py(431): self.ib.cancelMktData(self.qlive)
threading.py(573): if not signaled:
--- modulename: ibstore, funcname: cancelMktData
threading.py(575): return signaled
ibstore.py(872): with self._lock_q:
--- modulename: threading, funcname: __exit__
ibstore.py(873): tickerId = self.ts.get(q, None)
threading.py(260): return self._lock.__exit__(*args)
ibstore.py(418): ts.append(t)
ibstore.py(874): if tickerId is not None:
ibstore.py(415): for data in self.datas:
ibstore.py(877): self.cancelQueue(q, True)
ibstore.py(420): for t in ts:
--- modulename: ibstore, funcname: cancelQueue
ibstore.py(421): t.join()
ibstore.py(620): tickerId = self.ts.pop(q, None)
--- modulename: threading, funcname: join
ibstore.py(621): self.qs.pop(tickerId, None)
threading.py(1025): if not self._initialized:
ibstore.py(623): self.iscash.pop(tickerId, None)
threading.py(1027): if not self._started.is_set():
ibstore.py(625): if sendnone:
--- modulename: threading, funcname: is_set
ibstore.py(626): q.put(None)
threading.py(531): return self._flag
--- modulename: queue, funcname: put
threading.py(1029): if self is current_thread():
queue.py(133): with self.not_full:
--- modulename: threading, funcname: current_thread
--- modulename: threading, funcname: __enter__
threading.py(1325): try:
threading.py(257): return self._lock.__enter__()
threading.py(1326): return _active[get_ident()]
queue.py(134): if self.maxsize > 0:
threading.py(1032): if timeout is None:
queue.py(150): self._put(item)
threading.py(1033): self._wait_for_tstate_lock()
--- modulename: queue, funcname: _put
--- modulename: threading, funcname: _wait_for_tstate_lock
threading.py(1046): lock = self._tstate_lock
threading.py(1047): if lock is None: # already determined that the C code is done
threading.py(1049): elif lock.acquire(block, timeout):
queue.py(214): self.queue.append(item)
threading.py(1050): lock.release()
queue.py(151): self.unfinished_tasks += 1
threading.py(1051): self._stop()
queue.py(152): self.not_empty.notify()
--- modulename: threading, funcname: _stop
--- modulename: threading, funcname: notify
threading.py(983): lock = self._tstate_lock
threading.py(361): if not self._is_owned():
threading.py(984): if lock is not None:
threading.py(985): assert not lock.locked()
threading.py(986): self._is_stopped = True
threading.py(987): self._tstate_lock = None
threading.py(988): if not self.daemon:
--- modulename: threading, funcname: _is_owned
--- modulename: threading, funcname: daemon
threading.py(274): if self._lock.acquire(False):
threading.py(1119): assert self._initialized, "Thread.__init__() not called"
threading.py(278): return True
threading.py(1120): return self._daemonic
threading.py(363): all_waiters = self._waiters
ibstore.py(420): for t in ts:
threading.py(364): waiters_to_notify = _deque(_islice(all_waiters, n))
ibstore.py(421): t.join()
threading.py(365): if not waiters_to_notify:
--- modulename: threading, funcname: join
threading.py(366): return
threading.py(1025): if not self._initialized:
--- modulename: threading, funcname: __exit__
threading.py(1027): if not self._started.is_set():
threading.py(260): return self._lock.__exit__(*args)
threading.py(896): del self._target, self._args, self._kwargs
--- modulename: threading, funcname: is_set
threading.py(531): return self._flag
threading.py(1029): if self is current_thread():
--- modulename: threading, funcname: current_thread
threading.py(1325): try:
threading.py(1326): return _active[get_ident()]
threading.py(1032): if timeout is None:
threading.py(1033): self._wait_for_tstate_lock()
--- modulename: threading, funcname: _wait_for_tstate_lock
threading.py(1046): lock = self._tstate_lock
threading.py(1047): if lock is None: # already determined that the C code is done
threading.py(1049): elif lock.acquire(block, timeout):
threading.py(1050): lock.release()
threading.py(1051): self._stop()
--- modulename: threading, funcname: _stop
threading.py(983): lock = self._tstate_lock
threading.py(984): if lock is not None:
threading.py(985): assert not lock.locked()
threading.py(986): self._is_stopped = True
threading.py(987): self._tstate_lock = None
threading.py(988): if not self.daemon:
--- modulename: threading, funcname: daemon
threading.py(1119): assert self._initialized, "Thread.__init__() not called"
threading.py(1120): return self._daemonic
ibstore.py(420): for t in ts:
ibstore.py(423): for q in reversed(qs): # datamaster the last one to get a None
--- modulename: _weakrefset, funcname: _remove
_weakrefset.py(40): self = selfref()
_weakrefset.py(41): if self is not None:
_weakrefset.py(42): if self._iterating:
_weakrefset.py(45): self.data.discard(item)
--- modulename: _weakrefset, funcname: _remove
_weakrefset.py(40): self = selfref()
_weakrefset.py(41): if self is not None:
_weakrefset.py(42): if self._iterating:
_weakrefset.py(45): self.data.discard(item)
dispatcher.py(42): for listener in listeners:
dispatcher.py(50): return results
EReader.py(114): try:
EReader.py(115): self.m_dis.close()
EReader.py(117): except Exception as e:
EReader.py(118): pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment