Hackerszone
Welcome Guest,
learn to hack easily with tutorials, python, notepad hacks and more!
Join today, fast and free!

Are you new to hacking? Learn the basics in computer configuration, hacking tools, and hacker terminology all found here on this forum!

Join today!!

Join the forum, it's quick and easy

Hackerszone
Welcome Guest,
learn to hack easily with tutorials, python, notepad hacks and more!
Join today, fast and free!

Are you new to hacking? Learn the basics in computer configuration, hacking tools, and hacker terminology all found here on this forum!

Join today!!
Hackerszone
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 

 


Rechercher Advanced Search

HZ Tracker
Hacking Widget Visitor Details
Latest topics
»  How to study to understand and apply RPA?
Python to exe EmptyTue Feb 02, 2021 7:12 am by manas41

» SQL injection and Quote escaping
Python to exe EmptySun Jun 28, 2015 11:42 am by ADS1

» [TUT] Chmod: Files & Permissions [TUT]
Python to exe EmptyThu Jun 04, 2015 12:45 pm by Guest

» Reaver pixiewps
Python to exe EmptyThu Jun 04, 2015 12:23 pm by voidfletcher

» How To Crash Someone's Skype in 10 SECONDS
Python to exe EmptyThu Jun 04, 2015 12:20 pm by voidfletcher

» Internet Security & IP Security (IPSec)
Python to exe EmptyMon May 18, 2015 9:00 pm by voidfletcher

» [Python] Infinite / Definite File Generator
Python to exe EmptyMon May 18, 2015 8:58 pm by ADS1

» [C#] String Case-Inversion
Python to exe EmptyMon May 18, 2015 8:57 pm by ADS1

» Rekall Memory Forensic Framework
Python to exe EmptySat May 16, 2015 8:55 pm by ADS1

Who is online?
In total there are 7 users online :: 0 Registered, 0 Hidden and 7 Guests

None

[ View the whole list ]


Most users ever online was 38 on Sun Mar 19, 2023 10:07 pm

Python to exe

Go down

Python to exe Empty Python to exe

Post by Admin Sat May 24, 2014 7:40 pm

After recently searching for awhile for a decent HOWTO on making an exe from python I have decide to create one for future learners. This will show you the necessary steps (and commands) to take your python script and transform it into an executable file.

Step One: Files required

This tutorial makes use of py2exe, a free module that is one of the simplest ways to convert our python script. Py2exe can be downloaded at [You must be registered and logged in to see this link.] Depending on the python version you are using (2.7/2.6/2.5/etc) you want to download that version of py2exe. There are also 64bit options available. Please note that you will need to use the necessary 32/64bit option to install py2exe.



Py2exe is a very quick install and will probably fill you with nostalgia with it's partially obnoxious full screen installer.

Step Two: Converter Script

Once you've installed py2exe now you need to create the converter script. This is a fairly simple process and the only thing you need to change is the filename in the code below:

Code:
from distutils.core import setup
import py2exe
setup(console=["CHANGEME.py"])

Again, you only need to change the "CHANGEME" section of the code with your appropriate script's name. Please view the spoiler below for visual aid.



Step Three: Converting your Script

In order to actually convert your script now you need to open up the Windows Command Line (CMD) and navigate to where your setup script and python script are located. Once you navigate to the directory your script is in run the command:
Code:
setup.py py2exe

[You must be registered and logged in to see this image.]" />

[You must be registered and logged in to see this image.]" />



This will run the setup script and convert your py. to .exe.

For those unfamiliar with CMD there are visual aids and a more in-depth instruction on the exact commands necessary below.



You should end up with a new directory in the folder that your script was in labeled: Dist(distribution). This is the folder that py2exe outputs to.


Thank you for reading the tutorial and good luck fellow coders

Admin
Coder
Coder

Posts : 101
Join date : 2014-04-07

https://thehackerszone.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum