0

I have been given a project to do. One of the main essential requirements is that this is given to the customer to run as single exe. It does not matter which programming language, however it will be comparing files between a set of default files and the customer’s files. Is there any way I can do this so that I have one exe?

JP29
  • 633
  • 4
  • 13
  • 25
  • This is a very widely scoped question. You should probably do some reading else I fear you'll get eaten alive by some of the moderators. :) You want a true programming language (Visual Basic, C++, C#) and not a script (Python, Perl, Ruby, TCL). http://en.wikipedia.org/wiki/Programming_language http://en.wikipedia.org/wiki/Script_(computing) – ZnArK Jun 26 '12 at 14:52
  • 2
    @ZnArK Incorrect. The languages you describe as "scripts" are real programming languages, and can be used to generate a single exe. – Marcin Jun 26 '12 at 14:54
  • 1
    @ZnArk Define "true programming language". Does static typing and a compiler make a language "true"? – Ioan Alexandru Cucu Jun 26 '12 at 14:55
  • I don't agree that Python isn't a "true programming language" just because it's interpreted. Java would be a "true programming language" but that typically creates `jar`s rather then `exe`s. Using a Microsofty environment like you can have available with VB / C# makes it easier to generate `exe` files so it may be a better choice here - but for that reason, not because it's inherently a better or worse choice! ;) – adamnfish Jun 26 '12 at 14:56
  • 1
    @Marcin yes, but the fact that it's an exe doesn't change the fact that your program is interpreted. The generated exe has a bundled python interpreter in it... – Ioan Alexandru Cucu Jun 26 '12 at 14:57
  • @Marcin - Never heard of py2exe, looks awesome. Although, "Real Programming Languages" depends on your definition. Anything that requires an interpreter is a scripting language in my book. – ZnArK Jun 26 '12 at 14:58
  • @ZnArK Yes, but the interpreter "interprets" the script just once. Bytecode is generated after the first run which is than run by a "virtual machine" (quite similar to what Java does). – Ioan Alexandru Cucu Jun 26 '12 at 15:00
  • @ZnArK Then get a better book. – Marcin Jun 26 '12 at 15:01
  • @adamnfish I'm not arguing against the value of scripts I use them almost exclusively. The OP was asking for a standalone windows executable. In my opinion VB would be the best choice for anyone asking this question. You can knock out some useful code pretty quick with little previous experience. – ZnArK Jun 26 '12 at 15:01
  • @IoanAlexandruCucu - I agree, there is a difference between Java's bytecode and scripting languages. Here's the difference. If the code is run from instructions that are stored in plain text - human readable form, it's a script. If Machine code or Bytecode is generated and isn't meant to be human readable or edited, it is something else. I'm not making this stuff up. – ZnArK Jun 26 '12 at 15:08
  • Although, perl code can be pretty unreadable sometimes depending on who wrote the code. – ZnArK Jun 26 '12 at 15:10

2 Answers2

3

The py2exe library allows you to create exe files from your python code. I've not used it but it may do the job!

http://www.py2exe.org/

Alternatively, you can try pyinstaller.

See also: py2exe - generate single executable file

Community
  • 1
  • 1
adamnfish
  • 10,935
  • 4
  • 31
  • 40
  • Great thanks. But if I am using libraries such as simpleJSON I cant seem to bundle it all together. I get an import error. – JP29 Jun 27 '12 at 16:53
  • Does your `setup.py` work if you use it to install the application normally (i.e. into a virtualenv)? – adamnfish Jun 28 '12 at 13:22
1

You're in luck! You can do just that with Python using the py2exe conversion utility.

You can find it at: http://www.py2exe.org/

Maria Zverina
  • 10,863
  • 3
  • 44
  • 61