Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

As a newbie, where should I go if I want to create a small GUI program? [closed]

I'm a newbie with a little experience writing in BASIC, Python and, of all things, a smidgeon of assembler (as part of a videogame ROM hack). I wanted to create small tool for modifying the hex values at particular points, in a particular file, that would have a GUI interface.

What I'm looking for is the ability to create small GUI program, that I can distribute as an EXE (or, at least a standalone directory). I'm not keen on the idea of the .NET languages, because I don't want to force people to download a massive .NET framework package. I currently have Python with IDLE and Boa Constructor set up, and the application runs there. I've tried looking up information on compiling a python app that relies on Wxwidgets, but the search results and the information I've found has been confusing, or just completely incomprehensible.

My questions are:

  1. Is python a good language to use for this sort of project?
  2. If I use Py2Exe, will WxWidgets already be included? Or will my users have to somehow install WxWidgets on their machines? Am I right in thinking at Py2Exe just produces a standalone directory, 'dist', that has the necessary files for the user to just double click and run the application?
  3. If the program just relies upon Tkinter for GUI stuff, will that be included in the EXE Py2Exe produces? If so, are their any 'visual' GUI builders / IDEs for Python with only Tkinter?

Thankyou for your time,

JBMK

like image 474
jimbmk Avatar asked Mar 13 '10 18:03

jimbmk


2 Answers

You'd be better off thinking/saying/googling wxPython (not wxWidgets), since wxPython is the python wrapper for the wxWidgets C++.

1.) Python is a good language for this. If you are only targeting windows, I'd still do it in .NET/C# though. If you want cross-platform, Python/wxPython all the way.

2.) Yes, the wxPython files should be included in the dist directory. You'll have to of course install wxPython to your development machine. See here for some instructions on how to build. py2exe does produce a single directory with everything you need to run you program. It'll give you an EXE that you can double-click.

3.) I've never used Python's Tkinter with py2exe, but I can't see why it wouldn't work along the lines of wxPython.

You should keep in mind that your finally distributable directory will be 10s of megs (py2exe packs the python interpreter and other libraries needed for you app). Not quite as much as the .NET framework, but doesn't almost everybody have that installed already by now?

like image 72
Mark Avatar answered Sep 28 '22 00:09

Mark


If you're not afraid to learn a new language, consider Tcl/Tk. The reason I mention this is Tcl's superior-to-almost-everything distribution mechanism which makes it really easy to wrap up a single file exe that includes everything you need -- the Tcl/Tk runtime, your program, icons, sound files, etc. inside an embedded virtual filesystem. And the same technique you use for one platform works for all. You don't have to use different tools for different platforms.

If that intrigues you, google for starpack (single file that has it all), starkit (platform-independent application) and tclkit (platform-specific runtime).

Tcl/Tk isn't everyone's cup of tea, but as a getting-started GUI language it's hard to beat IMO. If it has an Achilles heel is that it has no printing support. It's surprising, though, how many GUIs don't need printing support these days.

like image 36
Bryan Oakley Avatar answered Sep 28 '22 01:09

Bryan Oakley