Ubuntu Pastebin

Paste from Chipaca at Mon, 26 Oct 2015 18:01:23 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
package main

import (
	"fmt"
	"os/exec"
	"strings"
)

func main() {
	cmd := exec.Command("python3", "-c", "print(repr(input()))")
	cmd.Stdin = strings.NewReader("y")
	out, err := cmd.CombinedOutput()
	fmt.Printf("output: %q\n error: %v\n", string(out), err)
}
Download as text