|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming | |
What is the exit program command for python?
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||
|
New to Overclock.net
|
I am making a small program that needs a password, so the way i am doing the password is:
__________________password = raw_input("Enter your password: ") if password == "secret": print "Access Granted" if password != "secret": ??? How do i make it exit the program?
|
|||||||||||
|
|
|
|
|
#2 (permalink) | ||||||||||||
|
Spot on there mate
![]() ![]() |
Are your codeing this in VisualBasic? If so all you need to put is "end".
Code:
application.exit
|
||||||||||||
|
|
|
|
#3 (permalink) | ||||||||||||||
|
Photography nut
![]() |
Well I don't know python, but I know in Perl and Ruby (two lanuages similar to python) you can type:
exit; or 0; to exit the current block.
__________________
"UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." - Doug Gwyn Try out the latest Programming Challenge Quote:
CPU-Z Validation @ 2.97-prime95 stable 16 hours @ 1.48v Proof | CPU-Z Validation @ 3.15 Getting Mouse Side Buttons to work in Linux, Compile a custom Kernel, More
|
||||||||||||||
|
|
|
|
#4 (permalink) | ||||||||||||
|
New to Overclock.net
|
Quote:
|
||||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|