Py2exe

py2exe
Ontwerp en ontwikkeling
Ontwikkelaar(s) Thomas Heller (oorspronkelijk) en Jimmy Retzlaff (maintainer)
Besturings­systeem Windows
Geschreven in Python
Status en tijdlijn
Status Actief
Recentste versie 0.14.1.1 (5 juni 2026)[1] Bewerken op Wikidata
Onderdelen
Afhankelijk van cachetools, pefile
Licentie(s) MIT-licentie
Links
Website (en) Projectpagina
Versiebeheer Broncode
Portaal  Portaalicoon   Informatica
Vrije software


Py2exe is een vrije uitbreiding van Python om software geschreven in Python (.py) om te zetten naar een uitvoerbaar bestand (.exe) voor Windows. Het is hierdoor mogelijk Python-software uit te voeren zonder dat Python zelf geïnstalleerd is. Py2exe is een uitbreiding van distutils waarmee men Python-software kan installeren. Py2exe is beschikbaar onder de MIT-licentie.[2]

Werking

Py2exe gebruikt naast de broncode van het computerprogramma geschreven in Python ook de benodigde bibliotheken en construeert hieruit een .exe. Samen met enkele .dll-bestanden kan deze .exe verspreid worden. Windows-gebruikers hoeven hierdoor niet Python en andere benodigde bestanden te installeren om het computerprogramma uit te voeren. Het uitvoerbare bestand en de .dll-bestanden kunnen nu met behulp van een installatieprogramma verspreid worden.

Voorbeeld

py2exe breidt de mogelijkheden van de functie setup van distutils uit met het commando py2exe. Het Hello World-programma (hello.py) in Python kan vervolgens omgezet worden in een uitvoerbaar bestand door python setup.py py2exe uit te voeren.

hello.py:

print "Hello World"

setup.py:

from distutils.core import setup
import py2exe

setup(console=['hello.py'])

Geschiedenis

Py2exe werd oorspronkelijk ontwikkeld door Thomas Heller. Anno 2010 is Jimmy Retzlaff de maintainer. Py2exe ontstond om gemakkelijk Python-software te verspreiden op Windows waar Python, in tegenstelling tot besturingssystemen als Linux, niet standaard geïnstalleerd is. Projecten die gebruikmaken van py2exe zijn BitTorrent (6.0 en ouder) en SpamBayes.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.