[IPython-user] colors NoColor issue and ipython.el

belinda thom bthom at cs.hmc.edu
Thu Nov 23 03:55:04 CST 2006


On Nov 22, 2006, at 9:56 PM, Jouni K Seppanen wrote:

> belinda thom <bthom at cs.hmc.edu> writes:
>
>> However, when I execute py-shell in xemacs (via M-x py-shell), the
>> colors are turned on (the ipythonrc file is ignored).
>
> Could it be an environment variable problem again? When you launch a
> program using the MacOS X GUI (as opposed to running programs from the
> Terminal), it does not "see" any environment variables set in your
> shell. If IPython needs any environment variables to find ipythonrc

I wish this were the problem :-).

I can verify that my environment is set correctly via, e.g.
:
In [1]: os.getenv('PYTHONDOCS')
Out[1]: '/Users/bthom/Documents/Python-Docs-2.4.3'

The big stumbling block w/environment that I had had before was due  
to the fact
that the carbon variant of xemacs expected to run as .app (hence the
need for the plist file). Other things about the carbon version were  
also
problematic: gnuclient/gnuserv simply doesn't work yet. W/the older  
X11 xemacs
version  (which runs as a command vs an .app), those problems  
disappeared.

When I set "colors NoColor" in my ipythonrc file, it is just  
*IGNORED*. And it
is only ignored when ipython is started via py-shell. Other requests  
(e.g. 'editor'
which I set to a shell script that I wrote to call gnuclient) are set as
ipythonrc expects; colors is not:

In [3]: config
[snip]
'colors': 'LightBG'
[snip]
'editor': 'run_xemacs_server_or_client'
[snip]

I can manually change colors in py-shell (via colors NoColor), so it  
is feasible for
the xemacs buffer to handle this color change. But it is a royal pain  
to have to remember
to type this every time I start py-shell.

I tried executing code in ipythonrc, e.g. "execute colors NoColor"  
but this gives me a
warning (Failure executing code: colors NoColor).

I also tried making an alias (which would require less typing); in  
this case, ipythonrc
is read (the alias is ['c', '%colors NoColor']), but it won't run:

In [1]: c
sh: line 1: fg: no job control

I had thought aliases could be used as shortcuts to magic commands.  
Perhaps something
major is wrong w/my setup. Behaviors like these keep me from  
productively using ipython
in xemacs w/confidence.

 From the world who reads this list---help is greatly appreciated.

Thanks,

--b


More information about the IPython-user mailing list