py2exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gandalf

    py2exe

    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.cont rols", "pywinauto.test s", "urllib2", "pyTTS"],

    "excludes" : ["sendkeys"],

    }

    }

    )


    if you need more information please tell me...

    thank you
  • Gandalf

    #2
    Re: py2exe

    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.contr ols.HwndWrapper import win32functions
    from pywinauto.contr ols.HwndWrapper import HwndWrapper
    from pywinauto.contr ols.HwndWrapper import win32structures
    from pywinauto.contr ols.HwndWrapper import time
    from pywinauto.contr ols.HwndWrapper import Timings
    from pywinauto.contr ols.HwndWrapper import ctypes
    from pywinauto import win32defines
    from pywinauto import win32functions
    from pywinauto.contr ols.HwndWrapper import SendKeys
    import sys
    import urllib2
    import re

    import pywinauto.clipb oard
    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!

    Comment

    • Mike Driscoll

      #3
      Re: py2exe

      On Oct 30, 7:19 am, Gandalf <goldn...@gmail .comwrote:
      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.cont rols", "pywinauto.test s", "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

      Comment

      • Tim Roberts

        #4
        Re: py2exe

        Gandalf <goldnery@gmail .comwrote:
        >
        >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, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        Working...