Files
easy-wallet/__main__.py
Davide Grilli 290c371169 refactor: reorganize project into src/ structure
- Move all scripts (p2pk, p2pkh, p2sh, p2wpkh, p2tr) into src/
- Rename main.py to __main__.py to allow running with `python .`
- Update script paths in __main__.py
- Translate README to English and update launch instructions
- Add __pycache__, *.pyc, *.json to .gitignore
2026-03-09 11:07:03 +01:00

34 lines
871 B
Python

import subprocess
import sys
def main():
print("=== GENERATORE INDIRIZZI BITCOIN ===")
print("Seleziona il tipo di indirizzo:")
print("1. P2PK")
print("2. P2PKH")
print("3. P2SH")
print("4. P2WPKH")
print("5. P2TR")
choice = input("Inserisci la tua scelta: ").strip()
scripts = {
'1': 'src/p2pk.py',
'2': 'src/p2pkh.py',
'3': 'src/p2sh.py',
'4': 'src/p2wpkh.py',
'5': 'src/p2tr.py'
}
if choice in scripts:
try:
subprocess.run([sys.executable, scripts[choice]], check=True)
except subprocess.CalledProcessError as e:
print(f"Errore nell'esecuzione dello script: {e}")
except KeyboardInterrupt:
print("\nOperazione interrotta.")
else:
print("Scelta non valida.")
if __name__ == '__main__':
main()