Thread: about py2exe

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    1
    Rep Power
    0

    about py2exe


    there's one question

    i have some *.py files,
    a.py import someting from b.py

    but when i use py2exe to pack it,
    it seems py2exe doesn't pack b.py into this package

    how to pack them all ?
    Last edited by ahduo; June 5th, 2003 at 08:35 AM.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69

    Setup.py


    Py2exe needs a setup file so it knows which modules to include. if you read down there website it gives you a few examples/explanations but heres a little one..

    # setup.py
    from distutils.core import setup
    import b
    import py2exe

    setup(name="myscript",
    scripts=["myscript.py"],
    data_files=[("bitmaps",
    ["bm/large.gif", "bm/small.gif"])]
    )

    also see - http://starship.python.net/crew/theller/py2exe/

    Hope this helps.

    Mark

IMN logo majestic logo threadwatch logo seochat tools logo