Skip to content

Commit dac7bd4

Browse files
committed
tweak to use the default main
1 parent 9252372 commit dac7bd4

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

js/pyworker.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,12 @@ from clingo.script import enable_python
3535
3636
import __main__
3737
38+
Application.main = lambda self, ctl, files: None
39+
3840
class ClingoApp(Application):
3941
def __init__(self, name):
4042
self.program_name = name
4143
42-
def main(self, ctl, files):
43-
for f in files:
44-
ctl.load(f)
45-
if not files:
46-
ctl.load("-")
47-
48-
if "main" in __main__.__dict__ and callable(__main__.__dict__["main"]):
49-
__main__.__dict__["main"](ctl)
50-
else:
51-
ctl.ground([("base", [])])
52-
ctl.solve()
53-
5444
def run_clingo_main(args):
5545
enable_python()
5646
clingo_main(ClingoApp("clingo"), args)

0 commit comments

Comments
 (0)