22 lines
699 B
Python
Executable File
22 lines
699 B
Python
Executable File
import subprocess
|
|
import sys
|
|
|
|
# Certifique-se de usar 'python3' no Ubuntu
|
|
python_executable = 'python3' if sys.platform != 'win32' else 'python'
|
|
|
|
try:
|
|
# Executar o script Python
|
|
subprocess.run([python_executable, '_extensions/moan-livro/preparacao-moan-pre.py'], check=True)
|
|
|
|
# Executar o comando no terminal
|
|
subprocess.run(['quarto', 'render', '--cache-refresh'], check=True)
|
|
|
|
except FileNotFoundError as e:
|
|
print(f"Erro: {e}")
|
|
print("Certifique-se de que os comandos e caminhos estão corretos.")
|
|
except subprocess.CalledProcessError as e:
|
|
print(f"Erro ao executar o comando: {e}")
|
|
finally:
|
|
input("Pressione qualquer botão para encerrar...")
|
|
|