Pass variable to subprocess call in python
<p>I am trying to pass my variables from raw_input to my subprocess command. I am new to python. Any help would he appreciated. </p>

<pre><code>#!/usr/bin/python

import subprocess

"""THIS SCRIPT WILL ALLOW YOU TO INTERACTIVELY ADD USERS ON A LINUX SERVER ONLY"""

"""REV 0.1A"""

print "\nWhat user name"
username = str(raw_input('username: '))
print "\nWhat is the user id"
userid = int(raw_input('Enter user id: '))
print "\nWhat is the user\'s primary group?"
primarygroup = int(raw_input('Enter group: '))
print "\nWhat is the user\'s secondary group?"
secondarygroup = int(raw_input('Enter group: '))

subprocess.call(['useradd' '-m' '-g' _primarygroup '-G' _secondarygroup '-u' _userid _username])

print"\nThe user has been added"
</code></pre>
