MCPcopy Index your code
hub / github.com/bpython/bpython / write_startup_file

Method write_startup_file

bpython/test/test_curtsies_repl.py:437–442  ·  view source on GitHub ↗
(self, fname, encoding)

Source from the content-addressed store, hash-verified

435 self.repl = create_repl()
436
437 def write_startup_file(self, fname, encoding):
438 with open(fname, mode="w", encoding=encoding) as f:
439 f.write("# coding: ")
440 f.write(encoding)
441 f.write("\n")
442 f.write('a = "äöü"\n')
443
444 def test_startup_event_utf8(self):
445 with tempfile.NamedTemporaryFile() as temp:

Callers 2

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected