python to exe convert part of the code
Question: Very good, anyone know if I can make exe single piece of code in a script, for
example:

one file (hello.py):

    
    
    print('hello word')
    
    def exit():
        print('good bye')
    

two file (setup.py):

    
    
    from distutils.core import setup
    import py2exe
    import sys
    import hello
    
    
    if len(sys.argv) == 1:
        sys.argv.append("py2exe")
        sys.argv.append("-q")
    
    
    options = {
        #"bundle_files": 1,
        "dll_excludes": ["w9xpopen.exe"] # we don't need this
        }
    
    setup(name = "python",
        description = "aplicacion python",
        version = "1.0",
        console = [
            {
                "script":"hello.exit()",
                #"icon_resources": [(0, "res_python.ico")]
            }
        ],
        options = {"py2exe": options},
        zipfile = None,
    
        )
    

for a better explanation, I create the exe from the same file, thanks.


Answer: file setup.py :

    
    
    from distutils.core import setup
    import py2exe
    import sys
    import shell
    
    main = shell.shell()
    
    if len(sys.argv) == 1:
        sys.argv.append("py2exe")
        sys.argv.append("-q")
    
    
    options = {
        #"bundle_files": 1,
        "dll_excludes": ["w9xpopen.exe"] # we don't need this
        }
    
    setup(name = "python",
        description = "aplicacion python",
        version = "1.0",
        console = [
            {
                "script":"main.conexion()",
                #"icon_resources": [(0, "res_python.ico")]
            }
        ],
        options = {"py2exe": options},
        zipfile = None,
    
        )
    

idle response:

**running py2exe creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build\bdist.win32 creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build\bdist.win32\winexe creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build\bdist.win32\winexe\collect-2.7 creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build\bdist.win32\winexe\bundle-2.7 creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\build\bdist.win32\winexe\temp creating C:\Documents and
Settings\francisco\Escritorio\programas python\mis_proyectos\shell
reverse\dist _**searching for required modules**_**

