Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Program keeps closing unexpectedly...

(Jan 13, 2014 05:57 PM)W R T Wrote:  Hey HF,

Well I am trying to make a basic repair tool using Python, it's being a real dick to me so I decided to ask for help...

Here's the current code...

PHP Code

<?php 
print("Hello and thanks for using Mike's Desktop AIO Repair Tool!")
raw_input("Press any key to continue...")
print(
"So what would you like to do?")
print(
"1) Scan HDD for errors & bad sectors.")
print(
"2) Fix registry errors.")
print(
"3) Scan for viruses and malware.")
raw_input("Press any key to continue...")

choice == raw_input("Please select an option...")
if 
choice == "1":
    
raw_input("Press any key to continue...")
    print(
"Now scanning HDD for errors!")
    print(
"Test...") 

What I want it to do is, after it says Now scanning HDD for errors! I want it to open command prompt, BUT I want the Python program to stay OPEN.

Can someone tell me how to make python open Command Prompt BUT keep python running as well?

I can't figure that part out :/

Cheers,
Mike

Add raw_input() to the end of your script, and that will keep the console window open
(Jan 13, 2014 06:48 PM)W R T Wrote:  Still doesn't work, It just closes again.

Try running it from command prompt, or terminal if you're on linux, and see if it gives you an error


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by SwagDoggerMar 18, 2015 11:51 AM 4 118 Mar 18, 2015 11:51 AM
Last Post: Nuclear3mbargo
[C] by XerifApr 2, 2014 04:11 AM 9 314 Apr 2, 2014 04:11 AM
Last Post: Nichole
[.NET] by geraldososaJan 25, 2014 09:02 AM 4 121 Jan 25, 2014 09:02 AM
Last Post: geraldososa