MCPcopy Index your code
hub / github.com/go-python/gopy / genPrintOut

Method genPrintOut

bind/gen.go:529–536  ·  view source on GitHub ↗
(outfn string, pr *printer)

Source from the content-addressed store, hash-verified

527}
528
529func (g *pyGen) genPrintOut(outfn string, pr *printer) {
530 of, err := os.Create(filepath.Join(g.cfg.OutputDir, outfn))
531 g.err.Add(err)
532 _, err = io.Copy(of, pr)
533 g.err.Add(err)
534 err = of.Close()
535 g.err.Add(err)
536}
537
538func (g *pyGen) genOut() {
539 g.pybuild.Printf("\nmod.generate(open('%v.c', 'w'))\n\n", g.cfg.Name)

Callers 2

genOutMethod · 0.95
genPkgWrapOutMethod · 0.95

Calls 1

AddMethod · 0.80

Tested by

no test coverage detected