question about standalone small software and teaching

Hello Dear All,
I just have a question for all that uses python/numpy/scipy/matplotlib for making science.
I use with no problem in my computer python+numpy+scipy+matplotlib and I'm very satisfied with them.
I was a matlab user. I still not have unearthed the power ot python but I'm happy to use a programming language and not a metalanguage. When I gave people my software (in matlab) the all ask me if I could compile and create some interface.
I tried to use matlab GUIs, succeded in creating, but then I had a lot of problems. Compiling not always worked. after compiling you have not a workspace and so I had to make all output as txt files... and so on.
Now that I use python I'm again with the same problem. I create easy routines (for chemometrics) and then people ask me if I can make a standalone program with interface.
I used orange and for NN it's surely one of the best, but I'm not good at programming widgets. Then I think about it, searched the web and didn't find anything.
What I'm searching is something similar to labview :slight_smile:
At first I thought ... hey why people wat an interface, just use the console, and then after listening to their reason I have to agree.
What do I generally do ? I have a matrix in txt, I apply my routines (a SVD, a PCA, a filter etc etc written in python), plot them (using maplotlib) and then I want an output. that's it.
I started looking at various Qt etc. etc. but for me it's overhelming, because I think that the most important part should be dedicate to the routines creation and not to making a gui, compiling, etc. etc. I need simple command like people wants. grids, paste and copy, small working plots :slight_smile:
I mean I can get crazy with setting my program, importing etc. etc. but I also have to say that needs and claim about writing simple guis, common paste and copy etc should be considered from someone there (we wait for the help of some guru that makes things easier :wink:

thanks for reading the mail
Giorgio

First,

Please don't cross-post quite so much. I've only sent this to the matplotlib list. Maybe the scipy-users would be better, but I'm not on that one.

First:
What you want to do really is hard. One of the reasons is that each app is going to have its own "simple" needs. Also, GUIS really do take a lot of work. I've written simple command line scripts, then found wrapping a GUI around them takes three times as long to write as the scripts took in the first place. Yes, it could be easier, but it's always going to be a lot of work.

Second:
Matlab is an expensive, proprietary application, thus, if you don't build a stand-alone, your users need to buy Matlab to use your code. Python/scipy/numpy/mpl are all freely re-distributable, so you don't' have that problem. Maybe your users don't really need a stand-alone, but rather need an easy to install and use environment for running your code, command line and all.

Granted, there is no such complete package available at this point but there are efforts to make then, and you could also build your own. The Enthought build is good for Windows. Also be sure to check out qme-dev:

http://sourceforge.net/projects/qme-dev/

It's not complete yet, but looks pretty promising.

There are also efforts afoot to make it a bit easier to use py2exe, py2app, etc. for building stand-alones.

If you really do want to build a stand-alone GUI tool, there are a lot of ways to make really full-featured GUIs, though you're right, it takes quite a bit of work. Given the state of affairs right now, I'd take a look at Dabo (it's not just for database apps):

http://dabodev.com/

or PythonCard

http://pythoncard.sourceforge.net/

And figure out how to integrate MPL with them (probably with wxMPL).

Both of these projects seek to make it easier to build GUIs with wxPython, which I think is the best choice for cross-platform GUIs. Dabo, in particular, is oriented toward data-aware widgets, which could be a very good match for small scientific computation tools.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Giorgio Luciano ha scritto:

At first I thought ... hey why people wat an interface, just use the console, and then after listening to their reason I have to agree.
What do I generally do ? I have a matrix in txt, I apply my routines (a SVD, a PCA, a filter etc etc written in python), plot them (using maplotlib) and then I want an output. that's it.
I started looking at various Qt etc. etc. but for me it's overhelming, because I think that the most important part should be dedicate to the routines creation and not to making a gui, compiling, etc. etc. I need simple command like people wants. grids, paste and copy, small working plots :slight_smile:
I mean I can get crazy with setting my program, importing etc. etc. but I also have to say that needs and claim about writing simple guis, common paste and copy etc should be considered from someone there (we wait for the help of some guru that makes things easier :wink:

It's quite hard for me to understand what you mean.

Anyway, I solved the issue of usability vs code simplicity for my data analysis application by using a mixed CLI+GUI design. That is, I have a very simple GUI that just shows the plot and may have some button/menu for basic operations, and a custom command line to finely work with it. Think of RasMol, for example. The custom command line is done with the Python Cmd module that is included with Python, and it's a breeze to code with. The GUI uses Matplotlib embedded with wxMPL in a wxPython frame. The command line and the GUI are threaded (work on two different threads) that communicate by passing events (cli-->gui) and with a Queue (gui-->cli): easy.

Anyway, I'd advice you to learn wxPython basics. It's powerful, free, multiplatform and it's becoming the default Python GUI toolkit in the wild. Learning a GUI toolkit cannot harm. If you can, buy the Robin Dunn book "wxPython in Action", it's wonderful to say the least.

m.

···

--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
massimo.sandal@...898...

tel: +39-051-2094388
fax: +39-051-2094387