summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorbwarsaw1998-05-26 17:59:50 +0000
committerbwarsaw1998-05-26 17:59:50 +0000
commit081a92c1b28f1ad2ff3a7894369a682da638ebda (patch)
tree6a54507323ab097bffab2fb0573c992e1c732911 /cgi
parente4987db65d570a40f78bd33ee46840e29785b35c (diff)
downloadmailman-081a92c1b28f1ad2ff3a7894369a682da638ebda.tar.gz
mailman-081a92c1b28f1ad2ff3a7894369a682da638ebda.tar.zst
mailman-081a92c1b28f1ad2ff3a7894369a682da638ebda.zip
1. Use the standard Python invocation #! line to get the interpreter
from $PATH 2. Do no direct sys.path munging in this file. Import the `paths' module, which is created during the configure process, and which performs all necessary path munging (and exports some useful variables too). 3. Remove RCS crud
Diffstat (limited to 'cgi')
-rwxr-xr-xcgi/admin7
-rwxr-xr-xcgi/admindb8
-rwxr-xr-xcgi/archives9
-rwxr-xr-xcgi/edithtml7
-rwxr-xr-xcgi/handle_opts8
-rwxr-xr-xcgi/listinfo8
6 files changed, 21 insertions, 26 deletions
diff --git a/cgi/admin b/cgi/admin
index f145c08a9..69f3d9b5d 100755
--- a/cgi/admin
+++ b/cgi/admin
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -20,11 +21,11 @@
To run stand-alone for debugging, set env var PATH_INFO to name of list
and, optionally, options category."""
-__version__ = "$Revision: 547 $"
+__version__ = "$Revision: 564 $"
import sys
-sys.path.append('/home/mailman/mailman/modules')
import os, cgi, string, crypt, types
+import paths # path hacking
import mm_utils, maillist, mm_cfg, mm_err
from htmlformat import *
diff --git a/cgi/admindb b/cgi/admindb
index bd1216958..c027dc16a 100755
--- a/cgi/admindb
+++ b/cgi/admindb
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -17,12 +18,9 @@
"""Produce and process the pending-approval items for a list."""
-__version__ = "$Revision: 547 $"
-
import sys
-sys.path.append('/home/mailman/mailman/modules')
-
import os, cgi, string, crypt, types
+import paths # path hacking
import mm_utils, maillist, mm_err, htmlformat
try:
diff --git a/cgi/archives b/cgi/archives
index 08497df27..3640e0166 100755
--- a/cgi/archives
+++ b/cgi/archives
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env/python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -17,12 +18,12 @@
# This script is being deprecated, in favor hookups for an external archiver.
-# We don't need to lock in this script, because we're never going to change data.
+# We don't need to lock in this script, because we're never going to change
+# data.
import sys
-sys.path.append('/home/mailman/mailman/modules')
-
import os, types, posix, string
+import paths # path hacking
import mm_utils, maillist, htmlformat
try:
diff --git a/cgi/edithtml b/cgi/edithtml
index f721953e8..3c4fe3887 100755
--- a/cgi/edithtml
+++ b/cgi/edithtml
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -17,11 +18,9 @@
"""Script which implements admin editing of the list's html templates."""
-__version__ = "$Revision: 547 $"
-
import sys
-sys.path.append('/home/mailman/mailman/modules')
import os, cgi, string, crypt, types
+import paths # path hacking
import mm_utils, maillist, mm_cfg
import htmlformat
diff --git a/cgi/handle_opts b/cgi/handle_opts
index cdd92e96f..f8fcd1da1 100755
--- a/cgi/handle_opts
+++ b/cgi/handle_opts
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -17,12 +18,9 @@
"""Process input to user options form."""
-__version__ = "$Revision: 547 $"
-
import sys
-sys.path.append('/home/mailman/mailman/modules')
-
import os, cgi, string
+import paths # path hacking
import mm_utils, maillist, mm_err, mm_cfg, htmlformat
try:
diff --git a/cgi/listinfo b/cgi/listinfo
index 9aa031004..a563bd2f8 100755
--- a/cgi/listinfo
+++ b/cgi/listinfo
@@ -1,4 +1,5 @@
-#!/usr/local/bin/python
+#! /usr/bin/env python
+#
# Copyright (C) 1998 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -19,15 +20,12 @@
Errors are redirected to logs/errors."""
-__version__ = "$Revision: 547 $"
-
# No lock needed in this script, because we don't change data.
import sys
-sys.path.append('/home/mailman/mailman/modules')
-
import os, string
from regsub import gsub
+import paths # path hacking
import mm_utils, maillist, mm_cfg
from htmlformat import *