473,796 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2461
On Dec 8, 6:37 am, "http://members.lycos.c o.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
9292
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. # No warranty express or implied for the accuracy, fitness to purpose
5
3449
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 I go onMouseOver on a button in a nav bar, I want that button to switch to a different image while at the same time another blank image changes as an animation to an associated image. When I go onMouseOut, the bar image reverts back to the...
6
2401
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 of the dependencies. I am designing an animation tool.
1
1647
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/ ) for Java... anything similar for Python? Thanks! Ryan McGuire
2
5776
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 color sequentially to let the user know that processing is occurring. This 'animation' occurs via the form timer event. However, I'm having trouble getting the animation to occur for all types of processing events. It appears that I have to...
0
1431
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 flash animation to a form ? Thanx
4
13916
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 something, it shows a small dialog with a moving flashlight. I examined the explorer.exe and found that that was an avi file. Now that, I would like to do similar thing in my C# application. But what is the most efficient way to do so? 1)Manually...
2
4463
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 controlled by the mouse and keyboard. The animation is designed to move filled circles around on the screen and is driven by a data file that defines (indirectly), the next relative position of each circle. And for my purposes (queueing demo in the...
0
201
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 it as a regular tool already. I'm looking for practical application so maybe we could work something out. cheers,
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.