Python, cx_freeze and Windows console

I use cx_freeze to create an executable for Windows.

It works fine, but when I type all my variables, I get the calculated value of V, and then the console application closes right after.

What I need is pretty trivial: the name of the command or function that will keep the console open after calculating the last value.

Please give a hint if you know.

   print "Caculate bullet speed measurement with the use of Ballistic Pendulum. Warning: only numbers are allowed!"
    M = float(raw_input("enter M value: "))
    R = float(raw_input("enter R value: ")) 
    m = float(raw_input("enter m value: ")) 
    l = float(raw_input("enter l value: "))
    g = float(raw_input("enter g value: "))
    s = float(raw_input("enter s value: "))
    t = float(raw_input("enter t value: "))
    n = float(raw_input("enter n value: "))
    pi = 3.14
    #we could use math.py module but a permanent value is fine
    #or use division where one value is float e.g. 22.0/7
    A = ((M * R + m * l) * g * s * t)
    B = (2 * pi * n * m *(l ** 2))
    print "V =", A/B
+3
source share
1 answer

Finish it with

raw_input("press enter to close.")
+4
source

All Articles