From d9fafc8e22a202866f773ea13e76dde328efd050 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Mon, 26 Feb 2024 10:55:41 -0500 Subject: [PATCH] {pyactr} Remove hard-coded redaction of GUI warning (#390) --- framework/pyactr/pyactr.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/framework/pyactr/pyactr.go b/framework/pyactr/pyactr.go index 4269a0a..689825c 100644 --- a/framework/pyactr/pyactr.go +++ b/framework/pyactr/pyactr.go @@ -5,7 +5,6 @@ package pyactr import ( _ "embed" "fmt" - "regexp" "strings" "golang.org/x/exp/maps" @@ -147,7 +146,6 @@ func (p *PyACTR) Run(initialBuffers framework.InitialBuffers) (result *framework // run it! output, err := executil.ExecCommand(Info.ExecutableName, runFile) - output = removeWarning(output) if err != nil { err = &executil.ErrExecuteCommand{Output: output} return @@ -728,14 +726,3 @@ func (p PyACTR) outputStatement(production *actr.Production, s *actr.Statement) p.Writeln(" ~goal>") } } - -// removeWarning will remove the long warning whenever pyactr is run without tkinter. -func removeWarning(text string) string { - r := regexp.MustCompile(`(?s).+warnings.warn\("Simulation GUI is set to False."\)(.+)`) - matches := r.FindAllStringSubmatch(text, -1) - if len(matches) == 1 { - text = strings.TrimSpace(matches[0][1]) - } - - return text -}