PDA

View Full Version : GUI development like that of Android with Python on PC?



cyb3r_sn4k3
April 19th, 2012, 07:49 AM
So, recently I was playing around with Python for Android and learned that the GUI development on Android is very easy.
For example


import android

app = android.Android()
app.dialogCreateAlert("An example")
app.dialogSetSingleChoiceItems(['Awesome', 'Cool', 'Woah'])
app.dialogSetPositiveButtonText("Select")
app.dialogSetNegativeButtonText("Quit")
app.dialogShow()
resp = app.dialogGetResponse().result
This would create a small dialogue asking you to choose one of the options. This on a computer would take alot more code. Is there something similar for PC? with Python? (sorry if the question is stupid :|)

dniMretsaM
April 19th, 2012, 09:58 PM
So, recently I was playing around with Python for Android and learned that the GUI development on Android is very easy.
For example


import android

app = android.Android()
app.dialogCreateAlert("An example")
app.dialogSetSingleChoiceItems(['Awesome', 'Cool', 'Woah'])
app.dialogSetPositiveButtonText("Select")
app.dialogSetNegativeButtonText("Quit")
app.dialogShow()
resp = app.dialogGetResponse().result
This would create a small dialogue asking you to choose one of the options. This on a computer would take alot more code. Is there something similar for PC? with Python? (sorry if the question is stupid :|)

That shouldn't be too hard. How about a picture of what it looks like. One of the easier (yet still fairly powerful) graphical toolkit for Python is Tkinter. I personally prefer Qt, though. And some use GTK.

digrejzo
April 19th, 2012, 11:43 PM
maybe this is off topic, but dniMretsaM can you please suggest a few Tkinter/Qt tutorials/e-books?

thanks!

memilanuk
April 19th, 2012, 11:47 PM
Zetcode.com has a bunch of tutorials on tkinter, wxpython, pyqt/pyside, python, sqlite, and much more.

digrejzo
April 20th, 2012, 01:01 AM
that's a great resource, thanks a lot ;)

dniMretsaM
April 20th, 2012, 02:33 AM
Zetcode.com has a bunch of tutorials on tkinter, wxpython, pyqt/pyside, python, sqlite, and much more.

That's where I'm learning from. I actually have one of there Qt tutorials open now. Yeah, great resource.

cyb3r_sn4k3
April 20th, 2012, 04:35 AM
Zetcode.com has a bunch of tutorials on tkinter, wxpython, pyqt/pyside, python, sqlite, and much more.

Thats a great site.