views:

263

answers:

5

Hello,

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

+2  A: 

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?

Mark
A: 

Thank you for the very helpful reply! Quick, well written and crystal clear!

Yes, I am targeting multiple platforms, but I do think most potential users will have Windows and .NET in some form, so I will still think about your suggestion to work with .NET or C#. You've also helped clear up a very important distinction for me; I think the difficulty I had was that I was searching for resources related to 'WxWidgets' as opposed to 'WxPython'.

Thanks again!

jbmk
A: 

For a multiplatform GUI project i recommend you to use Qt libraries and PyQt.

I recently used them for a small application and i loved both; Qt has a great Gui designer and PyQt slot\signal model worked for me.

You can deploy your app on Osx and Windows using py2app and py2exe; here a useful link that show you how and the possible size result.

systempuntoout
A: 
  1. Python would fit your needs.
  2. wxWidgets and Python are completely different things. I think you mean wxPython, which is a GUI toolkit for Python. I am not sure whether Py2Exe would include this, as I have never used Py2Exe - I build the packages and their dependencies manually.
  3. Pretty sure tkinter would be included. I use tkinter a bit and it works well enough.
George Edison
+1  A: 

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.

Bryan Oakley