I'm mainly a C/C++ man, but I have been dabbling in Python24 for a week or 2 and I love it so far. But I'm having some problems trying to use py2exe to create a stand alone dist exe. Everything seems to work great.. Here, let me dump it to file and show ya.

I used the command line call for it.. like it said in the tut, "python setup.py py2exe"

What its doing is creating all the right files in the dir.. except for the main .exe

bz2.pyd
unicodedata.pyd
zlib.pyd
library.zip
MSVCR71.dll
Python24.dll
w9xpopen.exe

but not main exe! whats up with that?

Setup file is:

from distutils.core import setup
import py2exe
setup(name="destroyer1",
      scripts=["destroyer1.py"],
      )


Dump of py2exe output when I compile:

running py2exe
running build_scripts
creating build
creating build\scripts-2.4
copying destroyer1.py -> build\scripts-2.4
creating G:\Python24\build\bdist.win32
creating G:\Python24\build\bdist.win32\winexe
creating G:\Python24\build\bdist.win32\winexe\collect-2.4
creating G:\Python24\build\bdist.win32\winexe\bundle- 2.4
creating G:\Python24\build\bdist.win32\winexe\temp
creating G:\Python24\dist
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'zlib'
creating python loader for extension 'unicodedata'
creating python loader for extension 'bz2'
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling G:\Python24\build\bdist.win32\winexe\temp\bz2.py to bz2.pyc
byte-compiling G:\Python24\build\bdist.win32\winexe\temp\unicodedata.py to unicodedata.pyc
byte-compiling G:\Python24\build\bdist.win32\winexe\temp\zlib.py to zlib.pyc
byte-compiling G:\Python24\lib\StringIO.py to StringIO.pyc
byte-compiling G:\Python24\lib\UserDict.py to UserDict.pyc
byte-compiling G:\Python24\lib\atexit.py to atexit.pyc
byte-compiling G:\Python24\lib\base64.py to base64.pyc
byte-compiling G:\Python24\lib\codecs.py to codecs.pyc
byte-compiling G:\Python24\lib\copy.py to copy.pyc
byte-compiling G:\Python24\lib\copy_reg.py to copy_reg.pyc
byte-compiling G:\Python24\lib\dis.py to dis.pyc
byte-compiling G:\Python24\lib\encodings\__init__.py to encodings\__init__.pyc
creating G:\Python24\build\bdist.win32\winexe\collect-2.4\encodings
byte-compiling G:\Python24\lib\encodings\aliases.py to encodings\aliases.pyc
byte-compiling G:\Python24\lib\encodings\ascii.py to encodings\ascii.pyc
byte-compiling G:\Python24\lib\encodings\base64_codec.py to encodings\base64_codec.pyc
byte-compiling G:\Python24\lib\encodings\big5.py to encodings\big5.pyc
byte-compiling G:\Python24\lib\encodings\big5hkscs.py to encodings\big5hkscs.pyc
byte-compiling G:\Python24\lib\encodings\bz2_codec.py to encodings\bz2_codec.pyc
byte-compiling G:\Python24\lib\encodings\charmap.py to encodings\charmap.pyc
byte-compiling G:\Python24\lib\encodings\cp037.py to encodings\cp037.pyc
byte-compiling G:\Python24\lib\encodings\cp1006.py to encodings\cp1006.pyc
byte-compiling G:\Python24\lib\encodings\cp1026.py to encodings\cp1026.pyc
byte-compiling G:\Python24\lib\encodings\cp1140.py to encodings\cp1140.pyc
byte-compiling G:\Python24\lib\encodings\cp1250.py to encodings\cp1250.pyc
byte-compiling G:\Python24\lib\encodings\cp1251.py to encodings\cp1251.pyc
byte-compiling G:\Python24\lib\encodings\cp1252.py to encodings\cp1252.pyc
byte-compiling G:\Python24\lib\encodings\cp1253.py to encodings\cp1253.pyc
byte-compiling G:\Python24\lib\encodings\cp1254.py to encodings\cp1254.pyc
byte-compiling G:\Python24\lib\encodings\cp1255.py to encodings\cp1255.pyc
byte-compiling G:\Python24\lib\encodings\cp1256.py to encodings\cp1256.pyc
byte-compiling G:\Python24\lib\encodings\cp1257.py to encodings\cp1257.pyc
byte-compiling G:\Python24\lib\encodings\cp1258.py to encodings\cp1258.pyc
byte-compiling G:\Python24\lib\encodings\cp424.py to encodings\cp424.pyc
byte-compiling G:\Python24\lib\encodings\cp437.py to encodings\cp437.pyc
byte-compiling G:\Python24\lib\encodings\cp500.py to encodings\cp500.pyc
byte-compiling G:\Python24\lib\encodings\cp737.py to encodings\cp737.pyc
byte-compiling G:\Python24\lib\encodings\cp775.py to encodings\cp775.pyc
byte-compiling G:\Python24\lib\encodings\cp850.py to encodings\cp850.pyc
byte-compiling G:\Python24\lib\encodings\cp852.py to encodings\cp852.pyc
byte-compiling G:\Python24\lib\encodings\cp855.py to encodings\cp855.pyc
byte-compiling G:\Python24\lib\encodings\cp856.py to encodings\cp856.pyc
byte-compiling G:\Python24\lib\encodings\cp857.py to encodings\cp857.pyc
byte-compiling G:\Python24\lib\encodings\cp860.py to encodings\cp860.pyc
byte-compiling G:\Python24\lib\encodings\cp861.py to encodings\cp861.pyc
byte-compiling G:\Python24\lib\encodings\cp862.py to encodings\cp862.pyc
byte-compiling G:\Python24\lib\encodings\cp863.py to encodings\cp863.pyc
byte-compiling G:\Python24\lib\encodings\cp864.py to encodings\cp864.pyc
byte-compiling G:\Python24\lib\encodings\cp865.py to encodings\cp865.pyc
byte-compiling G:\Python24\lib\encodings\cp866.py to encodings\cp866.pyc
byte-compiling G:\Python24\lib\encodings\cp869.py to encodings\cp869.pyc
byte-compiling G:\Python24\lib\encodings\cp874.py to encodings\cp874.pyc
byte-compiling G:\Python24\lib\encodings\cp875.py to encodings\cp875.pyc
byte-compiling G:\Python24\lib\encodings\cp932.py to encodings\cp932.pyc
byte-compiling G:\Python24\lib\encodings\cp949.py to encodings\cp949.pyc
byte-compiling G:\Python24\lib\encodings\cp950.py to encodings\cp950.pyc
byte-compiling G:\Python24\lib\encodings\euc_jis_2004.py to encodings\euc_jis_2004.pyc
byte-compiling G:\Python24\lib\encodings\euc_jisx0213.py to encodings\euc_jisx0213.pyc
byte-compiling G:\Python24\lib\encodings\euc_jp.py to encodings\euc_jp.pyc
byte-compiling G:\Python24\lib\encodings\euc_kr.py to encodings\euc_kr.pyc
byte-compiling G:\Python24\lib\encodings\gb18030.py to encodings\gb18030.pyc
byte-compiling G:\Python24\lib\encodings\gb2312.py to encodings\gb2312.pyc
byte-compiling G:\Python24\lib\encodings\gbk.py to encodings\gbk.pyc
byte-compiling G:\Python24\lib\encodings\hex_codec.py to encodings\hex_codec.pyc
byte-compiling G:\Python24\lib\encodings\hp_roman8.py to encodings\hp_roman8.pyc
byte-compiling G:\Python24\lib\encodings\hz.py to encodings\hz.pyc
byte-compiling G:\Python24\lib\encodings\idna.py to encodings\idna.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp.py to encodings\iso2022_jp.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp_1.py to encodings\iso2022_jp_1.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp_2.py to encodings\iso2022_jp_2.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp_2004.py to encodings\iso2022_jp_2004.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp_3.py to encodings\iso2022_jp_3.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_jp_ext.py to encodings\iso2022_jp_ext.pyc
byte-compiling G:\Python24\lib\encodings\iso2022_kr.py to encodings\iso2022_kr.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_1.py to encodings\iso8859_1.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_10.py to encodings\iso8859_10.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_11.py to encodings\iso8859_11.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_13.py to encodings\iso8859_13.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_14.py to encodings\iso8859_14.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_15.py to encodings\iso8859_15.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_16.py to encodings\iso8859_16.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_2.py to encodings\iso8859_2.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_3.py to encodings\iso8859_3.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_4.py to encodings\iso8859_4.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_5.py to encodings\iso8859_5.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_6.py to encodings\iso8859_6.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_7.py to encodings\iso8859_7.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_8.py to encodings\iso8859_8.pyc
byte-compiling G:\Python24\lib\encodings\iso8859_9.py to encodings\iso8859_9.pyc
byte-compiling G:\Python24\lib\encodings\johab.py to encodings\johab.pyc
byte-compiling G:\Python24\lib\encodings\koi8_r.py to encodings\koi8_r.pyc
byte-compiling G:\Python24\lib\encodings\koi8_u.py to encodings\koi8_u.pyc
byte-compiling G:\Python24\lib\encodings\latin_1.py to encodings\latin_1.pyc
byte-compiling G:\Python24\lib\encodings\mac_cyrillic.py to encodings\mac_cyrillic.pyc
byte-compiling G:\Python24\lib\encodings\mac_greek.py to encodings\mac_greek.pyc
byte-compiling G:\Python24\lib\encodings\mac_iceland.py to encodings\mac_iceland.pyc
byte-compiling G:\Python24\lib\encodings\mac_latin2.py to encodings\mac_latin2.pyc
byte-compiling G:\Python24\lib\encodings\mac_roman.py to encodings\mac_roman.pyc
byte-compiling G:\Python24\lib\encodings\mac_turkish.py to encodings\mac_turkish.pyc
byte-compiling G:\Python24\lib\encodings\mbcs.py to encodings\mbcs.pyc
byte-compiling G:\Python24\lib\encodings\palmos.py to encodings\palmos.pyc
byte-compiling G:\Python24\lib\encodings\ptcp154.py to encodings\ptcp154.pyc
byte-compiling G:\Python24\lib\encodings\punycode.py to encodings\punycode.pyc
byte-compiling G:\Python24\lib\encodings\quopri_codec.py to encodings\quopri_codec.pyc
byte-compiling G:\Python24\lib\encodings\raw_unicode_escape.py to encodings\raw_unicode_escape.pyc
byte-compiling G:\Python24\lib\encodings\rot_13.py to encodings\rot_13.pyc
byte-compiling G:\Python24\lib\encodings\shift_jis.py to encodings\shift_jis.pyc
byte-compiling G:\Python24\lib\encodings\shift_jis_2004.py to encodings\shift_jis_2004.pyc
byte-compiling G:\Python24\lib\encodings\shift_jisx0213.py to encodings\shift_jisx0213.pyc
byte-compiling G:\Python24\lib\encodings\string_escape.py to encodings\string_escape.pyc
byte-compiling G:\Python24\lib\encodings\tis_620.py to encodings\tis_620.pyc
byte-compiling G:\Python24\lib\encodings\undefined.py to encodings\undefined.pyc
byte-compiling G:\Python24\lib\encodings\unicode_escape.py to encodings\unicode_escape.pyc
byte-compiling G:\Python24\lib\encodings\unicode_internal.py to encodings\unicode_internal.pyc
byte-compiling G:\Python24\lib\encodings\utf_16.py to encodings\utf_16.pyc
byte-compiling G:\Python24\lib\encodings\utf_16_be.py to encodings\utf_16_be.pyc
byte-compiling G:\Python24\lib\encodings\utf_16_le.py to encodings\utf_16_le.pyc
byte-compiling G:\Python24\lib\encodings\utf_7.py to encodings\utf_7.pyc
byte-compiling G:\Python24\lib\encodings\utf_8.py to encodings\utf_8.pyc
byte-compiling G:\Python24\lib\encodings\uu_codec.py to encodings\uu_codec.pyc
byte-compiling G:\Python24\lib\encodings\zlib_codec.py to encodings\zlib_codec.pyc
byte-compiling G:\Python24\lib\getopt.py to getopt.pyc
byte-compiling G:\Python24\lib\inspect.py to inspect.pyc
byte-compiling G:\Python24\lib\linecache.py to linecache.pyc
byte-compiling G:\Python24\lib\macpath.py to macpath.pyc
byte-compiling G:\Python24\lib\ntpath.py to ntpath.pyc
byte-compiling G:\Python24\lib\opcode.py to opcode.pyc
byte-compiling G:\Python24\lib\os.py to os.pyc
byte-compiling G:\Python24\lib\os2emxpath.py to os2emxpath.pyc
byte-compiling G:\Python24\lib\popen2.py to popen2.pyc
byte-compiling G:\Python24\lib\posixpath.py to posixpath.pyc
byte-compiling G:\Python24\lib\quopri.py to quopri.pyc
byte-compiling G:\Python24\lib\re.py to re.pyc
byte-compiling G:\Python24\lib\repr.py to repr.pyc
byte-compiling G:\Python24\lib\sre.py to sre.pyc
byte-compiling G:\Python24\lib\sre_compile.py to sre_compile.pyc
byte-compiling G:\Python24\lib\sre_constants.py to sre_constants.pyc
byte-compiling G:\Python24\lib\sre_parse.py to sre_parse.pyc
byte-compiling G:\Python24\lib\stat.py to stat.pyc
byte-compiling G:\Python24\lib\string.py to string.pyc
byte-compiling G:\Python24\lib\stringprep.py to stringprep.pyc
byte-compiling G:\Python24\lib\token.py to token.pyc
byte-compiling G:\Python24\lib\tokenize.py to tokenize.pyc
byte-compiling G:\Python24\lib\traceback.py to traceback.pyc
byte-compiling G:\Python24\lib\types.py to types.pyc
byte-compiling G:\Python24\lib\warnings.py to warnings.pyc
*** copy extensions ***
copying G:\Python24\DLLs\bz2.pyd -> G:\Python24\dist
copying G:\Python24\DLLs\unicodedata.pyd -> G:\Python24\dist
copying G:\Python24\DLLs\zlib.pyd -> G:\Python24\dist
*** copy dlls ***
copying G:\Python24\w9xpopen.exe -> G:\Python24\dist
copying G:\WINDOWS\system32\python24.dll -> G:\Python24\dist
setting sys.winver for 'G:\Python24\dist\python24.dll' to 'destroyer1'
copying G:\WINDOWS\system32\MSVCR71.dll -> G:\Python24\dist

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.

Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.

   ADVAPI32.dll - G:\WINDOWS\system32\ADVAPI32.dll
   SHELL32.dll - G:\WINDOWS\system32\SHELL32.dll
   KERNEL32.dll - G:\WINDOWS\system32\KERNEL32.dll
   USER32.dll - G:\WINDOWS\system32\USER32.dll


Main Code:

##############################################################
## Destroyer.py
## Intelligent Sabotage by Plague Studios
##############################################################
##
## Destroyer 0.1 beta - Bare bone test version
##
## ZeroBeat, Z3r0b34t, ViciousX420, Pwnisher of Plague Studios
##############################################################
#
#-----[ Module Import ]
#
import user
import sys
import base64
import os
import shutil
import getpass
import clips
import socket
import ftplib
import urllib
#
#-----[ Start of Variables ]
#
pwchk = 'ZGVhZg==\n' #This is the Password, use base64.decodestring(pwchk)
chk = 0
null = '                             '
bar = '============================='
path = os.access("G:/WINDOWS/destroyer", 1)
cwd = os.getcwd()
version = "Destroyer 0.1"
dirchk = os.access("G:/WINDOWS/destroyer", 1)
ok = "Ok."
#
#-----[ Core Initiation ]
#
clips.Reset() #Reset Clips
urllib.urlretrieve("http://rkunderground.servebeer.com/test/test.dl", "tmp") #Future planned use
#
# Code removed for testing

#

#
#-----[ Defining Functions ]
#
def chkpass(pasw):
    pascode = base64.encodestring(pasw)
    if 0 == cmp(pwchk, pascode):
        print "Validation complete."
        print null
        return 1
   
def ask_ok(prompt, retries=4, complaint='Yea or naw?'):
    while True:
        ok = raw_input(prompt)
        if ok in ('y', 'ye', 'yes', 'yea'): return True
        if ok in ('n', 'no', 'nop', 'nope', 'na', 'naw'): return False
        retries = retries - 1
        if retries < 0: raise IOError, 'refusenik user'
        print complaint
       
def ftp(n): #Not being used yet, remote download
    runftp = ftplib.FTP("rkunderground.servebeer.com")
    runftp.login()
    runftp.retrbinary('RETR README', open('README', 'wb').write)
    #Harmlessly downloads a README, but can download anything
    #May have possiblity in downloading and executing upgrades

def exe(cmd):
    if 0 == cmp('exit', cmd):
        if True == ask_ok("Do you really want to quit? "):
            exechk = 0
            return 0
        else:
            return 1
    elif 0 == cmp('restart', cmd):
        if True == ask_ok("Do you really want to restart? "):
            execfile("G:\Python24\source\destroyer\destroyer.py") # Needs to be made dynamic!
            return 1 # Only starts a fresh interface, how can I close the other?
        else:
            return 1
    elif 0 == cmp('help', cmd):
        print bar
        print version + " Help File"
        print bar
        print null
        make = open(os.getcwd() + "/help", 'w')
        ropen = open(cwd + "/help", 'r')
        shutil.copyfile(cwd + "\help", os.getcwd() + "/help.txt")
        read = ropen.read()
        print read
        print null
        print ropen
        print make
        print bar
        return 1
    elif 0 == cmp('copyright', cmd):
        print copyright
        return 1
    elif 0 == cmp('make rxp batch', cmd):
        make = open(os.getcwd() + "/Access.bat", 'w')
        copy = shutil.copyfile(cwd + "\Access.dl", os.getcwd() + "/Access.bat")
        print make
        print "File created."
        make.write(" ")
        return 1
    else:
        print "Unknown Command."
        return 1
   
def konsole(cwd):
    exechk = 1
    while 1 == exechk:
        print null
        print os.getcwd()
        cmd = raw_input("> ")
        exechk = exe(cmd)
    return 0
#
#-----[ Core Execution ]
#
print null
print bar
print version
print bar
print null
pasw = getpass.getpass()
if 1 == chkpass(pasw):
    pass
    print "Welcome", getpass.getuser()
    print "You are running an '" + os.name + "' based system."
    print null
    print "Initiating AI..."
    print 'Building... '
    buildclips = clips.BuildRule("DestroyCore0.1", "(destroyer)", "(assert (destroyer))", "Destroy All") # CLIPS Integration not yet implemented
    buildstr = str(buildclips)
    print ok
    print 'Asserting... '
    assertclips = clips.Assert("(destroyer)") # CLIPS Integration not yet implemented
    assertstr = str(assertclips)
    print ok
    print buildstr + " built as " + assertstr + ", and asserted."
    print null
    #ftp(1); #Code implemented for remote download of binary
    print "FTP Remote update is disabled."
    print "Core Initiation complete."
    while False == dirchk:
        os.mkdir("G:/Windows/destroyer")
        dirchk = os.access("G:/WINDOWS/destroyer", 1)
    os.chdir("G:/Windows/destroyer") # And let there be Windows!
    konsole(cwd); # Call to command loop
else:
    print "Not Welcome" # Boooooo

SystemExit

##EoF
--
"Do what thou wilt shall be the whole of the Law."