MCPcopy Index your code
hub / github.com/python/cpython / stuffsource

Method stuffsource

Lib/idlelib/pyshell.py:689–695  ·  view source on GitHub ↗

Stuff source in the filename cache

(self, source)

Source from the content-addressed store, hash-verified

687 return InteractiveInterpreter.runsource(self, source, filename)
688
689 def stuffsource(self, source):
690 "Stuff source in the filename cache"
691 filename = "<pyshell#%d>" % self.gid
692 self.gid = self.gid + 1
693 lines = source.split("\n")
694 linecache.cache[filename] = len(source)+1, 0, lines, filename
695 return filename
696
697 def prepend_syspath(self, filename):
698 "Prepend sys.path with file's directory if not already included"

Callers 2

execsourceMethod · 0.95
runsourceMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected