You Are Here:

Community: Developer Discussion Boards

#1 Old Lightbulb (UI) Wishlist? - 2005-01-10, 21:30

Join Date: Dec 2004
Posts: 10
Location: Groningen, Netherlands
zechgron
Offline
Registered User
After two weeks of playing with Python I feel finally that developing a Symbian app is easy. Being a C/Java programmer/teacher I must confess Python is really a wonderful and powerful language and it invites people to program. Finally, no rss, mmp, buggy software and inflexible compilers anymore ;-)

However, on the other hand, looking at the OPL sourceforge project and .Net CF on that other platform ;-) I feel something is fundamentally lacking in this port: good direct graphics/canvas programming. Has anyone starting looking into extending Python in this area?

Are there any other UI wishes amongst you out there?
Reply With Quote

#2 Old 2005-01-10, 23:54

Join Date: Jul 2004
Posts: 76
eriksmartt
Offline
Regular Contributor
What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?
Reply With Quote

#3 Old 2005-01-11, 04:31

Join Date: Jan 2005
Posts: 4
Location: Finland
Send a message via AIM to juhagman
juhagman
Offline
Registered User
Quote:
Originally posted by eriksmartt
What kind of features are you interested in for graphics/canvas work?
I'm not the original poster but I'd like to say something about this subject.

At the moment I have an idea for a little program that would fetch some data from an internet site and present it as well as possible given the screen size. The optimal situation would be to use the whole screen and both custom font and font rendering. I am not into speed so almost any way to put pixels on the screen is acceptable.

For another little project I would need sound for alerting or a way trigger the "normal" alert on the phone. Also sound input and/or very limited speech-to-text could be useful.

These things are probably trivial with a c++ module, but unfortunately I am not familiar with Symbian programming. Is the SDK only for Windows or is it possible to work with OS X (or Linux)?
Reply With Quote

#4 Old Just like in J2ME... - 2005-01-11, 22:00

Join Date: Dec 2004
Posts: 10
Location: Groningen, Netherlands
zechgron
Offline
Registered User
Quote:
Originally posted by eriksmartt
What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?
I have no experience with Python GUI programming but I'm aware of the existence of tinker (?)and tcl stuff. What I just want are drawing capabilities like in J2ME or OPL: drawing bitmaps/gifs/etc, lines, boxes etc.

I personally find the solution of calling a content handler when a gif or a different format is to be shown not always the most apropriate solution.
Reply With Quote

#5 Old 2005-01-12, 00:09

Join Date: Jan 2005
Posts: 7
jeclarim
Offline
Registered User
PIL (Python Imaging Library) is the standard graphics library in the Python world. It's available here:

http://www.pythonware.com/products/pil/

It's very easy to use. Making a thumbnail from an image is as simple as this:

import Image

im = Image.open('image.jpg')
tn = im.resize((80, 60), Image.ANTIALIAS)
tn.save('thumbnail.jpg')

You can also draw an image from scratch:

import Image, ImageDraw

im = Image.new('RGB', (120, 80))
dr = ImageDraw.Draw(im)
dr.rectangle((0,0,40,80), fill=0xff0000)
dr.rectangle((40,0,80,80), fill=0xffffff)
dr.rectangle((80,0,120,80), fill=0x0000ff)
im.save('frenchflag.bmp')

It would be nice to have it on Series 60, maybe a limited subset or a similar API for the existing graphics libraries of the platform.
Reply With Quote

#6 Old canvas - 2005-01-21, 14:25

Join Date: Dec 2004
Posts: 18
mueller-stach
Offline
Registered User
Quote:
Originally posted by eriksmartt
What kind of features are you interested in for graphics/canvas work? And are there any existing Python graphics packages that you already work with?
I personally like and use VPYTHON:

http://vpython.org

on the desktop. On a small device I would like to have some basic plotting functionalities which - for example - gnuplot provides. Alternatively SVG graphics would suffice for many other purposes.
Reply With Quote

#7 Old J2ME equivalent - 2005-01-22, 05:32

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
Many developers are familiar with what's available in J2ME. It may be a good idea to have the same API which will aid migration from J2ME.

Python GUI API on big screen may not match well with mobile phone screen. We need a strip down version.

Another approach could be simply give a thin layer to Symbain C++ UI API. Someone will develop a good python API on top of that. Then we rewrite it in C++ for performace. (But flexibility is more important initially)
Reply With Quote

#8 Old Re: J2ME equivalent - 2005-01-25, 22:07

Join Date: Jul 2004
Posts: 76
eriksmartt
Offline
Regular Contributor
Quote:
Originally posted by korakotc
Another approach could be simply give a thin layer to Symbain C++ UI API. Someone will develop a good python API on top of that. Then we rewrite it in C++ for performace. (But flexibility is more important initially)
This is my thinking as well. There are a number of existing Python packages for screen drawing, but I don't think there is a single one that really owns the space. Given that, I'm guessing that Python developers are learning new graphics API's all the time, and probably changing from time to time based on project needs.

Wrapping the native drawing API's means you'll have to learn something new and specific to Series 60 (for now), but the operations should be fast.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia