Skip to content

Commit 8939efa

Browse files
committed
Make main function in __main__
1 parent 6631df6 commit 8939efa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pysrc/juliacall/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from juliacall.repl import run_repl, add_repl_args
55

66

7-
if __name__ == '__main__':
7+
def main():
88
parser = argparse.ArgumentParser("JuliaCall REPL (experimental)")
99
parser.add_argument('-e', '--eval', type=str, default=None, help='Evaluate <expr>. If specified, all other arguments are ignored.')
1010
parser.add_argument('-E', '--print', type=str, default=None, help='Evaluate <expr> and display the result. If specified, all other arguments are ignored.')
@@ -26,3 +26,6 @@
2626
history_file=args.history_file,
2727
preamble=args.preamble
2828
)
29+
30+
if __name__ == '__main__':
31+
main()

0 commit comments

Comments
 (0)