Compiling Windows Version

  • Moop

    Moop - 2007-07-01

    I tried to compile Gourmet with py2exe. It makes the binaries, but it won't run. Here is what happens:
    I run the script through py2exe, and it reports it is missing the modules: gdk, ltihooks, and version.
    When I run the gourmet binary, it reports:
    Traceback (most recent call last):
      File "", line 16, in ?
    NameError: name '__file__' is not defined

    What can I do? Gourmet runs perfectly normally.

    • tom

      tom - 2007-07-05

      Very odd. __file__ should always be defined when you're running code from a file (i.e. when you're not typing at an interactive python prompt). It's just a variable containing the name of the file from which the current block of code is being run. I'm not at my development machine now (on vacatation) so I can't give you the details, but you can probably figure out what is trying to use the __file__ variable for (likely to determine the path of data files or something) and then figure out a workaround.


Log in to post a comment.