py2exe

Discussion in 'Python' started by Gandalf, Oct 30, 2008.

  1. Gandalf

    Gandalf Guest

    I'm new to py2exe.

    i'm using python 2.5 on XP
    and py2exe 0.6.6


    does someone know what may be wrong with this script:

    from distutils.core import setup

    import py2exe

    setup(console=['babylon.py'],

    options = {

    "py2exe": {

    "packages": ["pyHook", "encodings", "pywinauto",

    "pywinauto.controls", "pywinauto.tests", "urllib2", "pyTTS"],

    "excludes" : ["sendkeys"],

    }

    }

    )


    if you need more information please tell me...

    thank you
    Gandalf, Oct 30, 2008
    #1
    1. Advertising

  2. Gandalf

    Gandalf Guest

    OK this question is not clear enough.

    I'm trying to convert my python script to executable file.
    it seems than the simple setup(console=['file.py']) won't work in my
    case because i use unsupported modules (like pywinauto and extra).

    this are the modules I import:

    import wx
    import wx.html as html
    import pythoncom, pyHook
    from pywinauto import win32defines
    from pywinauto.controls.HwndWrapper import win32functions
    from pywinauto.controls.HwndWrapper import HwndWrapper
    from pywinauto.controls.HwndWrapper import win32structures
    from pywinauto.controls.HwndWrapper import time
    from pywinauto.controls.HwndWrapper import Timings
    from pywinauto.controls.HwndWrapper import ctypes
    from pywinauto import win32defines
    from pywinauto import win32functions
    from pywinauto.controls.HwndWrapper import SendKeys
    import sys
    import urllib2
    import re

    import pywinauto.clipboard
    import sqlite3 as lite

    import time
    import pyTTS

    can someone please show me the right way to right write my setup.py
    script?

    thank you!
    Gandalf, Oct 30, 2008
    #2
    1. Advertising

  3. On Oct 30, 7:19 am, Gandalf <> wrote:
    > I'm new to py2exe.
    >
    > i'm using python 2.5 on XP
    > and py2exe 0.6.6
    >
    > does someone know what may be wrong with this script:
    >
    > from distutils.core import setup
    >
    > import py2exe
    >
    > setup(console=['babylon.py'],
    >
    > options = {
    >
    > "py2exe": {
    >
    > "packages": ["pyHook", "encodings", "pywinauto",
    >
    > "pywinauto.controls", "pywinauto.tests", "urllib2", "pyTTS"],
    >
    > "excludes" : ["sendkeys"],
    >
    > }
    > }
    >
    > )
    >
    > if you need more information please tell me...
    >
    > thank you


    You need to post the error or at least what the issue is as well. And
    why are you importing wx and then creating a console (i.e. command-
    line interface) program?

    I prefer to use GUI2Exe for creating executables: http://code.google.com/p/gui2exe/

    Mike
    Mike Driscoll, Oct 30, 2008
    #3
  4. Gandalf

    Tim Roberts Guest

    Gandalf <> wrote:
    >
    >OK this question is not clear enough.
    >
    >I'm trying to convert my python script to executable file.
    >it seems than the simple setup(console=['file.py']) won't work in my
    >case because i use unsupported modules (like pywinauto and extra).


    If you have explicit imports, py2exe can figure those out. You should be
    able to see that in the "dist" directory. However, wxPython needs some
    extra modules and DLLs that py2exe is not able to figure out. I believe
    the wxPython web site talks about this. Google wxPython and py2exe for
    hints.
    --
    Tim Roberts,
    Providenza & Boekelheide, Inc.
    Tim Roberts, Oct 31, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Schneider

    Re: py2exe and dynamic service installation ?

    Harald Schneider, Jun 24, 2003, in forum: Python
    Replies:
    0
    Views:
    1,145
    Harald Schneider
    Jun 24, 2003
  2. F. GEIGER
    Replies:
    0
    Views:
    893
    F. GEIGER
    Aug 16, 2004
  3. python
    Replies:
    3
    Views:
    1,748
    Simon Brunning
    May 22, 2006
  4. Chris Spencer

    Re: [Py2exe-users] py2exe 0.6.9 released

    Chris Spencer, Nov 17, 2008, in forum: Python
    Replies:
    3
    Views:
    553
    Pascal
    Dec 8, 2008
  5. Mark Hammond

    RE: [Py2exe-users] py2exe 0.6.9 released

    Mark Hammond, Nov 17, 2008, in forum: Python
    Replies:
    0
    Views:
    441
    Mark Hammond
    Nov 17, 2008
Loading...

Share This Page