Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into fibre
[myslice.git] / plugins / cafe-1.0 / sub.py
1 #!/usr/bin/env python
2
3 #Edelberto from manifoldauth
4 import os,sys
5 import subprocess
6 import shlex
7 import getpass
8 from hashlib import md5
9 import time
10 from random import Random
11 import crypt
12         
13 username = 'teste'
14 password = '123'
15
16 command = '/var/www/manifold/manifold/bin/adduser.py ' + username + ' ' + password
17     #command = 'ls -la'
18 args = shlex.split(command)
19 p = subprocess.Popen(args, stdin=subprocess.PIPE).communicate()[0]
20 print command
21 print args
22 print p