Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 07-10-07   #1 (permalink)
New to Overclock.net
 
amd nvidia

Join Date: Apr 2007
Posts: 76

Rep: 0 shook2000 Unknown
Unique Rep: 0
Trader Rating: 0
Default What is the exit program command for python?

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?
__________________
System: My System
CPU
AMD X2 4800 Brisbane
Motherboard
Gigabyte GA-M55Plus-s3g
Memory
1gb
Graphics Card
EVGA 7600GS
Hard Drive
1x160, 1x120, 1x40 1x20
Sound Card
onboard
Power Supply
Orion 580 Watt
CPU cooling
Big Tyhpoon
OS
Win Vista Ultimate
Monitor
sceptre 20 inch widescreen
shook2000 is offline   Reply With Quote
Old 07-10-07   #2 (permalink)
Spot on there mate
 
t4ct1c47's Avatar
 
intel nvidia

Join Date: Dec 2005
Location: Staffordshire University
Posts: 4,275
Blog Entries: 4

FAQs Submitted: 2
Folding Team Rank: 283
Hardware Reviews: 4
Trader Rating: 3
Default

Are your codeing this in VisualBasic? If so all you need to put is "end".

Code:
application.exit

System: Difference Engine
CPU
Core2 Quad Q6600 @ 3.4Ghz
Motherboard
Asus P5N32-E SLi
Memory
4GB Corsair XMS2 PC6400
Graphics Card
GeForce GTX260 SLi
Hard Drive
320GB (x2) and 120GB (x2) SATA
Sound Card
Asus Xonar D2
Power Supply
Tagan 900W
Case
Thermaltake Shark
CPU cooling
Tuniq Tower 120
OS
Vista x64 Business
Monitor
Samsung 226BW 22" LCD
t4ct1c47 is online now I fold for Overclock.net Overclocked Account t4ct1c47's Gallery   Reply With Quote
Old 07-10-07   #3 (permalink)
Photography nut
 
dangerousHobo's Avatar
 
amd nvidia

Join Date: Dec 2005
Location: ~/
Posts: 3,470

FAQs Submitted: 7
Folding Team Rank: 390
Trader Rating: 0
Default

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:
Originally Posted by Melcar
Only one reasonable way to solve this... a dance off.

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

System: Anomaly
CPU
Athlon 3700 SD(KACAE)0546 @3.02ghz
Motherboard
DFI UT nF4 Ultra-D
Memory
G.Skill 2x512 UTT(BH-5)
Graphics Card
evga 6800gs
Hard Drive
Maxtor 300GB + WD 250GB
Sound Card
onboard
Power Supply
Ultra 500w V-series
Case
one from Ultra
CPU cooling
Big Typhoon
GPU cooling
80mm fan mounted on
OS
Arch64
Monitor
Acer AL2216W 22" WS LCD
dangerousHobo is offline I fold for Overclock.net Overclocked Account dangerousHobo's Gallery   Reply With Quote
Old 07-10-07   #4 (permalink)
New to Overclock.net
 
amd nvidia

Join Date: Apr 2007
Posts: 76

Rep: 0 shook2000 Unknown
Unique Rep: 0
Trader Rating: 0
Default

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
]

__________________
System: My System
CPU
AMD X2 4800 Brisbane
Motherboard
Gigabyte GA-M55Plus-s3g
Memory
1gb
Graphics Card
EVGA 7600GS
Hard Drive
1x160, 1x120, 1x40 1x20
Sound Card
onboard
Power Supply
Orion 580 Watt
CPU cooling
Big Tyhpoon
OS
Win Vista Ultimate
Monitor
sceptre 20 inch widescreen
shook2000 is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 02:07 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.27045 seconds with 8 queries