File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ def createparser():
2222
2323 return parser
2424
25-
26- # main
27- if __name__ == "__main__" :
25+ def main ():
26+ """calculation chain"""
2827 parser = createparser ()
2928 main_input , spare_input = parser .parse_known_args (sys .argv [1 :])
3029 # get user's expression
@@ -64,3 +63,7 @@ def createparser():
6463 else :
6564 print (result )
6665 sys .exit (0 )
66+
67+ # main
68+ if __name__ == "__main__" :
69+ main ()
Original file line number Diff line number Diff line change 77 author_email = '[email protected] ' ,
88 description = 'pure Python command line calculator' ,
99 packages = ['pycalc' ],
10- entry_points = {'console_scripts' : ['pycalc = pycalc.pycalc' ]},
10+ entry_points = {'console_scripts' : ['pycalc = pycalc.pycalc:main ' ]},
1111 classifiers = ["Programming Language :: Python :: 3.6" , "Operating System :: Linux Mint" ])
You can’t perform that action at this time.
0 commit comments