₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,651 members, 8,427,445 topics. Date: Monday, 15 June 2026 at 11:10 PM

Toggle theme

Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingIs There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co (13259 Views)

1 Reply (Go Down)

Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by Nobody: 7:59am On Jan 30, 2010
Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the code
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by IG: 7:19pm On Jan 30, 2010
I don't do Python yet but the general trick is to try to read a line of input from the user. That way the console will not disappear since it's waiting for an input.
You can print "Press Any Key To Continue" before that. So whatever subsequent input is made, you just end the program.
Hope that helps.
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by IG: 8:07pm On Jan 30, 2010
I've just checked out a little bit of Python syntax. I think the following is an example of my last post.


print "Press any key to continue"
a=raw_input()


Now the interpreter will be waiting for an input and so the program will not exit.
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by Nobody: 9:04pm On Jan 30, 2010
@IG, tanx I got it,
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by Nobody: 6:10pm On Feb 07, 2010
yea, thats it
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by Nobody: 11:26pm On May 24, 2010
You can try dis if u want it 2 pause 4 some secs
import time
print('Hello World')
time.sleep(10) #it pauses 4 10 secs i hope dis helped
Re: Is There Any Statement Like C System''pause'' For Python Cos It Dissappears Immediately I run the co by jacob05(m): 6:24pm On May 31, 2010
hmm. python me love,
1 Reply

5-super Useful And Lightweight Chrome Extensions For Python CodingPls How Do I Run My Java Program Using JdkHELP!!! I Need Help On Installing "MECHANIZE" For Python..234

Dr. Chinedu Emeka Invents Computer Software To Track CriminalsArduino Programming Boards, Shields, And Sensors PurchasesData Scientists In Nigeria, Lets Talk