Keep cmd alive?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gloomer
    New Member
    • Apr 2007
    • 13

    Keep cmd alive?

    When you double click your .py script, it opens up in a command prompt. For those in Windows.

    I need a code to keep the black command prompt window open.

    As soon as I open it, it closes really fast again.

    How do I fix this?
  • ghostdog74
    Recognized Expert Contributor
    • Apr 2006
    • 511

    #2
    Originally posted by gloomer
    When you double click your .py script, it opens up in a command prompt. For those in Windows.

    I need a code to keep the black command prompt window open.

    As soon as I open it, it closes really fast again.

    How do I fix this?
    you can put "pause" in your batch file, if you have done it through a batch, or use raw_input()

    Comment

    • gloomer
      New Member
      • Apr 2007
      • 13

      #3
      This isn't a batch file. It's a python script.

      What I want to do is be able to open it by double clicking on it.

      Not by having to navigate to this directory and executing it through the command prompt.

      When I click on it, I want it to stay open. Not open and close really quickly.

      Comment

      • ghostdog74
        Recognized Expert Contributor
        • Apr 2006
        • 511

        #4
        Originally posted by gloomer
        This isn't a batch file. It's a python script.

        What I want to do is be able to open it by double clicking on it.

        Not by having to navigate to this directory and executing it through the command prompt.

        When I click on it, I want it to stay open. Not open and close really quickly.
        please try the raw_input("Pres s key") method

        Comment

        Working...