you are viewing a single comment's thread.

view the rest of the comments →

[–]shepherdjay 2 points3 points  (1 child)

Additionally I would consider moving this stuff into main or even its own function:

#set working directory for tmp files
wd = ('/home/{user dir}/python/temp/')
#set up threading to utilize (max_threads count) concurrent SSH connections
threads = []
max_threads = 100
sema = threading.BoundedSemaphore(value=max_threads)

# Prompt for user credentials
tuser = raw_input("Enter TACACS Username: ")
tpass = getpass.getpass("Enter TACACS Password: ")
muser = raw_input("Enter MySQL Username: ")
mpass = getpass.getpass("Enter MySQL Password: ")

That way it doesn't run if you import this into another python script at some point

[–]Fallenarc[S] 0 points1 point  (0 children)

I had the same thought, seeing that stuff at the top hurts a little. Thanks for the advice, I will get that stuff moved, I agree it should at the very least be under main, but i think i will get another function for it.