Use a script in the bin folder to start the emulator.

This commit is contained in:
cfreksen 2017-10-31 20:03:16 +01:00
parent 4281442960
commit 559b178728
No known key found for this signature in database
GPG Key ID: EAC13EE101008978
2 changed files with 20 additions and 9 deletions

18
bin/llvm--emulator Executable file
View File

@ -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()

11
llvm_emulator/emulator.py Executable file → Normal file
View File

@ -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()