gui2py observations and questions

294 views
Skip to first unread message

bruce swr

unread,
Sep 1, 2013, 8:40:57 AM9/1/13
to gui...@googlegroups.com
Mariano,

I develop GUI screens using wxPython directly and in some situations PythonCard along with wxPython. I am interested in using gui2py to move from python 2.x to python 3.x

I downloaded gui2py-0.9.3-py2x.win32.exe and Norton Antivirus declared ‘gui2py-0.9.3-py2x.win32.exe’ is not safe and has been removed.

OK, so I then downloaded gui2py-0.9b-py2x.win32.exe and was able to install. I downloaded gui2py-0.9b.zip and entered ‘python setup.py install’ per readme.txt, no problems.

I entered ‘python -m gui.tools.designer’ per readme.txt and was able to display the sample.pyw screen.

Got the following error message moving a widget:
basic creation timing: t1 - t0: 0.115999937057
Traceback (most recent call last):
File "c:\python27\lib\site-packages\wx-2.9.4-msw\wx\lib\agw\supertooltip.py",
line 931, in OnWidgetLeave
if self._superToolTip:
AttributeError: 'SuperToolTip' object has no attribute '_superToolTip'
Traceback (most recent call last):
File "c:\python27\lib\site-packages\wx-2.9.4-msw\wx\lib\agw\supertooltip.py",
line 898, in OnWidgetEnter

You stated this is a fork of Pythoncard. To me, this is somewhat misleading.
1. Gui2py generated code does not look like PythonCard code.
2. I did not see a resource file. Does gui2py support resource files?
3. Does gui2py support automatic binding?
4. I do feel the PythonCard motto “Simple things should be simple and complex things should be possible” is not being followed. Gui2py is more involved than PythonCard. However, this may not be an issue once I learn gui2py.

Also, how do you create a totally new screen using the designer? How do you create child windows?

Thanks,
Bruce

Mariano Reingart

unread,
Sep 1, 2013, 10:43:41 AM9/1/13
to gui2py
Hi Bruce:

You need to look at the latest release: 0.9.3, 09b es rather old.
I don't know why Norton antivirus detects its as unsafe, but you can
install it using the source package (gui2py-0.9.3.zip)
In fact, I'd recommend to use mercurial to grab the latest changes
directly from the repository:

hg clone https://rein...@code.google.com/p/gui2py/

About your questions:

1. gui2py allows you to do some things that pythoncard cannot, that's
why there is some differences in the syntax
2. gui2py does supports resource files, here is an example:

https://code.google.com/p/gui2py/source/browse/starter.rsrc.py

3. gui2py does support automatic binding, you can see two examples:

without class:

https://code.google.com/p/gui2py/source/browse/starter.py

and with a Controller class (similar to PythonCard Background)

https://code.google.com/p/gui2py/source/browse/controller.py

4. gui2py is in alpha state, so some things have rough edges and lacks
documentation.

For example, you can create child windows more easily than pythoncard
(with gui.load), but I didn't have time to document it yet.
To create a new "screen", just copy starter.rsrc.py or minimal.pyw and
use the gui.tool.designer

Improving PythonCard is being a big effort, and this would change if I
get more support and contributions ;-)

Thanks you for testing it, that really helps to polish and improve the tookit.

ASAP I'll post a migration guide from gui2py to pythoncard, explaining
this comments.

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
Reply all
Reply to author
Forward
0 new messages