ASPN ActiveState Programmer Network  
ActiveState, a division of Sophos
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups
Submit Recipe
My Recipes

All Recipes
All Cookbooks


View by Category

Title: py2exe "compiler"
Submitter: Alexander Semenov (other recipes)
Last Updated: 2002/01/20
Version no: 1.0
Category:

 

4 stars 3 vote(s)


Description:

script for making executables with py2exe

Source: Text Source

from distutils.core import setup
import sys, os, py2exe

name = sys.argv[1]
sys.argv[1] = 'py2exe'
sys.path.append(os.path.dirname(os.path.abspath(name)))

setup(name=name[:-3], scripts=[name])

Discussion:

To eliminate the need to make setup.py for each python script which I about to convert to executable with py2exe, I wrote this simple script, and put it in my Tools/Scripts folder. Note, it cannot be named "py2exe.py" as it asks, because it imports py2exe. Now for any of my scripts I simply run "pyexe.py myscript.py", and get distribution in dist/myscript folder.



Add comment

No comments.



Highest rated recipes:

1. A simple XML-RPC server

2. Web service accessible ...

3. IPy Notify

4. Treat the Win32 Registry ...

5. a friendly mkdir()

6. Wrapping template engine ...

7. Assignment in expression

8. Changing return value ...

9. Implementation of sets ...

10. bag collection class




Privacy Policy | Email Opt-out | Feedback | Syndication
© 2006 ActiveState Software Inc. All rights reserved.