Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-15 Thread Gary Bishop
Fernando Perez <[EMAIL PROTECTED]> wrote:
> Claudio Grondi wrote:

> > Considering what I found in the ipython mailing archives
> > and the fact, that after the fix with displaying colors on
> > bright backgrounds Gary had no time yet to get in touch
> > with me about the code I have sent him, I suppose, that
> > there will be no new releases addressing this problem
> > soon, right?

Folks, the code is OPEN SOURCE! It is right there at
SourceForge. Anyone, anywhere, at any time is free to hack it,
redistribute it, or ignore it.

It works FINE FOR ME as it is. Furthermore, I know NOTHING about
localization. Someone who NEEDS LOCALIZATION should FIX IT in a
general way.

Make your own version. Create a SourceForge project for it and you can
be the developer. I wouldn't even care if you removed my name from it.

I've received a patch or two for specific keyboards but I have no way
to test them and no time or inclination to fool with it.

The bottom line is, I write code for my own use. If others benefit
that is great. If it doesn't do what you want, make your own
version. If you want to distribute a new version, go for it.

gb



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyFMOD writing a callback function in Python

2005-02-19 Thread Gary Bishop
I haven't tried it on Linux but I believe it should work. FMOD works on Linux 
as does Pyrex.
I don't think there is any win32 specific code. Grab the source and try 
building it. You'll
likely have to fool with the libraries and includes in setup.py.

gb

Marian Aldenh?vel <[EMAIL PROTECTED]> wrote:
> Hi,

> > Check out pySonic, a new FMOD wrapper written with Pyrex. Much more 
> > Pythonic.

> I have only found Win32-Downloads. The same is true for pyFMOD. What options
> do I have to make it work on Linux?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyFMOD writing a callback function in Python

2005-02-10 Thread Gary Bishop
Check out pySonic, a new FMOD wrapper written with Pyrex. Much more Pythonic.

gb


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
On SourceForge you will find release 1.12 of my Python readline
module. If you don't want to hack the colors, there is no reason to
upgrade from 1.11 to 1.12. They *should* work the same.

But if you'd like to hack the iPython colors this new version makes it
possible.  In your ipythonrc file add a line like:

execfile hackcolors.py

Now in hackcolors.py you can change colors and backgrounds like this:

hackcolors.py
import readline

# reach deep into the bowels of readline to get the color table
escape_to_color = readline.rl.console.escape_to_color

# change a color
escape_to_color['0;32'] = 0x72

del escape_to_color
del readline

#

The two hex digits are the background and foreground color
respectively. In the example above I'm setting the color to green on a
grey background. Here is the table that is normally used to translate
colors.

  escape_to_color = { '0;30': 0x0, #black
  '0;31': 0x4, #red
  '0;32': 0x2, #green
  '0;33': 0x4+0x2, #brown?
  '0;34': 0x1, #blue
  '0;35': 0x1+0x4, #purple
  '0;36': 0x2+0x4, #cyan
  '0;37': 0x1+0x2+0x4, #grey
  '1;30': 0x1+0x2+0x4, #dark gray
  '1;31': 0x4+0x8, #red
  '1;32': 0x2+0x8, #light green
  '1;33': 0x4+0x2+0x8, #yellow
  '1;34': 0x1+0x8, #light blue
  '1;35': 0x1+0x4+0x8, #light purple
  '1;36': 0x1+0x2+0x8, #light cyan
  '1;37': 0x1+0x2+0x4+0x8, #white
  '0': None,
  }

An interested party should be able to arbitrarily map colors and their
backgrounds.

Enjoy,
gb

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
Claudio Grondi <[EMAIL PROTECTED]> wrote:
> "Ashot" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > whoa, that was quick, looks like it works for me.  Thanks a lot!
> > It would be nice to be able to set the colors in the prefs file, although
> > its possible to edit the pyColorize file as Claudio mentioned.
> To get the coloured texts on a grey (instead of white) background
> I have extended the Console.py to accept sequences as e.g.
>   "0;33;47" (see attachment)
> have extended also the
>   def make_color_table(in_class):
> in the ColorANSI.py of IPython
> and adjusted the pyColorize.py file, but it had not the desired effect.
> IPython seems not to be sending to Console.py the sequences
> defined in the

The problem *may* be the way I insert the background color in
Console.py. I simply hacked it to OR the initial value into the colors
I get out of my table. If you want to have some colors with the
background set, then we'd need to work out a way to signal
that. Perhaps instead of or'ing in the value all the time, we should
insert the background value into the table entries that don't specify
the background.

I'm happy to see someone hacking on it. The source is all there and it
is all Python. The Win32 API stuff is ugly but well documented online.

If you change the "if 0:" up at the top of Console.py to "if 1:"
you'll get a file debug.txt with the contents of the various calls to
"log". That way you can "print" stuff from within console without
messing up the window.

gb

-- 
http://mail.python.org/mailman/listinfo/python-list