473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Basic animation in Python - how to

I need to draw a shaded rectangle and have flashing (gif animated)
points on it
so not to refresh all objects a rectangle, but points, changing their
colors, attributes.
Please refer me to some basic Python code for animation like that .

Darius
Dec 8 '07 #1
2 2448
On Dec 8, 6:37 am, "http://members.lycos.co.uk/dariusjack/"
<dariusjack2...@yahoo.iewrote:
I need to draw a shaded rectangle and have flashing (gif animated)
points on it
so not to refresh all objects a rectangle, but points, changing their
colors, attributes.
Please refer me to some basic Python code for animation like that .

Darius
What kind of graphical environment and operating system do you want to
do this on? Is there a particular UI toolkit you have in mind? Or do
you want to output an animated gif or small movie file?
-Peter
Dec 8 '07 #2
Please refer me to some basic Python code for animation like that .
You are in for a wild ride! Depending on your platform you can use dozens of
different tools. Try wxPython, pyCairo, pyGTK and PIL (Python Imaging
Library) for the most capable.

Basically you are looking at a fairly complex thing - you need to create
a "context" and then draw into it with commands (they vary according to
your toolkit) and then display the result. Loop that and change the drawing
every time and you have animation.

wxPython has very easy widgets for doing something like this (you can use an
animated gif for example), and it's cross-platform so that a big plus. It's
tricky to get into, but well worth it.

hth
\d

Dec 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
5
by: Brian Angliss | last post by:
I'm relatively new to scripting in JavaScript, so I'm not too surprised I'm having difficulty scripting up an animation effect for my personal site. What I'm trying to do is the following: When...
6
by: Darren | last post by:
X-No-Archive Hi all, Can anyone help me with structuring the data in a small tool I have to build? I'm trying to work out if there's a design pattern or data structure that would remove some...
1
by: Enigma Curry | last post by:
I'm looking for something that can display a pop-up "toaster" like animation like Gaim or MSN messenger does to notify of incoming messages. There's JToaster ( http://jtoaster.sourceforge.net/ )...
2
by: rdemyan via AccessMonster.com | last post by:
My application has a lot of complicated SQL statements, calculations, processing that takes time. I've created a custom form to act like a messagebox. It has 10 small rectangles on it that change...
0
by: John Devlon | last post by:
Hi, I've created a small application in Visual basic .NET. On the welcome form, visual at statup for a few seconds, I would like a flash animation. Does anyone know how to add a custom...
4
by: Sin Jeong-hun | last post by:
Most applications, including Windows Explorer, show some sort of 'wait' dialog with animation when a lengthy operation is going on. For example, When the Windows Explorer is searching for...
2
by: Virgil Stokes | last post by:
I have been using Python for a short time and I find it a very flexible language, and easy to learn and use. I have also worked some with PyGame and used it to create a simple animation that is...
0
by: Stef Mientki | last post by:
Virgil Stokes wrote: Maybe this might be of your interest: http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screenshots.html Although it's in alfa stage, I'm using parts of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.