[Zope] RE: NEVERMIND - Basic Python Question

Laura McCord Laura.McCord at doucet-austin.com
Wed May 19 09:28:16 EDT 2004


Nevermind I finally found an example that helped me out.

-----Original Message-----
From: Laura McCord 
Sent: Wednesday, May 19, 2004 8:19 AM
To: 'zope at zope.org'
Subject: Basic Python Question


I am writing a .htaccess file like below:

basedir = "12345678"
username = "joe"
dirpwd = "./htpasswd"
dirpath = "/var/www/html/test/" + basedir + "/.htpasswd"
filename=open(dirpath, 'w') filename.write("AuthType Basic")
filename.write("AuthName Password Required")
filename.write("AuthUserFile" + dirpwd) filename.write("Require user " +
username)

My question is how do I make each of my statements on a separate line.
Once the file is created it should look like this when the .htaccess is
opened:

AuthType Basic
AuthName "Password Required"
AuthUserFile /var/www/html/test/12345678/.htpasswd
Require user joe

Plus, filename.write("AuthName Password Required") how do I make
Password Required have quotes around it when written to the file?

Thanks,
 Laura



More information about the Zope mailing list