Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ze7111 committed Oct 3, 2022
1 parent 5e84222 commit 726a078
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
18 changes: 13 additions & 5 deletions core/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ def main(final, decomplie, filename='src\\output.v'):
f.write(line)

try:
try: subprocess.call(f'python "src\\{current_time}.tmp"', shell=False)
except FileNotFoundError: subprocess.call(f'python3 "src\\{current_time}.tmp"', shell=False)
except KeyboardInterrupt: print(f'\u001b[41m\u001b[30mKeyboard Interrupt Detected\u001b[0m'); exit()
except Exception: print(f'\u001b[41m\u001b[30mError: {filename} Failed to run.\u001b[0m'); exit()
finally: os.remove(f'src\\{current_time}.tmp')
try:
subprocess.call(f'python "src\\{current_time}.tmp"', shell=False)
except FileNotFoundError:
subprocess.call(f'python3 "src\\{current_time}.tmp"', shell=False)
except KeyboardInterrupt:
print(f'\u001b[41m\u001b[30mKeyboard Interrupt Detected\u001b[0m'); exit()

except Exception:
print(f'\u001b[41m\u001b[30mError: {filename} Failed to run.\u001b[0m')
exit()

finally:
os.remove(f'src\\{current_time}.tmp')
18 changes: 15 additions & 3 deletions verscae.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
from core.backend import main as m; import sys, os; os.system('cls' if os.name == 'nt' else 'clear')
from core.backend import main as m
import sys, os
os.system('cls' if os.name == 'nt' else 'clear')


music_option = True # change to False if you don't want want to play music while compling
music_path = 'music.mp3' # change to the path of your music file



if sys.argv[1] == '':
print('\u001b[31;1mThe filename you put was either invalid or mismathced, enter file to run : \u001b[32;1m', end='')
filename = input()
print('\u001b[0m')
else:
filename = sys.argv[1]



Version = '2.4.5' # don't change this unless you know what you are doing
if __name__ == '__main__': m(filename, music_option, Version, music_path, sys.argv) # don't change this unless you know what you are doing
else: print('\u001b[41;1mYou are not allowed to import this file\u001b[0m') # don't change this unless you know what you are doing

if __name__ == '__main__':
m(filename, music_option, Version, music_path, sys.argv) # don't change this unless you know what you are doing

else:
print('\u001b[41;1mYou are not allowed to import this file\u001b[0m') # don't change this unless you know what you are doing

0 comments on commit 726a078

Please sign in to comment.