7

I recently built an application, for a client, which has several python files. I use ubuntu, and now that I am finished, I would like to give this to the client in a way that would make it easy for her to use in windows.

I have looked into py2exe with wine, as well as cx_freeze and some other stuff, but cannot find a straightforward tutorial or useful documentation for turning many python files in ubuntu into an easy-to-use windows application or executable or anything really.

Thanks!

user1266969
  • 71
  • 1
  • 2
  • Why not invest in a copy of windows, and some virtualisation software, and just do the operation in windows? – Marcin Mar 13 '12 at 16:24
  • I could do that, but I'm far from wealthy and figured there'd be a simpler way to do it. – user1266969 Mar 13 '12 at 16:43
  • Consider it a cost of doing business; in any case, it is likely to be the most simple way. There may well be more complex but cheaper methods, though. – Marcin Mar 13 '12 at 16:45

2 Answers2

2

This page appears to have a solution, as the asker didn't reply:

  1. Install WINE.
  2. Use WINE to install Python 2.3.
  3. Use WINE to install py2exe.
  4. Make a setup.py file for py2exe to compile your script:
from distutils.core import setup
import py2exe

setup(name="vervang",
  scripts=["vervang.py"],
)
  • Run wine python.exe setup.py py2exe

This page says the resulting binaries might not be valid Win32 executables, though.

Cees Timmerman
  • 17,623
  • 11
  • 91
  • 124
1

py2exe will not work on linux. Try pyinstaller it is a pure python implementation that will work on linux, mac and windows.

user850498
  • 717
  • 1
  • 9
  • 22
  • 2
    Just as a little information - the [FAQ](http://www.pyinstaller.org/wiki/FAQ) states that you would still have to use wine with pyinstaller. – BergmannF Apr 05 '12 at 08:47
  • I have a machine for linux and a machine for windows so i never knew that. Thanks for the tip. – user850498 Apr 05 '12 at 09:05