Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

11,888 views
Skip to first unread message

Aseem Bansal

unread,
Jul 4, 2013, 9:23:41 AM7/4/13
to
I want to start GUI development using Tkinter in Python 2.7.5.

I have been searching all over google but couldn't find any IDE that has drag-and-drop feature for Python GUI development. Tried to ask on stackoverflow

(http://stackoverflow.com/questions/17439620/an-ide-with-drag-and-drop-feature-for-python-2-7-tkinter)

but couldn't get an answer there. So is there any IDE that can be used for GUI developemnt and has drag-and-drop feature for Python GUI dev?

I came across somewhere that eclipse's pydev plugin can be used but couldn't find anything on its website.

Any advice about this?

memilanuk

unread,
Jul 4, 2013, 11:24:42 AM7/4/13
to pytho...@python.org
On 07/04/2013 06:23 AM, Aseem Bansal wrote:
> I want to start GUI development using Tkinter in Python 2.7.5.
>
> I have been searching all over google but couldn't find any IDE that
> has drag-and-drop feature for Python GUI development.
>

For Tkinter, no luck. The general consensus always seems to be that
Tkinter and/or apps written using it tend to be simple enough to not
really need that much 'help'. Being a new(er) user I kind of disagree,
as I think having to 'hand code' everything for the gui library included
with Python detracts somewhat from its appeal to new users in that
particular area.

Qt Creator is available for PyQt, which may be a better pick for you
depending on what you want to do. It does have a drag-n-drop interface
that is very slick, but it generates a .ui file that still needs to be
translated into a python module and imported into your main 'program'
file - but it takes a *lot* of the tedium out of creating a user
interface more complicated than a simple dialog window.

HTH,

Monte


Dave Cook

unread,
Jul 5, 2013, 2:52:48 AM7/5/13
to
On 2013-07-04, Aseem Bansal <asmba...@gmail.com> wrote:

> I have been searching all over google but couldn't find any IDE that
> has drag-and-drop feature for Python GUI development.

If you want something like Visual Studio, you could try IronPython:

http://www.ironpython.net/tools/

For any moderatley complex cross-platform application, I would suggest
moving on to wxPython, PyQt, or PySide (the latter two both based on
Qt). Then try wxFormBuilder, wxGlade, or Qt Designer.

Generally, I'd prefer using PyQt/PySide, because Qt has the more
uniform API. I use wxPython for commercial work because it had the
more liberal license at the time I started using it (PySide was not
available at that time).

As far as features and maturity go, I think both wx and Qt are fairly
equal. Qt has become more popular for scientific work.

PyGtk and Glade are another option, particularly on Linux, though I
think wx or Qt still have better compatibility with Win32 or OS X.

For OS X only, PyObjC and XCode are an option.

While they are a tool that can save time, it's pretty easy to bump
into the limitations of form designers. It's best to lower ones
expectations about how much coding can be offloaded onto a form
designer.

http://sourceforge.net/projects/wxformbuilder/
http://qt-project.org/doc/qt-4.8/designer-manual.html
http://wxglade.sourceforge.net/

> I came across somewhere that eclipse's pydev plugin can be used but
> couldn't find anything on its website.

The only form builders for Eclipse that I'm aware of are for Swing or
SWT. You would need to use Jython (if you want to stick with a Python
implementation) to interface with these.

Dave Cook

Aseem Bansal

unread,
Jul 9, 2013, 4:33:17 AM7/9/13
to
Thanks @Dave Cook.

I'll try wxPython.

CM

unread,
Jul 10, 2013, 1:15:14 AM7/10/13
to
On Tuesday, July 9, 2013 4:33:17 AM UTC-4, Aseem Bansal wrote:
> Thanks @Dave Cook.
>
>
>
> I'll try wxPython.

If so, the hoary but working Boa Constructor 0.7 is a drag and drop GUI builder for wxPython applications. Well, more like click and then click again, then drag around. It's also an IDE, so it also does a lot of other stuff. ("No one" likes it any more because it hasn't been updated in years, but I like it, but I also like the 1974 AMC Matador.)

Aseem Bansal

unread,
Jul 15, 2013, 10:57:57 AM7/15/13
to
@CM
Thanks for the suggestion. I'll take a look.

asim...@gmail.com

unread,
Jul 15, 2013, 12:59:29 PM7/15/13
to
Take a look at kivy at http://kivy.org.

Aseem Bansal

unread,
Jul 20, 2013, 3:59:00 AM7/20/13
to
After considering all the options suggested here I decided to use PySide/QtCreator as was suggested by Dave Cook. I created a simple GUI with QtCreator and found a way to convert .ui files to .py files. So far so good.

But now I am having some confusion about the correct tools to use for PySide and I am stuck due to that. I explored the PySide wiki and discussed the confusion on Qt-forums but that didn't help much. The url of that discussion is given below(without backslashes to avoid it being shortened). Just using this on google you can easily find the discussion.

qt-project.org forums viewthread 30114

Do I need to use QtCreator with PySide if I want drag-and-drop feature for GUI development? Do I need to install Qt? If yes, which version - 4.8 or 5.1?

Can I use cxfreeze to make exe files from the GUI developed? I used it for pure Python files and it worked. The size of the file was big but it worked with me having to install Python on another computer. I tried to use cxfreeze on the GUI Python script that I was finally able to make. Some exe was made but no GUI started when I ran the exe. Is that a problem with cxfreeze or me having wrong tools installed?

Any help is appreciated.

Dave Cook

unread,
Jul 21, 2013, 7:14:30 AM7/21/13
to
On 2013-07-20, Aseem Bansal <asmba...@gmail.com> wrote:

> Do I need to use QtCreator with PySide if I want drag-and-drop
> feature for GUI development?

No, you just need the layout part of QtCreator, called QtDesigner, and
any decent Python editor or IDE (e.g. Idle):

http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

There's another Qt IDE that uses QtDesigner called Monkey Studio
(seems to be PyQt only).

Designers can be really nice for learning the toolkit widgets and
layout, but I'd like to get away from them in my own projects,
actually, and move to something like enaml:

http://docs.enthought.com/enaml/

> Do I need to install Qt? If yes, which version - 4.8 or 5.1?

PySide does not support 5.x yet, according to their website. I
installed the PySide windows download, and it seems to work without
needing any Qt packages.

> Can I use cxfreeze to make exe files from the GUI developed?

Probably. We use py2exe for our wxPython/numpy application.
Depending on the complexity and number of external modules used by
your application, bundling tools like this can require some google-fu
and trial and error to get working.

http://qt-project.org/wiki/Packaging_PySide_applications_on_Windows

Dave Cook

Chris “Kwpolska” Warrick

unread,
Jul 21, 2013, 7:20:35 AM7/21/13
to pytho...@python.org
On Sun, Jul 21, 2013 at 1:14 PM, Dave Cook <dave...@nowhere.net> wrote:
> On 2013-07-20, Aseem Bansal <asmba...@gmail.com> wrote:
>
>> Do I need to use QtCreator with PySide if I want drag-and-drop
>> feature for GUI development?
>
> No, you just need the layout part of QtCreator, called QtDesigner, and
> any decent Python editor or IDE (e.g. Idle):

…and one more thing: pyside-uic, for transforming the .ui files into
(ugly) .py files. It seems to be in /PythonXY/Scripts according to
Stack Overflow if you have PySide installed.
--
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail | always bottom-post
http://asciiribbon.org | http://caliburn.nl/topposting.html

Dave Cook

unread,
Jul 21, 2013, 8:13:36 PM7/21/13
to
On 2013-07-21, Chris “Kwpolska” Warrick <kwpo...@gmail.com> wrote:

> …and one more thing: pyside-uic, for transforming the .ui files into
> (ugly) .py files. It seems to be in /PythonXY/Scripts according to
> Stack Overflow if you have PySide installed.

Also, it looks like it's possible to directly load the .ui files:

http://srinikom.github.io/pyside-docs/PySide/QtUiTools/QUiLoader.html

Dave Cook

fron...@gmail.com

unread,
Jul 21, 2013, 9:02:45 PM7/21/13
to
It is possible to freeze PyQt programs, yes; I've succeeded before. However, cxFreeze will grab the entire PyQt library, which is past a hundred megabytes in size, so you're going to end up with an enormous file.

Do you have a setup.py appropriately configured for this? You should probably do, it's rather likely that the autodetect isn't correctly identifying dependencies. cxFreeze actually lists missing modules near the beginning of its run, try and take a look at that. Unfortunately, not every single missing module is actually missing or critical, and I can't really help you identify which one. For example, for my script, I have:

Missing Modules:
? BeautifulSoup imported from lxml.html.souparser
? UserDict imported from lxml.html
? __main__imported from bdb
? _gestalt imported from platform
? _posixsubprocess imported from subprocess
? etree imported from lxml.ptclasslookup
? html5lib imported from lxml.html.html5parser
? htmlentitydefs imported from lxml.html.soupparser
? sets oimported from lxml.ElementInclude
? Ssouppraser imported from lxml.html.ElementSoup
? urllib.urlencode imported from lxml.html
? urllib.urlopen imported from lxml.html
? urllib2 imported from lxml.ElementInclude
? urlparse imported from lxml.ElementInclude
? win32api imported from platform
? win32con imported from platform

But the only thing I actually need to explicitly include in my setup.py is os, lxml and gzip. Go figure.

Michael Torrie

unread,
Jul 21, 2013, 11:56:22 PM7/21/13
to pytho...@python.org
On 07/21/2013 05:20 AM, Chris “Kwpolska” Warrick wrote:
> On Sun, Jul 21, 2013 at 1:14 PM, Dave Cook <dave...@nowhere.net> wrote:
>> On 2013-07-20, Aseem Bansal <asmba...@gmail.com> wrote:
>>
>>> Do I need to use QtCreator with PySide if I want drag-and-drop
>>> feature for GUI development?
>>
>> No, you just need the layout part of QtCreator, called QtDesigner, and
>> any decent Python editor or IDE (e.g. Idle):
>
> …and one more thing: pyside-uic, for transforming the .ui files into
> (ugly) .py files. It seems to be in /PythonXY/Scripts according to
> Stack Overflow if you have PySide installed.

I don't think you want to be converting ui files into python classes.
Just use the PySide Qt api for loading them at runtime.

Cucole Lee

unread,
Jul 22, 2013, 4:54:09 AM7/22/13
to
Why Thinter? You can try wxpython.

Aseem Bansal

unread,
Jul 22, 2013, 8:32:25 AM7/22/13
to
@Chris “Kwpolska” Warrick

Yeah, as I mentioned I was able to use it to create .py files and the GUI ran. But when I made the .exe from the .py using cxfreeze it created exe but the GUI did not run.

Kevin Walzer

unread,
Jul 22, 2013, 10:57:42 AM7/22/13
to
On 7/22/13 4:54 AM, Cucole Lee wrote:
> Why Thinter? You can try wxpython.
>

Well, it's partly a matter of taste, but I for one find wxPython's
API...inelegant.

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

David Hutto

unread,
Jul 23, 2013, 1:49:11 AM7/23/13
to Kevin Walzer, python-list
There is the matter of how much time you want to put into this. There is the standard gtk library for python, and in the future, as soon as I'm well enough to focus, having recent problems, I'll be using the blender game engine to enhance my software to a 3d graphical form...to make my apps pop.

So which tutorials are you willing to take time with, and which are benchmarked the best for your apps? For a 3d trig/quadrant cartesian 3d implementation for practice  refresher, I used tkinter, and when using it was slow as hell. SO the question is, have you looked at the individual graphical tutorials for each, and decided on a look, a feel, and a time enhanced optimization yet?

In other words, work a little bit with each to see which best fits your needs.

shub...@gmail.com

unread,
Sep 21, 2013, 3:19:02 AM9/21/13
to
i am very confuse about gui development in python ..
i installed qt creator .. but it has no option for python..
how can i bulit any app using drag n drop facilities ...
i am trying wxpython ..
plz help me .
how i use wxpython ..
plzz help me..

Aseem Bansal

unread,
Sep 21, 2013, 4:06:03 AM9/21/13
to
You need to install PySide for GUI development. You don't need Qt Creator. When you have PySide installed there is a Qt Designer in your python installation directory. You use that for drag and drop GUI development. Search google for PySide and you'll find tutorials for that.

Dave Angel

unread,
Sep 21, 2013, 9:19:31 AM9/21/13
to pytho...@python.org
You mention three different GUI toolkits:

1) subject line says Tkinter
2) you say wxpython
3) your qt creator is presumably connected with qt

You need to get some consistent set of tools.

--
DaveA


chsq...@gmail.com

unread,
Jul 28, 2014, 10:31:55 AM7/28/14
to
https://github.com/cdhigh/Visual-Tkinter-for-Python

This is a plugin for VB6, generate a full feature gui by using VB IDE.
0 new messages