]> granicus.if.org Git - python/commitdiff
import base64 at the top to avoid two different imports at other times
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 4 Jun 2002 20:55:10 +0000 (20:55 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 4 Jun 2002 20:55:10 +0000 (20:55 +0000)
Lib/distutils/command/bdist_wininst.py

index 6a985f190bd42c2348dfe98b2e6e76a309c69e39..f018f4616f8a7af9229c459abc7daf9ba1931dda 100644 (file)
@@ -8,6 +8,7 @@ exe-program."""
 __revision__ = "$Id$"
 
 import sys, os, string
+import base64
 from distutils.core import Command
 from distutils.util import get_platform
 from distutils.dir_util import create_tree, remove_tree
@@ -231,7 +232,6 @@ class bdist_wininst (Command):
     # create_exe()
 
     def get_exe_bytes (self):
-        import base64
         return base64.decodestring(EXEDATA)
 # class bdist_wininst
 
@@ -248,7 +248,7 @@ if __name__ == '__main__':
     # - Built wininst.exe from the MSVC project file distutils/misc/wininst.dsw
     # - Execute this file (distutils/distutils/command/bdist_wininst.py)
 
-    import re, base64
+    import re
     moddata = open("bdist_wininst.py", "r").read()
     exedata = open("../../misc/wininst.exe", "rb").read()
     print "wininst.exe length is %d bytes" % len(exedata)