473,386 Members | 1,733 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,386 software developers and data experts.

GDI in python>?

hi,

is it possible to address the 'screen pixels' using python , like
analogous to older dos( functions that graphics.h provides') or win api
calls for gdi.

what i want is to display clusters (in differetn colours) on screen
using python.

thanks.

Feb 18 '06 #1
5 4845
al pacino wrote:
hi,

is it possible to address the 'screen pixels' using python , like
analogous to older dos( functions that graphics.h provides') or win api
calls for gdi.

what i want is to display clusters (in differetn colours) on screen
using python.

thanks.

Sure. The problem will be to choose the right tool from the myriads of
available ones.

I have some experience with PyGame
http://www.pygame.org/news.html
which is built on top of SDL
http://www.libsdl.org/index.php
and find it easy to understand and use.

Don't be fooled by the 'Game' part - PyGame is as useful as SDL (a very
good library).

Claudio
Feb 18 '06 #2
al pacino schrieb:
hi,

is it possible to address the 'screen pixels' using python , like
analogous to older dos( functions that graphics.h provides') or win api
calls for gdi.

Use one of the available GUI-Toolkits - Tkinter is included already. Or
pygame.

Diez
Feb 18 '06 #3
Le 17 Feb 2006 22:02:23 -0800, al pacino a écrit :
hi,

is it possible to address the 'screen pixels' using python , like
analogous to older dos( functions that graphics.h provides') or win api
calls for gdi. Some possibilities (all on Win32 only):
ctypes by Thomas Heller
venster (uses ctypes) on sourceforge
win32all by Marc Hammond
what i want is to display clusters (in differetn colours) on screen
using python.

thanks.

Feb 18 '06 #4
al pacino wrote:
is it possible to address the 'screen pixels' using python , like
analogous to older dos( functions that graphics.h provides') or win api
calls for gdi.

what i want is to display clusters (in differetn colours) on screen
using python.


Almost any (or just "any") GUI toolkit can do that. Check out wxPython,
Tkinter, PyQT, Pygame, etc.

For example, in the wxPython demo (two easy downloads to install and run
on a Windows box), the Miscellaneous->DrawXXXList demo page shows how to
draw sets of points, lines, rectangles, etc, directly to the display via
a DeviceContext object.

-Peter

Feb 18 '06 #5
Thanks claudio, that should work out fine.

Feb 18 '06 #6

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

Similar topics

1
by: TheDustbustr | last post by:
I'm writing a game in C++ which calls out to python for scripting. I'd like to expose the instance of my Game class (a singleton) to python (so that the instances of Clock, Camera, etc are...
2
by: Rene Pijlman | last post by:
I can't seem to find any way to specify the character encoding with the DB API implementation of PyPgSQL. There is no mention of encoding and Unicode in the DB API v2.0 spec and the PyPgSQL README....
42
by: Bicho Verde | last post by:
I have now free time and money to do what I want :-) I have some basic skills in programming (C, Pascal, Macromedia Actionscript) but don't know exactly what to do in the world of programming. And...
2
by: aum | last post by:
Hi, I'm looking for an object-relational layer, which can wrap a MySQL database into highly pythonic objects. There seem to be dozens of packages which provide some of this functionality, but...
1
by: Michael R Seefelt | last post by:
I have written a simple C-program that loads a Python Function that connects to a PostgreSQL database> When I only load and execute the Python function all works OK. If I call the Python function a...
5
by: john | last post by:
Hi I am devlopeing a data centric intranetsite with data in mysql database I would like your opinion on this architecture Data will be fetched from database by python & converted into xml The...
4
by: news | last post by:
I've just started to test/learn python. I've got Linux > mandrake9 > python & documentation. What I'll initially want to be doing needs file I/O, so I wanted to confirm file I/O early in my...
5
bartonc
by: bartonc | last post by:
Two new sub forums have been added to the Python Forum. These are NOT Q&A forums, but threads will be open to discussion. In Python > Python Code you will find snippets submitted by experts and...
15
by: rh0dium | last post by:
Hi Folks, OK I love the logging module. I use it everywhere. I was happily putting at the top of each of my scripts ------<snip>------ #!/usr/bin/env python2.4 import logging
4
by: pdlemper | last post by:
Have carefully installed Python 2.5.1 under XP in dir E:\python25 . ran set path = %path% ; E:\python25 Python interactive mode works fine for simple arithmetic . Then tried >> import math Get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.