diff --git a/bin/llvm--emulator b/bin/llvm--emulator new file mode 100755 index 0000000..c4120be --- /dev/null +++ b/bin/llvm--emulator @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +"""Small script to run the emulator.""" + +from __future__ import print_function +import sys + + +def run_emulator(): + """Run the emulator.""" + if sys.version_info.major < 3: + print('You need Python 3 to run this emulator. Aborting...') + return + from llvm_emulator import emulator + emulator.main() + + +if __name__ == '__main__': + run_emulator() diff --git a/llvm_emulator/emulator.py b/llvm_emulator/emulator.py old mode 100755 new mode 100644 index a309b6a..84ef0d0 --- a/llvm_emulator/emulator.py +++ b/llvm_emulator/emulator.py @@ -1,11 +1,8 @@ -#!/usr/bin/env python3 - """ Main module of the program. -This module is the one that should be run, e.g.:: - - $ ./emulator.py +To start the application, call the main function. For the end user, +this is achieved by a script stored in the bin folder. """ @@ -47,7 +44,3 @@ def go_auto(path_to_file): def enter_interactive_mode(): print('TODO: Interactive mode has not been implemented yet. Sorry...') - - -if __name__ == '__main__': - main()