py2exe issues

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

    py2exe issues

    Since distutils is a recent topic (of sorts), I figured it was time to
    post my quandary.

    I have a utility I've written, and I wanted to create a standalone
    executable from it. I tried using Installer (which I've used in the
    past), with no success. Now I'm trying py2exe. I use the bdist_wininst
    method (?) and it seems to create all the files. However, nothing
    happens when I double-click the .exe file. I saw similar behavior from
    Installer, so I'm inclined to think there's something wrong with the
    script. It runs fine from my Python directory. I am currently
    searching the code for any weird hard-coded pathnames or something like
    that, but I don't think that should matter.

    All that being said, I'm attaching the script for general perusal, in
    the hopes that I might garner some insight from the educated masses.
    Apologies in advance for any horrific violations of basic coding
    principles, as I have no formal education in programming.

    Some pertinent information: This is being run and built on WinXP, using
    Python 2.3 and Tk 8.4 (through Tkinter). I will be happy to supply any
    additional information required.

    - Mark Daley

  • Miki Tebeka

    #2
    Re: py2exe issues

    Hello Mark,
    [color=blue]
    > Now I'm trying py2exe. I use the bdist wininst
    > method (?) and it seems to create all the files.[/color]
    I usually use "python setup.py py2exe" and it works fine.
    [color=blue]
    > However, nothing
    > happens when I double-click the .exe file. I saw similar behavior from
    > Installer, so I'm inclined to think there's something wrong with the
    > script. It runs fine from my Python directory. I am currently
    > searching the code for any weird hard-coded pathnames or something like
    > that, but I don't think that should matter.[/color]
    Make sure py2exe create a console program and run it from a "cmd"
    window.
    If there any exception you'll be able to see them.

    A wild guess whould be that your script is using some module that
    wasn't detected by distutils and you get an ImportError, if this is
    the case use the --force-import option of py2exe.

    HTH.
    Miki

    Comment

    Working...