[visionegg] Re: VisionEgg and Python 2.4 - quick and dirty?

On Feb 13, 2005, at 12:45 AM, Martin Spacek wrote:

Unfortunately, it looks like I need to move up to Python 2.4. It
introduces the new 'key' option in sort() (and in the new function
sorted()). This allows you to use the following bit of code to give
you the indices you need to retrieve the elements in a list in sorted
order:

 <snip>

So now I'm trying to find a copy of Visual Studio 7.1 (that's 2003 in
MS speak) so I can run setup.py with skip_c_compilation = 0.

Here's my question: Is there a quick and easy way to be able to get
max priority for VisionEgg in Python 2.4 in Windows without having to
recompile the _win32_maxpriority.pyd file? Or could someone with a
copy of Vis Studio 7.1 and Python 2.4 compile this file for me? Or is
there a way to do this using MinGW?

And here I was, thinking moving to Python 2.4 might be a good thing! :)

Anyhow, I haven't followed your example too closely (and I wonder if
you could keep track of your order using some cleverly constucted
dicts), but it really doesn't matter - a win32 binary for Python 2.4
would be useful.  I'll try and get around to making one this week.

If you want to do it yourself, MS released a free version of their
optimizing compiler (feeling the heat of gcc, were they?) last year, so
if you can get that to work, you should be able to compile the
max_priority extension module yourself.

Finally, if you don't want to mess with compilers, I believe you could
write a "pure Python" max_priority via use of the ctypes module.
http://starship.python.net/crew/theller/ctypes/ This would allow one to
directly call the relevant DLL functions without writing Python<->C
wrapper code. Although it seems appealing,  I think this kind of
approach is ultimately a hack, and I wouldn't be too keen on actually
forcing the Vision Egg to use it.  (I'd be much more inclined to drop
swig in favor of Pyrex...)

P.S. I've noticed that now when I run VE in windowed mode (in Windows
2000, with max priority off of course), the windows pop up at
incrementally distant locations from the top-left corner of the
screen, as normal apps often do in Windows. This is sort of an
annoyance as before they used to stay centered on the screen, which
was nice. Note that currently I'm using:

PyOpenGL-2.0.1.09.py2.4-numpy23.exe and
pygame-1.6.win32-py2.4.exe

so this behaviour might have something to do with changes in one of
those. Just a heads up...

Hmm, this must be something to do with SDL/pygame. My recollection is that there are SDL environment variables that control the starting position of the window. A quick google turns these up: SDL_VIDEO_WINDOW_POS=x,y and SDL_VIDEO_CENTERED=1 However, according to http://www.libsdl.org/faq.php?action=listentries&category=9 , "Keep in mind that these environment variables are not officially supported, and may change or go away at any time." Also, there were a few emails about this specifically in relation to the Vision Egg a while back: http://www.freelists.org/archives/visionegg/08-2003/msg00000.html

Cheers!
Andrew


====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

Other related posts: