Re: Python App on Maemo

2009-05-05 Thread Attila Csipa
On Tuesday 05 May 2009 10:41:11 Jeremiah C. Foster wrote:
> project.) But there is no need to prototype first in python - it gives
> you no special advantages aside from the fact that most prefer to code
> in python versus C++ and that some consider prototyping to be much
> faster in python.

Another, very important advantage for some, is that you don't need scratchbox, 
or any maemo specific setup (god forbid cross compile) to develop in PyQt and 
you can run literally the same code on both your desktop and your NIT. Just 
install python-qt on your desktop and when done, copy over .py files and you're 
good to go.

Having worked with Qt in c++ and python as well, I would be one of those who 
say development in python is significantly faster (especially prototyping). 
Even if you don't keep a single line of python code in the end. I usually 
found myself better off developing my c++ (re)implementation based on a python 
prototype than developing in c++ from scratch. YMMV, of course. If both 
development time and execution speed are required I usually go for a mix - 
python prototype and then optimize speed by replacing profiled 
functions/classes with C(++) code to achieve the required speed. YMMV, again, 
neither qt nor python are a silver bullet, but both are very very useful if 
you use them right :)



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python App on Maemo

2009-05-05 Thread Jeremiah C. Foster

On May 5, 2009, at 1:48 AM, Jey Han Lau wrote:

> We are currently trying to build a GUI application on Maemo, and after
> listening to suggestions from a few Maemo developers we started
> prototyping it with Python and Qt.
>
> Python and Qt seems easy since the UI code designed from Qt designer  
> can
> be converted into python automatically. But soon we came to realize  
> that
> only the UI code (in xml) is converted, any functions, methods or code
> written in C++ for the original Qt application has to be manually
> translated into Python. Seems reasonable but now we aren't so sure if
> this is the best approach anymore...
>
> The application we are building isn't too complicated (but will have
> quite some number of screens/forms), and will contain SOAP web service
> calls, and some file writing/reading. We've got the web service call
> working using ZSI, so all that is left to decide is the UI framework  
> to
> be used. Qt seems to be a better choice initially since it comes  
> with a
> designer IDE that allows us to design the GUI more easily.
>
> Before we move on to spend more time using Python and Qt to develop  
> our
> program, we'd like to hear some comments from you developers : )

If the strength of your development team is in C++, then prototype  
your application in C++. Qt is built on C++. The python bindings are  
very useful to prototype quickly if you are strong in python (Qt has  
other bindings as well, including perl bindings which are a SoC  
project.) But there is no need to prototype first in python - it gives  
you no special advantages aside from the fact that most prefer to code  
in python versus C++ and that some consider prototyping to be much  
faster in python.

Jeremiah
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python App on Maemo

2009-05-04 Thread Attila Csipa
On Tuesday 05 May 2009 01:48:55 Jey Han Lau wrote:
 >We are currently trying to build a GUI application on Maemo, and after 
> listening to suggestions from a few Maemo developers we started 
> prototyping it with Python and Qt.

> Python and Qt seems easy since the UI code designed from Qt designer can
> be converted into python automatically. But soon we came to realize that
> only the UI code (in xml) is converted, any functions, methods or code
> written in C++ for the original Qt application has to be manually
> translated into Python. Seems reasonable but now we aren't so sure if
> this is the best approach anymore...

Could you elaborate what do you have to translate manually ? The PyQt 
development process is fully rounded in python, you don't have to touch C++ at 
any point unless you're using libraries without python bindings.

The generic PyQt workflow is:

- make your forms in qt designer
- compile the forms via pyuic
- compile any included resources via pyrrc
- import results in your own python code
- debug
- make deb (either manually or via py2deb or some other tool)

> Before we move on to spend more time using Python and Qt to develop our 
> program, we'd like to hear some comments from you developers : )

It gives you all the goods Qt has (not just GUI-wise) with a language that is 
very quick to develop in. The only downside is that it doesn't come by default 
in Maemo and many users who have not cloned to mmc are short on space to 
install it. Also, the fact that most of the packages in Maemo use GTK means 
you'll have to keep them both in memory and somewhat longer startup times for 
your qt app, but that's not critical, really.

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Python App on Maemo

2009-05-04 Thread Jey Han Lau

Hi,

We are currently trying to build a GUI application on Maemo, and after 
listening to suggestions from a few Maemo developers we started 
prototyping it with Python and Qt.

Python and Qt seems easy since the UI code designed from Qt designer can 
be converted into python automatically. But soon we came to realize that 
only the UI code (in xml) is converted, any functions, methods or code 
written in C++ for the original Qt application has to be manually 
translated into Python. Seems reasonable but now we aren't so sure if 
this is the best approach anymore...

The application we are building isn't too complicated (but will have 
quite some number of screens/forms), and will contain SOAP web service 
calls, and some file writing/reading. We've got the web service call 
working using ZSI, so all that is left to decide is the UI framework to 
be used. Qt seems to be a better choice initially since it comes with a 
designer IDE that allows us to design the GUI more easily.

Before we move on to spend more time using Python and Qt to develop our 
program, we'd like to hear some comments from you developers : )


Thanks,
Jey Han
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers