def new_project(prj_path): from os import makedirs, path fn = path.join(prj_path, 'modules', 'ez_templates') makedirs(fn) fn = path.join(fn, '__init__.py') file(fn, 'w' ) fn = path.join(prj_path, 'modules', 'ez_controls') makedirs(fn) fn = path.join(fn, '__init__.py') file(fn, 'w') fn = path.join(prj_path, 'home') makedirs(fn) fn = path.join(fn, '.htaccess') fo = file(fn, 'w') fo.write(''' RewriteEngine On RewriteRule ^$ /ez_web SetHandler mod_python PythonHandler ez_web.mod_python_hdr PythonPath "sys.path + ['%s']" ''' % (path.join(prj_path, 'modules'),)) pass if __name__ == '__main__': import os prj_path = os.getcwd() new_project(prj_path) pass