The follwing python script works fine, exept that the shell window remains open.
file = open("C:\\Documents and Settings\\User1\\Desktop\\BPanel\BadePanel\\SteelUsage.bsu", "a+")
input = raw_input("Please enter project name:")
input = input.upper ()
for line in file.readlines():
if input in line:
print "Project name already exists, executing BadePanel"
import time
time.sleep(4)
import subprocess
subprocess.call(['C:\\Documents and Settings\\User1\\Desktop\\BPanel\BadePanel\\BadePanel.exe'])
exit(subprocess)
file.write (input+"\n")
print "Project name written to file, executing BadePanel"
import time
time.sleep(4)
import subprocess
subprocess.call(['C:\\Documents and Settings\\User1\\Desktop\\BPanel\BadePanel\\BadePanel.exe'])
exit(subprocess)
file.close()
The shell window terminates ony after i close the exeuted progrm (BadePanel.exe)
I would like the script to display the printed text in the shell window, wait 4 secs, execute the program, and then exit.
Thanks