Thread replies: 12
Thread images: 2
Anonymous
Shitty child programming error :(
2016-05-05 04:28:04 Post No. 54386940
[Report]
Image search:
[Google]
Shitty child programming error :(
Anonymous
2016-05-05 04:28:04
Post No. 54386940
[Report]
I'm VERY new to programming at the moment, just starting out with some python. I have this script here that I'm trying to run :
#!/usr/bin/python
from os import system
def pingz():
system('ping -c 5 %(ab)s' % locals())
return;
def trace_route():
system('traceroute %(cd)s' % locals())
return;
print("Bitch_Ass_Name's Web Utility:")
print("____________________\n")
print(" 1)Ping a website/IP Address.\n")
print(" 2)Trace the route to a website/IP Address.\n")
print(" 3)Whois inforation.\n")
choice = raw_input("What would you like to do? \n")
if choice == 1:
ab = raw_input("Please enter the domain name/IP address:\n")
pingz()
elif choice == 2:
cd = raw_input("Please enter the domain name/IP Adress:\n"
trace_route()
else:
print "Please restart the script...you trickster, you."
When I try running it I get a "File ./test2.py, line 22
trace_route()
^
SyntaxError: invalid syntax"
Why am I getting a syntax error for the trace_route but not pingz()? It's the same fucking syntax :( What am I doing wrong? Besides being a shitty programmer who can't RTFM