Wednesday, September 28, 2011

How to create Windows executable (.exe) from Python script

Now that your Pyhon program is loaded with command line arguments  your boss asks you to make it exeutable (EXE).

Here are some nice things I've found:

Tutorials:


py2exe - http://www.py2exe.org/

getopt — Python's C-style parser for command line arguments.

Need to support command line arguments and options in your new Python program, here's what I've found:

Example code - http://www.eurion.net/python-snippets/snippet/Show%20getopt.html
Tutorial - http://www.doughellmann.com/PyMOTW/getopt/
Documentation - http://docs.python.org/library/getopt.html

Tip: HEX to BINARY File Converter Utility

In some cases - It's much easy to write in HEX in text then convert it to BIN file.

Intel HEX to BINARY File Converter Utility
http://hex2bin.sourceforge.net/
Direct file download: http://www.hex2bin.com/hex2bin/

GUIDE: Create your own free, cross platform binary log file with a viewer, with ease.

Hi, it can be done, and within days. Let's start...

Introduction
Did your boss just came to your office and asked you to dump stuff from the application to sniff what's going on in component #42?

Later on he'll might come and ask statistics, that it should support UNIX/Window/MAC/... , filtering, simple graphs, flow graph ...

Here are some pictures of these features in action:
I've wrote a tutorial to create a very simple (starter) sniffer. 

Compile a TCL script into an EXE program

It can be done!

Solution:
How to compile a TCL script into an EXE program

Bat To Exe Converter

Here is an example of requierments:

  • Create a script that automate blabla.... (I've presented a batch file after an hour or so).
After 5 sec:
  • The script will be presented to out client as an exe file.


Well, here is the tool I used for the job: Bat To Exe Converter

Other utils that might come handy:

Monday, September 12, 2011

Sorry for disapearing...

Hi,
I woarked a lot (and still do) in the last 4-5 mounths, I have many posts I wish to publish but very little time.
In the next mounth I'll try to publish at least 1 post a week.