Spaces:
Paused
Paused
| import subprocess | |
| import sys | |
| import os | |
| if __name__ == "__main__": | |
| # Make it executable | |
| os.chmod("./spritefusion", 0o755) | |
| try: | |
| result = subprocess.run( | |
| ["./spritefusion"], check=True, capture_output=False) | |
| sys.exit(result.returncode) | |
| except subprocess.CalledProcessError as e: | |
| print(f"Binary execution failed with return code {e.returncode}") | |
| sys.exit(e.returncode) | |
| except Exception as e: | |
| print(f"Error executing binary: {e}") | |
| sys.exit(1) | |