Add functions to main scripts to be entry_points

Add functions to ck2cti, ctml_writer, and a new file __main__.py to
mixmaster to be the entry_points locations that setuptools scripts
will call.
This commit is contained in:
Bryan W. Weber 2015-08-02 13:55:10 -04:00 committed by Ray Speth
parent c6ccffe44f
commit 5f8bd40c0d
3 changed files with 16 additions and 2 deletions

View file

@ -2028,5 +2028,8 @@ def main(argv):
print(e)
sys.exit(1)
def script_entry_point():
main(sys.argv[1:])
if __name__ == '__main__':
main(sys.argv[1:])

View file

@ -2681,8 +2681,11 @@ def convert(filename=None, outName=None, text=None):
write(outName)
if __name__ == "__main__":
import sys
def main():
if len(sys.argv) not in (2,3):
raise ValueError('Incorrect number of command line arguments.')
convert(*sys.argv[1:])
if __name__ == "__main__":
main()

View file

@ -0,0 +1,8 @@
from cantera.mixmaster.main import MixMaster
def main():
MixMaster()
if __name__ == '__main__':
main()