I am new to programming and python in general I have written a couple of beginner programs now I am working on my first one and I have hit a bump I am using the IDLE interface and using 2.5. I have a repetitive task I do at work which is i open up a command prompt and then I type in "tasklist.exe /s edf006176" (the number after the 00 is a different 4 digits everytime it's just a computer name) and press enter it then gives me a command prompt that shows all the processes a user is running on their machine. I would like to automate it where is just asks me for the last four digits of the computer name and then types "tasklist.exe /s edf00 and then the last 4 digits of the computer name. This is what I have so far:

x = raw_input("What is the computer name? (minus edf00) ")
print "tasklist.exe /s edf00" + x
raw_input("Press <enter>")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.