Do not use on any
shared computer
August 29, 2008 11:56pm pdt
 
[x]
Attachment Details

Regarding Popen in python

Hi.. I am using python script for running other script present in apache bin dir and i am using Popen function to run.

The apache script which i want to run is htpasswd which takes username as input and asks for password two times.

i am able to run the script but before i am entering the password ...the prompt is going for retype the password

Please find the function of code i have attached.
1:
2:
3:
4:
5:
6:
7:
8:
def createpassword(config, options, username):
    out = file( config["logs_dir"] + "/httpd.log", "a+" )
    passwd = config["apache_dir"] + "/bin/htpasswd"
    passwd_dir = config["passwd_dir"] + "/.htpasswd"
    args = [passwd, "-c", passwd_dir, username]
    proc = Popen(args,env=os.environ, stdin=PIPE, stdout=PIPE, stderr=STDOUT )
    log( "create passwd args:", args )
    return proc
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: kranthi_50404
Question Asked On: 07.01.2008
Participating Experts: 1
Points: 500
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Author Comment by kranthi_50404
Author Comment by kranthi_50404:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by pepr

Rank: Guru

Expert Comment by pepr:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by kranthi_50404
Author Comment by kranthi_50404:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628