Re: looking for gui for python code

2007-12-14 Thread Thomas Lenarz
On Thu, 13 Dec 2007 09:46:32 -0800 (PST), "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

>hi
>i have written some python scripts which take command line arguments
>and do some job. i would like to make it into a .exe using py2exe and
>distribute it with innosetup.. befor that i would like to add some GUI
>support..i mean select some values using a folder explorer etc..which
>would be a good gui builder for this? 

Hi,

I am not able to help out concerning GUI-Builders. However, it appears
that the GUI-support you neeed is not getting too complex. Therefore,
I would recommend to hand-code the GUI-parts using TKInter.

Advantages:

-It is there already. No need to install a separate GUI-Builder and
lerning how to use it. Not too much thinking what needs to be
installed on your user's workstation.
-TKInter and TCL/TK are very stable.
-TCL/TK is well documented. (Unfortunately one has to refer to the
TCL/TK documentation because the TKInter documentation does not go
very far.)
-It is quite easy to learn.
-It contains a file-browsing dialogue (resp. a wrapper around the one
provided by your OS/Desktop-Environment.)

You might have a start at the TKinter-Part of the library-reference.

http://docs.python.org/lib/module-Tkinter.html

You will have to spend some time on learning how to use TK, of course.
However, I think that is a good investment rather than spending the
time evaluating different GUI-Builders.

The said is valid for less complex GUIs. For complex GUIs especially
with huge amounts of entry-fields it is better to use a GUI-builder
especially for later maintenance. Handcoded GUI-code might get nearly
unreadable after it has been changed during the lifetime of a software
(, and by different developers)

Regards,
Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python live environment on web-site?

2007-06-23 Thread Thomas Lenarz
On Wed, 20 Jun 2007 15:18:26 GMT, [EMAIL PROTECTED] (Thomas
Lenarz) wrote:

>Hi all,
>
>I was wondering if there was a python-live-environment available on a
>public web-site similar to the ruby-live-tutorial on
Thanks a lot for all your replies. 

I looked at the "TryPython-Sites" and will have a look at crunchy,
although I in fact was looking for something already hosted somewhere
and ready to use.

Nonetheless, crunchy looks very interesting in general.

Thanks again,

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


Python live environment on web-site?

2007-06-20 Thread Thomas Lenarz
Hi all,

I was wondering if there was a python-live-environment available on a
public web-site similar to the ruby-live-tutorial on

http://tryruby.hobix.com/

I would prefer something which allows to paste small scripts into a
text-field, to run them on the server, and to be able to read the
produced output of the script.

I searched using google but didn't come across such a site. However, I
imagine there must be at least one

Thanks for any hint,

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows Debugging w/o MS

2007-05-23 Thread Thomas Lenarz
On Tue, 22 May 2007 18:49:04 -0700, "Christopher Anderson"
<[EMAIL PROTECTED]> wrote:

>problem is, when I attempt to use it, I get a segfault. Now, I'm
>pretty sure this segfault is just a bug in my C++ code. So of course,
>I would like to debug this thing somehow. I tried using the mingw gdb
>giving it my python.exe to run, but obviously this python has no debug
>info, and wasn't even compiled with mingw. I was hoping it would still
>somehow debug my extension module right, but when I do a backtrace
>after it segfaults, I get nothing useful.

I have no experience in writing python extension-modules. However, I
would give the following scheme a try. It helped myself a lot while
debugging segfaulting modules plugged into a framework, for  which I
haven't had the source-code. It is done easyly and quickly. If it
doesn't  work you won't lose a lot of time:

1. At the earliest stage of your own C++-Code, code an infinite loop
depending on a single variable.

e.g.: int i=0; for(;i==0;);

2. When you start your test now and it does not segfault before your
code is reached, the process will be stuck in this loop.

3. Attach gdb to the process using the --pid option. (Unfortunately I
did this only on Unix with dbx. Hope it works on windows and gdb as
well.

4. Look if you are now able to see your source in gdb.

5. Set a breakpoint immediately after the infinite loop.

6. Free the loop by setting the variable i to a value different from
0.

7. You should be able to single step now.

I am not sure if this will work. But it might be worth a try.

Thomas



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and GUI

2007-05-21 Thread Thomas Lenarz
On 21 May 2007 08:39:44 -0700, [EMAIL PROTECTED] wrote:

>All I am doing is prompting users for some data (listbox, radio
>buttons, text box, ect...).  Then I will have some text output, maybe
>a scrolling text message as things are happening.
>
>I have some minor things I need to do, for example, if Checkbutton X
>is clicked, I need to disable TextBox Y, and I would like to display
>the scrolling text (output)
>
You should be able to do all those things with TKInter (though I am
not sure about the automatted scrolling text.).

>Ultimately, is it worth downloading and learning some of the packages
>avaiable for Python, or should I just stick to the Tkinter stuff that
>is included.
Like Brad, I would recommend trying wxPyhton
(http://www.wxpython.org/). There is an installer for Windows. Best is
to look at the wxPython-Demo first thing. It contains a lot of
example-code to borrow from. You can both read and try the code within
the Demo-Application.

However, the documentation of  the class-library is for C++ only. You
have to apply it to the python-version yourself. 

I prefer wxPython to TKInter because it offers more complex widgets
namely Grids and Tabular-Lists right out of the box.

Best wishes,
Thomas


-- 
http://mail.python.org/mailman/listinfo/python-list