How to run a program in python?
- by Luka Mihaldinec
this is my code. I'm trying to make a script which would run an .exe file from my computer. And this one isn't working :/ I think I'm using the wrong command.. I tried all the other commands like import os, os.startfile, but they won't work too. I think my code is just wrong :P
loop=0
while loop==0:
answer=raw_input("coded by: Narralol\n\n"
"Pick a task:\n"
"1) Start Minecraft.exe\n"
"2) Start Minecraft_Server.jar\n"
"3) Backup your server\n"
"4) Copy the backup to your desktop\n"
"5) Exit\n")
if answer==1:
execfile('D:\Games\Minecraft\Minecraft.exe')
elif answer==2:
execfile('D:\Games\Minecraft\Minecraft_server.jar')
elif answer==5:
loop=1