Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › What is the exit program command for python?
New Posts  All Forums:Forum Nav:

What is the exit program command for python?

post #1 of 4
Thread Starter 
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?
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
post #2 of 4
Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
application.exit
post #3 of 4
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.
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
post #4 of 4
Thread Starter 
Quote:
Originally Posted by t4ct1c47 View Post
Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
application.exit
]

My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4800 Brisbane Gigabyte GA-M55Plus-s3g EVGA 7600GS 1gb 
Hard DriveOSMonitorPower
1x160, 1x120, 1x40 1x20 Win Vista Ultimate sceptre 20 inch widescreen Orion 580 Watt 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › What is the exit program command for python?