#!/usr/bin/python # coding: utf8 # Import für Call https://docs.python.org/2/library/subprocess.html from subprocess import call # Import für os.system https://docs.python.org/2/library/os.html import os call(["ls", "-l"]) os.system("ps aux | grep -i apache > output_file") # User anlegen def createUser(name,username,password): encPass = crypt.crypt(password,"22") return os.system("useradd -p "+encPass+ " -s "+ "/bin/bash "+ "-d "+ "/home/" + username+ " -m "+ " -c \""+ name+"\" " + username) testVar = raw_input("Ask user for something.") print (testVar)