From vivainio at gmail.com  Tue May  2 04:07:38 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Tue, 2 May 2006 11:07:38 +0300
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
Message-ID: <46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>

On 5/2/06, Fernando Perez <fperez.net at gmail.com> wrote:

> Sure.  I can build an rc in the next couple of days and post it, and
> if all goes well with it over 10-15 days, we can make the actual
> release.  You should write the release notes for this one, since you
> actually know much better than I what the new stuff is/does.  Now that
> we have an easy-to-edit wiki, it might be a good idea to keep a real
> "what's new" page.

Ok, I'll put the release notes in the wiki. There's no real rush, I
think sometime next week would be optimal (I'll have a bit more
freetime in my hands then).

Are ipipe and pyreadline both in a comfortably releasable condition at
the moment? I think we should include a stable version of pyreadline
in the windows distribution of ipython.

--
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From jorgen.stenarson at bostream.nu  Tue May  2 12:24:08 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Tue, 02 May 2006 18:24:08 +0200
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
	<46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
Message-ID: <445787A8.5020604@bostream.nu>

Ville Vainio skrev:
> On 5/2/06, Fernando Perez <fperez.net at gmail.com> wrote:
> 
>> Sure.  I can build an rc in the next couple of days and post it, and
>> if all goes well with it over 10-15 days, we can make the actual
>> release.  You should write the release notes for this one, since you
>> actually know much better than I what the new stuff is/does.  Now that
>> we have an easy-to-edit wiki, it might be a good idea to keep a real
>> "what's new" page.
> 
> Ok, I'll put the release notes in the wiki. There's no real rush, I
> think sometime next week would be optimal (I'll have a bit more
> freetime in my hands then).
> 
> Are ipipe and pyreadline both in a comfortably releasable condition at
> the moment? I think we should include a stable version of pyreadline
> in the windows distribution of ipython.
> 

Ville,

In a previous discussion with Michael Foord on the user list we talked 
about exposing a way for changing the default location for the 
pyrereadline config file. Part of the solution to this problem, as I see 
it required a change in IPython/rlineimpl.py. I have attached the 
proposed patch from that discussion. The second part is providing a 
config option somewhere in ipython but we could leave that for later.

Otherwise I think the functionality is working fine now. However I have 
not looked at installation issues in a while. Like which configfiles 
should be installed. Do we just overwrite any readline.py file in the 
site-packages dir? Or should we leave that file for manual installation?

I'm also in the middle of a change of computers now so my access to a 
windows computer is a bit limited. This should be done by friday.

/J?rgen

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ipython_config.patch
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20060502/f6bc57ac/attachment.ksh>

From walter at livinglogic.de  Tue May  2 12:45:55 2006
From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=)
Date: Tue, 02 May 2006 18:45:55 +0200
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
	<46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
Message-ID: <44578CC3.6070201@livinglogic.de>

Ville Vainio wrote:
> On 5/2/06, Fernando Perez <fperez.net at gmail.com> wrote:
> 
>> Sure.  I can build an rc in the next couple of days and post it, and
>> if all goes well with it over 10-15 days, we can make the actual
>> release.  You should write the release notes for this one, since you
>> actually know much better than I what the new stuff is/does.  Now that
>> we have an easy-to-edit wiki, it might be a good idea to keep a real
>> "what's new" page.
> 
> Ok, I'll put the release notes in the wiki. There's no real rush, I
> think sometime next week would be optimal (I'll have a bit more
> freetime in my hands then).
> 
> Are ipipe and pyreadline both in a comfortably releasable condition at
> the moment? I think we should include a stable version of pyreadline
> in the windows distribution of ipython.

ipipe isn't stable in the sense that it has survived the impact of
external forces ;)

But currently I can't think of any API changes that wouldn't be
backwards compatible. If we switch to generic functions for xrepr() etc.
this can be done with the __xrepr__() methods as fallbacks. Another
change might be that all pipes are able to yield more data even if the
input has raised StopIeration once (this would e.g. make it possible to
implement the equivalent of "tail -f foo"), but this only affects the
individual pipes.

What missing is help strings for the new find commands, but after that,
I think ipipe is ready for publication.

Servus,
   Walter



From fperez.net at gmail.com  Tue May  2 13:01:59 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 2 May 2006 11:01:59 -0600
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <44578CC3.6070201@livinglogic.de>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
	<46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
	<44578CC3.6070201@livinglogic.de>
Message-ID: <db6b5ecc0605021001s438a6ad0oa4a221639fce9755@mail.gmail.com>

On 5/2/06, Walter D?rwald <walter at livinglogic.de> wrote:
> Ville Vainio wrote:

> > Are ipipe and pyreadline both in a comfortably releasable condition at
> > the moment? I think we should include a stable version of pyreadline
> > in the windows distribution of ipython.
>
> ipipe isn't stable in the sense that it has survived the impact of
> external forces ;)

Given that ipipe and pyreadline are both altogether new tools, I'd
suggest we give the rc a bit more time to bake.  We can put it out
this week, and then leave it out for two-three weeks out, while
encouraging feeedback both on the -dev and the -user list.  Would be
nice not to have to issue a .fix1 or .3 right away because of some
silly problem.

I'm now running WinXP under linux via VMWare, so I can also test
things there.  I'll take the code for a spin under win32 as well.

Cheers,

f



From vivainio at gmail.com  Tue May  2 16:22:15 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Tue, 2 May 2006 13:22:15 -0700
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <445787A8.5020604@bostream.nu>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
	<46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
	<445787A8.5020604@bostream.nu>
Message-ID: <46cb515a0605021322v1c4275eave1e9a5b2fe7d930a@mail.gmail.com>

As far as the release goes, I'll try to write release notes tomorrow
(wednesday).

> proposed patch from that discussion. The second part is providing a
> config option somewhere in ipython but we could leave that for later.

I'll apply the patch tomorrow, and I think the configuration could be
directly in the config files.

However, this seems to make rlineimpl a bit redundant since it's now
called just "readline" again (and hence it may clobber the other
readline). I don't see that as a huge concern and if this is what we
want it's fine with me. rlineimpl will still remain as a convenient
way to determine whether the readline is available at all.

--
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From vivainio at gmail.com  Wed May  3 11:44:01 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Wed, 3 May 2006 08:44:01 -0700
Subject: [IPython-dev] Fwd: [IPython-user] IPython release soon?
In-Reply-To: <445787A8.5020604@bostream.nu>
References: <46cb515a0605012347q5c6cc90ds1582c2b963454bec@mail.gmail.com>
	<db6b5ecc0605020010i6f344501w43ff0a5ab3422d6@mail.gmail.com>
	<46cb515a0605020106p76f5de97p668f2da5c9f8c7b6@mail.gmail.com>
	<46cb515a0605020107y2f85fd0dm9b3b7fe568c665a7@mail.gmail.com>
	<445787A8.5020604@bostream.nu>
Message-ID: <46cb515a0605030844x6f057cah81aa91c406c0d5a1@mail.gmail.com>

On 5/2/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:

> Otherwise I think the functionality is working fine now. However I have
> not looked at installation issues in a while. Like which configfiles
> should be installed. Do we just overwrite any readline.py file in the
> site-packages dir? Or should we leave that file for manual installation?

I think readline.py should be installed manually for now. Let's be as
conservative as possible. Ditto for config files, zero configuration
== good configuration. :)

Building a Windows .exe distribution by doing "python setup.py
bdist_wininst" seemed to work fine, I think we should ship this one as
an .exe (it's Windows only anyway).

--
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From vivainio at gmail.com  Wed May  3 12:09:34 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Wed, 3 May 2006 09:09:34 -0700
Subject: [IPython-dev] Google "summer of code" & ipipe
Message-ID: <46cb515a0605030909r71b33ddeqd4202ecd865a8909@mail.gmail.com>

FYI, I posted the following on c.l.py:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/d120a6500a3b6f6a/cec582632c5af063#cec582632c5af063

--
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From jorgen.stenarson at bostream.nu  Wed May  3 13:27:26 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Wed, 03 May 2006 19:27:26 +0200
Subject: [IPython-dev] [IPython-user] What's new in 0.7.2
In-Reply-To: <46cb515a0605030847t1588c88fx904bbf760245f90@mail.gmail.com>
References: <46cb515a0605030847t1588c88fx904bbf760245f90@mail.gmail.com>
Message-ID: <4458E7FE.2020902@bostream.nu>

Ville Vainio skrev:
> I wrote a preliminary "what's new" document (which will be a part of
> the release notes) for the 0.7.2 version of ipython "out soon" (not
> branched quite yet though). it's in the wiki at -
> 
> http://projects.scipy.org/ipython/ipython/wiki/WhatsNew
> 
> I'd appreciate if you took the time to take a look at it, especially
> if you contributed something that I neglected to mention.
> 
I added %clear to the list of new magic commands. When I looked at the 
online doc it only mentions %clear out and %clear in and not %clear 
array. %clear array is supposed to be active only for pylab and I don't 
have matplotlib installed at home so I cannot test if there is a valid 
doc string in that case.

/J?rgen



From fperez.net at gmail.com  Wed May  3 15:25:21 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Wed, 3 May 2006 13:25:21 -0600
Subject: [IPython-dev] 2.4-only bug in ipipe
Message-ID: <db6b5ecc0605031225y28824befh9852fc0e18bfcb78@mail.gmail.com>

Hi folks,

under python2.3:

In [1]: from ipipe import *
------------------------------------------------------------
   File "/home/fperez/ipython/svn/ipython/trunk/IPython/Extensions/ipipe.py",
line 451
     "|".join(attrs2name[b] for b in xrange(6) if self.attrs&(1<<b)) or 0)
                              ^
SyntaxError: invalid syntax


Let's make sure that we keep all code 2.3 compatible.  Apple OSX ships
with 2.3, as do many other still-widely-used Linux distros.

Cheers,

f



From walter at livinglogic.de  Wed May  3 15:40:53 2006
From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=)
Date: Wed, 03 May 2006 21:40:53 +0200
Subject: [IPython-dev] 2.4-only bug in ipipe
In-Reply-To: <db6b5ecc0605031225y28824befh9852fc0e18bfcb78@mail.gmail.com>
References: <db6b5ecc0605031225y28824befh9852fc0e18bfcb78@mail.gmail.com>
Message-ID: <44590745.4030202@livinglogic.de>

Fernando Perez wrote:
> Hi folks,
> 
> under python2.3:
> 
> In [1]: from ipipe import *
> ------------------------------------------------------------
>    File "/home/fperez/ipython/svn/ipython/trunk/IPython/Extensions/ipipe.py",
> line 451
>      "|".join(attrs2name[b] for b in xrange(6) if self.attrs&(1<<b)) or 0)
>                               ^
> SyntaxError: invalid syntax
> 
> 
> Let's make sure that we keep all code 2.3 compatible.  Apple OSX ships
> with 2.3, as do many other still-widely-used Linux distros.

Done.

This reminds me: Do we need a test suite for ipipe?

Servus,
    Walter



From fperez.net at gmail.com  Wed May  3 16:11:38 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Wed, 3 May 2006 14:11:38 -0600
Subject: [IPython-dev] 2.4-only bug in ipipe
In-Reply-To: <44590745.4030202@livinglogic.de>
References: <db6b5ecc0605031225y28824befh9852fc0e18bfcb78@mail.gmail.com>
	<44590745.4030202@livinglogic.de>
Message-ID: <db6b5ecc0605031311r6ac43284wb105ed802747a0a0@mail.gmail.com>

On 5/3/06, Walter D?rwald <walter at livinglogic.de> wrote:
> Fernando Perez wrote:
> > Let's make sure that we keep all code 2.3 compatible.  Apple OSX ships
> > with 2.3, as do many other still-widely-used Linux distros.
>
> Done.
Thanks.

> This reminds me: Do we need a test suite for ipipe?

It would certainly be great. The severe lack of tests is one of
ipython's greatest weaknesses, and as we move forward we should really
try to avoid putting in new code that is not accompanied by proper
tests.

Cheers,

f



From fperez.net at gmail.com  Mon May  8 02:12:54 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 8 May 2006 00:12:54 -0600
Subject: [IPython-dev] IPython 0.7.2.rc1 ready for testing
Message-ID: <db6b5ecc0605072312i6738e344idb0dd08c897f5d74@mail.gmail.com>

Hi all,

I've just put up a release candidate of ipython 0.7.2 at

http://ipython.scipy.org/dist/testing/

This new release will have a number of interesting new features
contributed by Ville (our new stable maintainer), Walter Doerwald and
the rest of the growing ipython team.  Please see the "what's new"
document at

http://projects.scipy.org/ipython/ipython/wiki/WhatsNew

for details.  Let us know of any problems you may encounter with this
release.  We plan on letting this one sit in public testing for
roughly 2 weeks before making an official release.

Enjoy!


The IPython team.



From hans_meine at gmx.net  Mon May  8 03:37:49 2006
From: hans_meine at gmx.net (Hans Meine)
Date: Mon, 8 May 2006 09:37:49 +0200
Subject: [IPython-dev] Sth. like "python -O" within IPython?
Message-ID: <200605080937.50566.hans_meine@gmx.net>

Hi!

When I am using assert's a lot, it certainly makes a difference when I run my 
program with "python -O".  Is it possible to run IPython with optimization?

I would imagine either

* a "global" commandline parameter -O or

* an interactive means to switch on optimization (e.g. -O for %run or 
similar), if that is possible.

(I already used psyco within IPython, which provides a different, but more 
effective way for a speedup, but is not that 100% stable.)

Ciao, /  /
     /--/
    /  / ANS



From fperez.net at gmail.com  Mon May  8 14:21:15 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 8 May 2006 12:21:15 -0600
Subject: [IPython-dev] Sth. like "python -O" within IPython?
In-Reply-To: <200605080937.50566.hans_meine@gmx.net>
References: <200605080937.50566.hans_meine@gmx.net>
Message-ID: <db6b5ecc0605081121y96b35f1yc2626f5b8d4cd47e@mail.gmail.com>

On 5/8/06, Hans Meine <hans_meine at gmx.net> wrote:
> Hi!
>
> When I am using assert's a lot, it certainly makes a difference when I run my
> program with "python -O".  Is it possible to run IPython with optimization?
>
> I would imagine either
>
> * a "global" commandline parameter -O or
>
> * an interactive means to switch on optimization (e.g. -O for %run or
> similar), if that is possible.

A bit of googling so far doesn't really reveal anything useful.  I've
been trying to find out if it's possible in python to compile source
strings (via compile() ) into optimized bytecode, and if it is
possible for execfile() to run the given filename with optimizations
active.

So far, all documentation seems to (mostly by omission) indicate that
such local control of optimization is not possible in python, and that
the -O state is a global of the interpreter itself.  If this
interpretation is correct, it means that you would need to run /all/
of ipython with optimization active for this to work.  This part is
easy:

planck[~]> ls ~/ipython/ipython/IPython/*.pyo | wc -l
/bin/ls: No match.
0
planck[~]> python -O `which ipython`
[... start ipython session]

planck[~]> ls ~/ipython/ipython/IPython/*.pyo | wc -l
36

This shows that indeed, the .pyo files were created and ipython itself
is running under -O.   Furthermore, this activates -O for all files
executed with %run:

planck[~/test]> cat optim.py
def f():
    assert 0,"This should always fail if asserts are on"
    print "If this prints, asserts are being ignored"

f()

And then:

planck[~/test]> ip
Python 2.3.4 (#1, Feb  2 2005, 12:11:53)
Type "copyright", "credits" or "license" for more information.

IPython 0.7.2.rc1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: run optim.py
---------------------------------------------------------------------------
exceptions.AssertionError                            Traceback (most
recent call last)

/home/fperez/test/optim.py
      3     print "If this prints, asserts are being ignored"
      4
----> 5 f()
      6
      7

/home/fperez/test/optim.py in f()
      1
----> 2 def f():
      3     assert 0,"This should always fail if asserts are on"
      4     print "If this prints, asserts are being ignored"
      5
      6 f()

AssertionError: This should always fail if asserts are on
WARNING: Failure executing file: <optim.py>

#########

Now, let's run with -O:


planck[~/test]> python -O `which ipython`
Python 2.3.4 (#1, Feb  2 2005, 12:11:53)
Type "copyright", "credits" or "license" for more information.

IPython 0.7.2.rc1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: run optim.py
If this prints, asserts are being ignored

###########

So you could alias ipythono to 'python -O path/to/your/ipython/' and
use it this way.  I hope this is useful, but if anyone knows how to
(or if it's even possible to) enable optimizations locally, I'd be
interested in hearing about it.

Cheers,

f



From travis_caldwell2000 at yahoo.com  Tue May  9 04:46:52 2006
From: travis_caldwell2000 at yahoo.com (Travis Caldwell)
Date: Tue, 9 May 2006 01:46:52 -0700 (PDT)
Subject: [IPython-dev] Fwd: Ipython and PyDev
In-Reply-To: <db6b5ecc0605081121y96b35f1yc2626f5b8d4cd47e@mail.gmail.com>
Message-ID: <20060509084653.32719.qmail@web35901.mail.mud.yahoo.com>


Eclipse has an enhancement bug to make the console ANSI compliant:

Bugzilla Bug 112948  Make the console ANSI compliant
https://bugs.eclipse.org/bugs/show_bug.cgi?id=112948

It has +1 from three people and they say they are willing to take
contributions.

                   _Travis_Caldwell_


> -----Original Message-----
> From: Fernando Perez [mailto:Fernando.Perez at colorado.edu]
> Sent: Monday, May 01, 2006 11:25 AM
> To: Carroll, Barry
> Cc: ipython-user at scipy.net
> Subject: Re: [IPython-user] Ipython and PyDev
> 
> Hi Barry,
> 
> sorry for the delayed reply, I was away and I'm only slowly catching
back
> up.
> 
> Carroll, Barry wrote:
> > Greetings:
> >
> > Our test group is putting together a scripting/testing environment
for
> our
> > new automated test system for barcode scanners and imagers.  We
have
> > settled on Ipython as the interactive shell to use.
[snip]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



From fperez.net at gmail.com  Tue May  9 13:49:55 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 9 May 2006 11:49:55 -0600
Subject: [IPython-dev] Fwd: Ipython and PyDev
In-Reply-To: <20060509084653.32719.qmail@web35901.mail.mud.yahoo.com>
References: <db6b5ecc0605081121y96b35f1yc2626f5b8d4cd47e@mail.gmail.com>
	<20060509084653.32719.qmail@web35901.mail.mud.yahoo.com>
Message-ID: <db6b5ecc0605091049ka999a23y9e3bda15a52eea4f@mail.gmail.com>

Th

On 5/9/06, Travis Caldwell <travis_caldwell2000 at yahoo.com> wrote:
>
> Eclipse has an enhancement bug to make the console ANSI compliant:
>
> Bugzilla Bug 112948  Make the console ANSI compliant
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=112948
>
> It has +1 from three people and they say they are willing to take
> contributions.

Thanks for the link.  If this were done, it would indeed address the
issues of ipython running in their console with all the bells and
whistles.  Here's hoping one of their hackers will get to this one...

Cheers,

f



From fperez.net at gmail.com  Thu May 11 14:06:01 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Thu, 11 May 2006 12:06:01 -0600
Subject: [IPython-dev] New API page on the wiki...
Message-ID: <db6b5ecc0605111106od01fc45g6c425de067090b03@mail.gmail.com>

Hi all,

Todd Miller, from the STScI, recently sent me some information on the
work they had to do in order to use ipython as a shell for the next
version of their PyRAF analysis system.  I decided to use this as the
starting information for a new page on IPython's API:

http://projects.scipy.org/ipython/ipython/wiki/NewDesign/API

I know Ville has also done a lot of work on a cleaner mechanism to
expose IPython's internals. It would be great if we start documenting
all this on this page (breaking it into subpages as need dictates).
As we refactor the code, one thing I /really/ want to do is offer
extension writers a clear way to access ipython's public internals.

If any of you has used ipython for a project with serious extensions,
let us know and we'll add the material to the Wiki (note that very
soon, we'll be able to have users register themselves so they can edit
the wiki as well).

Cheers,

f



From jorgen.stenarson at bostream.nu  Thu May 11 14:53:55 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Thu, 11 May 2006 20:53:55 +0200
Subject: [IPython-dev] Createing a release candidate for pyreadline
Message-ID: <44638843.2020608@bostream.nu>

hi,

I would like to create an installer for a release candidate for 
pyreadline but I don't know where to put it. I believe a good place 
would be next to ipython-rc at http://ipython.scipy.org/dist/testing/ 
but I don't know if I can or how to put it there.

/J?rgen



From fperez.net at gmail.com  Thu May 11 15:49:08 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Thu, 11 May 2006 13:49:08 -0600
Subject: [IPython-dev] Createing a release candidate for pyreadline
In-Reply-To: <44638843.2020608@bostream.nu>
References: <44638843.2020608@bostream.nu>
Message-ID: <db6b5ecc0605111249v2141839bl85343cbc51d8af30@mail.gmail.com>

On 5/11/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> hi,
>
> I would like to create an installer for a release candidate for
> pyreadline but I don't know where to put it. I believe a good place
> would be next to ipython-rc at http://ipython.scipy.org/dist/testing/
> but I don't know if I can or how to put it there.

Just email it to me (off-list).  Currently there's no easy way for me
to give you write access there, since it requires raw ssh entry.  But
I'll just put it up if you either send it to me or put it up anywhere
I can grab it.

Cheers,

f



From fperez.net at gmail.com  Sat May 13 18:07:03 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Sat, 13 May 2006 16:07:03 -0600
Subject: [IPython-dev] A more organized process for release 0.7.2
Message-ID: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>

Hi all,

since now there's a few more of us taking part of this process, I set
up things in a slightly more organized fashion on Trac so we can
coordinate things without wasting too much time on back-and-forth
email.  Highlights:

* I made a page for the release process (currently mostly empty):

http://projects.scipy.org/ipython/ipython/wiki/Release/General

which contains a link for the next release page:

http://projects.scipy.org/ipython/ipython/wiki/Release/0.7.2

Let's keep any information required there.


* You'll see there's a special query for this release:

http://projects.scipy.org/ipython/ipython/query?group=owner&milestone=r0.7.2&owner=%21&order=priority

as well as a status page:

http://projects.scipy.org/ipython/ipython/milestone/0.7.2

For this to work, I made a specific milestone, named 0.7.2.  Let's try
to ensure that we clear that page of all open tickets before making
the actual release (hopefully by closing the bugs instead of
reassigning them :)

* I did some ticket triaging, assigned a few to myself and will try to
fix all as soon as possible (I managed to kill a nasty threading one
today).  Please all others do the same, and mark for this milestone
anything you actually want to see done.

* Remember that Trac also suports 'task' tickets, so any important
ToDo items for this release you think of, which don't properly belong
to the code, can be tagged as such and will be tracked properly.

* I've tried to enable automatic notification of tickets via email,
but I'm not sure if I got it right yet, we'll see.

Cheers,

f



From fperez.net at gmail.com  Sun May 14 21:07:16 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Sun, 14 May 2006 19:07:16 -0600
Subject: [IPython-dev] A cool python recipe - maybe useful for ipython
In-Reply-To: <44669541.3050503@bigpond.net.au>
References: <44669541.3050503@bigpond.net.au>
Message-ID: <db6b5ecc0605141807y5a91e70yc3b54d2f22a30bec@mail.gmail.com>

Hi Gary,

[I'm cc-ing ipython-dev in case anyone wants to pick this up and
submit a patch ]

On 5/13/06, Gary Ruben <gruben at bigpond.net.au> wrote:

> I just thought you might like this cookbook recipe. I didn't know such
> things were so simple and I thought ipython might benefit from it.
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409000

It does look nice, unfortunately in its current form it is something
that you must use in all of your classes, and it causes a lot of
overhead (__getattr__ is probably the most often fired method on an
object, so you really don't want it to be any slower than it needs to
be).

It would be a lot more useful if this were something that ipython
could do for you, regardless of whether the underlying object had
implemented it.

If some enterprising soul wants a stab at this, it can be initially
(for testing) done as a custom exception handler, which fires on all
AttributeErrors.  It can then implement this kind of introspection
/after/ the error has fired, without introducing any overhead at
runtime.

Note that doing this isn't totally trivial: you'll have the exception
and the stack, but identifying the offending object is something which
I'm not really sure how to do.

But thanks for the pointer, it's a neat recipe!

Cheers,

f



From vivainio at gmail.com  Mon May 15 02:31:27 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Mon, 15 May 2006 09:31:27 +0300
Subject: [IPython-dev] A cool python recipe - maybe useful for ipython
In-Reply-To: <db6b5ecc0605141807y5a91e70yc3b54d2f22a30bec@mail.gmail.com>
References: <44669541.3050503@bigpond.net.au>
	<db6b5ecc0605141807y5a91e70yc3b54d2f22a30bec@mail.gmail.com>
Message-ID: <46cb515a0605142331k775ea5ele4683bab46720e88@mail.gmail.com>

On 5/15/06, Fernando Perez <fperez.net at gmail.com> wrote:

> It would be a lot more useful if this were something that ipython
> could do for you, regardless of whether the underlying object had
> implemented it.
>
> If some enterprising soul wants a stab at this, it can be initially
> (for testing) done as a custom exception handler, which fires on all
> AttributeErrors.  It can then implement this kind of introspection
> /after/ the error has fired, without introducing any overhead at
> runtime.
>
> Note that doing this isn't totally trivial: you'll have the exception
> and the stack, but identifying the offending object is something which
> I'm not really sure how to do.

Also, w/ ipython it's slightly less useful because of tab completion.
I hardly ever type method names w/o pressing tab, and hence almost
never get AttributeError's in the first place...

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From walter at livinglogic.de  Mon May 15 08:10:07 2006
From: walter at livinglogic.de (=?ISO-8859-1?Q?Walter_D=F6rwald?=)
Date: Mon, 15 May 2006 14:10:07 +0200
Subject: [IPython-dev] A more organized process for release 0.7.2
In-Reply-To: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
References: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
Message-ID: <44686F9F.8090401@livinglogic.de>

Fernando Perez wrote:

> Hi all,
> 
> since now there's a few more of us taking part of this process, I set
> up things in a slightly more organized fashion on Trac so we can
> coordinate things without wasting too much time on back-and-forth
> email.

So do we have a feature freeze until 0.7.2 is released? The reason I'm
asking is that I'd like to move some of the stuff in ipipe into a
separate module (mostly the stuff that deals with colors and styles). I
think this would simplify reusing it in different contexts and it will
probably help with code management for the Google Summer of Code project.

Servus,
   Walter



From vivainio at gmail.com  Mon May 15 08:39:27 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Mon, 15 May 2006 15:39:27 +0300
Subject: [IPython-dev] A more organized process for release 0.7.2
In-Reply-To: <44686F9F.8090401@livinglogic.de>
References: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
	<44686F9F.8090401@livinglogic.de>
Message-ID: <46cb515a0605150539v5ec7da9fpaef375414ebb1e7f@mail.gmail.com>

On 5/15/06, Walter D?rwald <walter at livinglogic.de> wrote:

> So do we have a feature freeze until 0.7.2 is released? The reason I'm
> asking is that I'd like to move some of the stuff in ipipe into a
> separate module (mostly the stuff that deals with colors and styles). I
> think this would simplify reusing it in different contexts and it will
> probably help with code management for the Google Summer of Code project.

Go ahead and do it; 2 weeks is plenty and ipipe, not having an
official release out, is not in widespread use yet.

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From jorgen.stenarson at bostream.nu  Mon May 15 13:22:11 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Mon, 15 May 2006 19:22:11 +0200
Subject: [IPython-dev] Documentation ticket
In-Reply-To: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
References: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
Message-ID: <4468B8C3.1030206@bostream.nu>

hi,

I added a ticket for 0.7.2 and assigned it to Ville. It can be 
considered a cosmetic problem. When printing the usage message it does 
not get converted from UTF-8 used in the file to whatever the terminal 
is using so some garbage characters are generated, at least on windows 
and macosx.

/J?rgen



From vivainio at gmail.com  Mon May 15 15:04:15 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Mon, 15 May 2006 12:04:15 -0700
Subject: [IPython-dev] Documentation ticket
In-Reply-To: <4468B8C3.1030206@bostream.nu>
References: <db6b5ecc0605131507x1c90cf0dw6a2ab00a095756ae@mail.gmail.com>
	<4468B8C3.1030206@bostream.nu>
Message-ID: <46cb515a0605151204j40c0e89ese35378bfbe3d09da@mail.gmail.com>

On 5/15/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:

> I added a ticket for 0.7.2 and assigned it to Ville. It can be
> considered a cosmetic problem. When printing the usage message it does
> not get converted from UTF-8 used in the file to whatever the terminal
> is using so some garbage characters are generated, at least on windows
> and macosx.

I already fixed it. :)

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From fperez.net at gmail.com  Wed May 17 18:01:55 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Wed, 17 May 2006 16:01:55 -0600
Subject: [IPython-dev] Any reason to keep user_ns() as a call?
Message-ID: <db6b5ecc0605171501j3015771fna1cc9be5f755cc88@mail.gmail.com>

Hi,

I'm starting to use the new api stuff, and was wondering about the
reasons behind

    def user_ns(self):
        return self.IP.user_ns

Why not just do

self.user_ns = self.IP.user_ns

in the constructor and access it without the extra function call?  If
we keep the api module explicitly as 'all members of this represent
the public API', we don't need to wrap everything into extra function
calls, which in python have non-negligible cost.

Before I change it, I want to double-check if I'm missing something.

f



From vivainio at gmail.com  Thu May 18 04:58:15 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Thu, 18 May 2006 11:58:15 +0300
Subject: [IPython-dev] Any reason to keep user_ns() as a call?
In-Reply-To: <db6b5ecc0605171501j3015771fna1cc9be5f755cc88@mail.gmail.com>
References: <db6b5ecc0605171501j3015771fna1cc9be5f755cc88@mail.gmail.com>
Message-ID: <46cb515a0605180158u4b92c632ia3dd8772e5926e98@mail.gmail.com>

On 5/18/06, Fernando Perez <fperez.net at gmail.com> wrote:

> I'm starting to use the new api stuff, and was wondering about the
> reasons behind
>
>     def user_ns(self):
>         return self.IP.user_ns
>
> Why not just do
>
> self.user_ns = self.IP.user_ns
>
> in the constructor and access it without the extra function call?  If
> we keep the api module explicitly as 'all members of this represent
> the public API', we don't need to wrap everything into extra function
> calls, which in python have non-negligible cost.
>
> Before I change it, I want to double-check if I'm missing something.

The reasoning is that a function call could theoretically return a
different dictionary at different times. I'm ok with changing it to
represent the dictionary directly, it could be made a property if it
needs to become dynamic. It will require some changes in other parts
of the code, though.

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From jorgen.stenarson at bostream.nu  Thu May 18 17:17:13 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Thu, 18 May 2006 23:17:13 +0200
Subject: [IPython-dev] new threading issue
Message-ID: <446CE459.5010704@bostream.nu>

Fernando,

the fix for threading issue #55 has helped but I still see some random 
threading issues. I'm running ipython -pylab with TkAgg. I have not 
figured out what triggers the error.

I have attached a traceback from the most recent crash.

/J?rgen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: traceback.txt
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20060518/dc30fa94/attachment.txt>

From fperez.net at gmail.com  Thu May 18 17:25:01 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Thu, 18 May 2006 15:25:01 -0600
Subject: [IPython-dev] new threading issue
In-Reply-To: <446CE459.5010704@bostream.nu>
References: <446CE459.5010704@bostream.nu>
Message-ID: <db6b5ecc0605181425p20348999sd95fa5629803b5b5@mail.gmail.com>

On 5/18/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> Fernando,
>
> the fix for threading issue #55 has helped but I still see some random
> threading issues. I'm running ipython -pylab with TkAgg. I have not
> figured out what triggers the error.

Uh?  With TkAgg, there is NO threading code active at all. Double
check with backend you are using; threading is ONLY active with the
Qt, WX and GTK backends.

Also let me know on what platform this is happening...

f



From jorgen.stenarson at bostream.nu  Thu May 18 18:12:49 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Fri, 19 May 2006 00:12:49 +0200
Subject: [IPython-dev] new threading issue
In-Reply-To: <db6b5ecc0605181425p20348999sd95fa5629803b5b5@mail.gmail.com>
References: <446CE459.5010704@bostream.nu>
	<db6b5ecc0605181425p20348999sd95fa5629803b5b5@mail.gmail.com>
Message-ID: <446CF161.3000409@bostream.nu>

Fernando Perez skrev:
> On 5/18/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
>> Fernando,
>>
>> the fix for threading issue #55 has helped but I still see some random
>> threading issues. I'm running ipython -pylab with TkAgg. I have not
>> figured out what triggers the error.
> 
> Uh?  With TkAgg, there is NO threading code active at all. Double
> check with backend you are using; threading is ONLY active with the
> Qt, WX and GTK backends.
> 
> Also let me know on what platform this is happening...
> 
> f
> 

I'll double check tomorrow, but looking at the traceback there seems to 
be some tk thing going on.

     763             def OnTimer(self, event):
     764                 update_tk(self.tk)
                                ^^      ^^

This was on windows and I had not issued any plotting commands at all.

/J?rgen



From fperez.net at gmail.com  Thu May 18 18:52:44 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Thu, 18 May 2006 16:52:44 -0600
Subject: [IPython-dev] new threading issue
In-Reply-To: <446CF161.3000409@bostream.nu>
References: <446CE459.5010704@bostream.nu>
	<db6b5ecc0605181425p20348999sd95fa5629803b5b5@mail.gmail.com>
	<446CF161.3000409@bostream.nu>
Message-ID: <db6b5ecc0605181552y4cb51b70ubf574c274ce43dfa@mail.gmail.com>

On 5/18/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:

> I'll double check tomorrow, but looking at the traceback there seems to
> be some tk thing going on.
>
>      763             def OnTimer(self, event):
>      764                 update_tk(self.tk)
>                                 ^^      ^^

And if you look at the code, that's inside the IPShellWX class, so you
must have been running inside of pylab with a WX* backend.

Note that I'm not disputing the presence of a threading bug, and in
fact I think I may know what's going on.  I'm just saying that it's
/impossible/ for this kind of bug to appear with Tk, because we don't
do any threading whatsoever with Tk backends.

Cheers,

f



From fperez.net at gmail.com  Fri May 19 02:47:07 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Fri, 19 May 2006 00:47:07 -0600
Subject: [IPython-dev] Files with windows end-of-line markers.
Message-ID: <db6b5ecc0605182347x5b5663d6sab6f983006e63c88@mail.gmail.com>

Hi folks,

these files:
    win32clip.py
    ipy_sane_defaults.py
    ext_rehashdir.py

all have windows line endings.

I'm going to fix them, but please in the future, do not commit files
with win32 line  endings.

I'm also going to rename     ipy_sane_defaults.py  to simply
ipy_defaults.py.  The name seems to imply "we have stupid defaults
elsewhere, these  are the good ones".  The ipythonrc file had
perfectly 'sane' defaults; it's nice to expose them with a different
mechanism, but that language is completely unnecessary.

Cheers,

f



From vivainio at gmail.com  Fri May 19 06:15:43 2006
From: vivainio at gmail.com (Ville Vainio)
Date: Fri, 19 May 2006 13:15:43 +0300
Subject: [IPython-dev] Files with windows end-of-line markers.
In-Reply-To: <db6b5ecc0605182347x5b5663d6sab6f983006e63c88@mail.gmail.com>
References: <db6b5ecc0605182347x5b5663d6sab6f983006e63c88@mail.gmail.com>
Message-ID: <46cb515a0605190315g104f0bf6vfbc9a985a885d9b4@mail.gmail.com>

On 5/19/06, Fernando Perez <fperez.net at gmail.com> wrote:

> these files:
>     win32clip.py
>     ipy_sane_defaults.py
>     ext_rehashdir.py
>
> all have windows line endings.
>
> I'm going to fix them, but please in the future, do not commit files
> with win32 line  endings.

I thought Subversion should handle them automatically; oh well. I
guess the problem in the files are mixed end-of-line characters.

> I'm also going to rename     ipy_sane_defaults.py  to simply
> ipy_defaults.py.  The name seems to imply "we have stupid defaults
> elsewhere, these  are the good ones".  The ipythonrc file had
> perfectly 'sane' defaults; it's nice to expose them with a different
> mechanism, but that language is completely unnecessary.

The idea is that the defaults are exactly the same as in ipythonrc,
i.e. "reasonable" == "sane". ipy_defaults is ok as a name as well, I
guess.

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'



From jorgen.stenarson at bostream.nu  Fri May 19 13:09:54 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Fri, 19 May 2006 19:09:54 +0200
Subject: [IPython-dev] new threading issue
In-Reply-To: <db6b5ecc0605181552y4cb51b70ubf574c274ce43dfa@mail.gmail.com>
References: <446CE459.5010704@bostream.nu>
	<db6b5ecc0605181425p20348999sd95fa5629803b5b5@mail.gmail.com>
	<446CF161.3000409@bostream.nu>
	<db6b5ecc0605181552y4cb51b70ubf574c274ce43dfa@mail.gmail.com>
Message-ID: <446DFBE2.5090308@bostream.nu>

Fernando Perez skrev:
> On 5/18/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> 
>> I'll double check tomorrow, but looking at the traceback there seems to
>> be some tk thing going on.
>>
>>      763             def OnTimer(self, event):
>>      764                 update_tk(self.tk)
>>                                 ^^      ^^
> 
> And if you look at the code, that's inside the IPShellWX class, so you
> must have been running inside of pylab with a WX* backend.
> 
> Note that I'm not disputing the presence of a threading bug, and in
> fact I think I may know what's going on.  I'm just saying that it's
> /impossible/ for this kind of bug to appear with Tk, because we don't
> do any threading whatsoever with Tk backends.
> 
> Cheers,
> 
> f
> 
I checked my work computer today and you are of course right I had WXAgg 
  in my config file. I usually use Tk so this in combination with the 
traceback made me jump to conclusions. Anyway is there any more 
information I can gather the next time I have a crash that can help 
narrow down the problem?

/J?rgen



From fperez.net at gmail.com  Fri May 19 13:50:10 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Fri, 19 May 2006 11:50:10 -0600
Subject: [IPython-dev] new threading issue
In-Reply-To: <446CE459.5010704@bostream.nu>
References: <446CE459.5010704@bostream.nu>
Message-ID: <db6b5ecc0605191050h35b42ed5rf74e9bf95016298d@mail.gmail.com>

On 5/18/06, J?rgen Stenarson <jorgen.stenarson at bostream.nu> wrote:
> Fernando,
>
> the fix for threading issue #55 has helped but I still see some random
> threading issues. I'm running ipython -pylab with TkAgg. I have not
> figured out what triggers the error.
>
> I have attached a traceback from the most recent crash.
[...]
> c:\python24\Lib\site-packages\IPython\Shell.py in runcode(self)
>     362             except Queue.Empty:
>     363                 break
> --> 364             self.thread_ready.notify()
>     365             InteractiveShell.runcode(self,code_to_run)
>     366

I think I just fixed it in SVN:

Committed revision 1313.

Let me know how it goes...

As far as more info, what you sent was useful: those threading bugs
are an absolute bear to track down, and I'm really not very proficient
in threads programming.  So I kind of stumble around in the dark until
something looks like it works...

Cheers,

f



From fperez.net at gmail.com  Fri May 19 14:31:52 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Fri, 19 May 2006 12:31:52 -0600
Subject: [IPython-dev] Any reason to keep user_ns() as a call?
In-Reply-To: <46cb515a0605180158u4b92c632ia3dd8772e5926e98@mail.gmail.com>
References: <db6b5ecc0605171501j3015771fna1cc9be5f755cc88@mail.gmail.com>
	<46cb515a0605180158u4b92c632ia3dd8772e5926e98@mail.gmail.com>
Message-ID: <db6b5ecc0605191131u6fb8096bj42000442b51462ae@mail.gmail.com>

On 5/18/06, Ville Vainio <vivainio at gmail.com> wrote:

> The reasoning is that a function call could theoretically return a
> different dictionary at different times. I'm ok with changing it to
> represent the dictionary directly, it could be made a property if it
> needs to become dynamic. It will require some changes in other parts
> of the code, though.

OK, I just committed some changes which cleaned up the api to use
either explicit attributes or properties, but with a homogeneous
attribute syntax.  Properties are a really nice python feature, I
really dislike classes full of getters and setters, which remind me
way too much of C++/Java code.  I still had to use properties in a few
places b/c I couldn't disentangle our initialization order hairball,
but all tests I did seem OK.

I think the code is cleaner, and in the new branch I'll do my best to
respect this new API approach, whenever possible.  As things get
complicated, we can wrap things behind properties but users will not
need to worry about syntax changes.

One thing I did /not/ do, but I'm wondering about, is making all the
getters (used by the properties internally) _private, so that anyone
poking around with a TAB key has a better clue of what they shouldn't
be doing.  Feel free to finish it off, I need to turn my attention to
other things now.

It's quite possible I didn't spot some problems still after all my
changes, so please play with this: I'd like this API to remain fairly
stable from 0.7.2 onwards in the trunk (and even in chainsaw, as I
mentioned).

Cheers,

f



From fperez.net at gmail.com  Fri May 19 15:05:24 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Fri, 19 May 2006 13:05:24 -0600
Subject: [IPython-dev] [IPython-user] KeyboardInterrupt - Press <Enter>
	to continue in	Shell.py rev 1297
In-Reply-To: <446E15D3.50601@mspacek.mm.st>
References: <446AC7DE.1090608@mspacek.mm.st>
	<db6b5ecc0605162359r663b1a46ua4c4a7e83ad20859@mail.gmail.com>
	<446ACEA6.30307@mspacek.mm.st>
	<db6b5ecc0605191139m82a8290g6aa9fa4b5bbcbb67@mail.gmail.com>
	<446E15D3.50601@mspacek.mm.st>
Message-ID: <db6b5ecc0605191205j1b31ac96q2e60743dc9740eb7@mail.gmail.com>

I'm resending this to the dev list: I'm not the only one working on
ipython anymore, so it's important that you keep the list in the
messages.  There's a chance another one of the developers might know
the answer to this particular problem...

I don't see it under linux, and right now my VMware installation is
hosed so I can't test win32 at the moment.

Cheers,

f

On 5/19/06, Martin Spacek <ipython at mspacek.mm.st> wrote:
> I'm running 0.7.2.rc1 plus the latest Shell.py rev 1313 from SVN. Here's
> the command my shortcut runs:
>
> C:\bin\Python24\python.exe C:\bin\Python24\scripts\ipython -pylab -p sh
>
> Here's the text on startup, along with the extra space before the prompt
> after a Ctrl-C:
>
> Using the new pyreadline (thanks for participating in the testing!)
> loaded rc file C:\home\mspacek\.matplotlib\matplotlibrc
> matplotlib version 0.87.2
> verbose.level helpful
> interactive is False
> platform is win32
> numerix numpy 0.9.6
> font search path
> ['C:\\bin\\Python24\\lib\\site-packages\\matplotlib\\mpl-data']
> $HOME=C:\home\mspacek
> CONFIGDIR=C:\home\mspacek\.matplotlib
> loaded ttfcache file C:\home\mspacek\.matplotlib\ttffont.cache
> matplotlib data path C:\bin\Python24\lib\site-packages\matplotlib\mpl-data
> backend WXAgg version 2.6.3.2
> Activating auto-logging. Current session state plus future input saved.
> Filename       : C:\home\mspacek\_ipython\ipython.log
> Mode           : append
> Output logging : False
> Timestamping   : True
> State          : active
> Py 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] IPy
> 0.7.2.rc1
> [Desktop]|1>
> KeyboardInterrupt - Press <Enter> to continue.
>   [Desktop]|1>
> [Desktop]|1>
>
> > I don't see that on my system, sorry:
> >
> > In [1]: for
> > KeyboardInterrupt - Press <Enter> to continue.
> >
> > In [2]: this is a syntax error
> > KeyboardInterrupt - Press <Enter> to continue.
> >
> > In [3]:
> > Do you really want to exit ([y]/n)?
> > Closing threads... Done.
> >
> > What version of ipython are you running?  We're close to the 0.7.2
> > release, which has a fair amount of cleanup, so this may go away then.
> >
> > Cheers,
> >
> > f
>



From Fernando.Perez at colorado.edu  Wed May 24 01:47:25 2006
From: Fernando.Perez at colorado.edu (Fernando Perez)
Date: Tue, 23 May 2006 23:47:25 -0600
Subject: [IPython-dev] [Fwd: IPython Crash Report]
Message-ID: <4473F36D.2090909@colorado.edu>

Hi folks,

here's a crash report related to the readline component, which some of you 
know a lot better than I do.

Cheers,

f

-------- Original Message --------
Subject: IPython Crash Report
Date: Thu, 27 Apr 2006 17:27:15 -0700
From: Martin Spacek <mspacek at mm.st>
To: fperez at colorado.edu

Here it is. I think all I did was hit Ctrl-C to escape to a new line,
maybe I mistakenly hit something else.

Cheers,

-- 
Martin Spacek
PhD student, Graduate Program in Neuroscience
Dept. of Ophthalmology and Visual Sciences
University of British Columbia, Vancouver, BC, Canada
+1-604-875-4555 ext. 66282
mspacek at mm.st | http://swindale.ecc.ubc.ca

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: IPython_crash_report.txt
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20060523/3140cdd8/attachment.txt>

From jorgen.stenarson at bostream.nu  Wed May 24 13:36:36 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Wed, 24 May 2006 19:36:36 +0200
Subject: [IPython-dev] [Fwd: IPython Crash Report]
In-Reply-To: <4473F36D.2090909@colorado.edu>
References: <4473F36D.2090909@colorado.edu>
Message-ID: <447499A4.6000100@bostream.nu>

Hi Martin,

I'm not able to reproduce a crash like this when hitting ctrl-c but 
perhaps I'm not running ipython the same way you did. The only thing I 
see is that KeyboardInterupt is printed and I get a new prompt. Is there 
anything else you could say about your configuration, the provided 
traceback doesn't give much to go on.

probably unrelated to your problem:
I have had some problems with ctrl-c when using the eggsetup.py version 
and launching using the ipyhon.exe file in python/scripts. It is however 
not a problem with a traceback. But the problem is that python.exe is 
launched by ipython.exe and when you press ctrl-c ipython.exe gets the 
interrupt and exits but python.exe is still running which leads to some 
really strange behaviour where the ordinary commandprompt is printed 
every other line and the python prompt is printed on the other lines.



/J?rgen

Fernando Perez skrev:
> Hi folks,
> 
> here's a crash report related to the readline component, which some of 
> you know a lot better than I do.
> 
> Cheers,
> 
> f
> 
> -------- Original Message --------
> Subject: IPython Crash Report
> Date: Thu, 27 Apr 2006 17:27:15 -0700
> From: Martin Spacek <mspacek at mm.st>
> To: fperez at colorado.edu
> 
> Here it is. I think all I did was hit Ctrl-C to escape to a new line,
> maybe I mistakenly hit something else.
> 
> Cheers,
> 
> 
> ------------------------------------------------------------------------
> 
> ***************************************************************************
> 
> IPython post-mortem report
> 
> IPython version: 0.7.1.fix1 
> 
> SVN revision   : $Revision: 1112 $ 
> 
> Platform info  : os.name -> nt, sys.platform -> win32
> 
> ***************************************************************************
> 
> Current user configuration structure:
> 
> {'Version': 0,
>  'alias': [],
>  'args': [],
>  'autocall': 1,
>  'autoedit_syntax': 1,
>  'autoindent': 1,
>  'automagic': 1,
>  'banner': 1,
>  'c': '',
>  'cache_size': 1000,
>  'classic': 0,
>  'color_info': 1,
>  'colors': 'Linux',
>  'confirm_exit': 0,
>  'debug': 0,
>  'deep_reload': 0,
>  'editor': 'c:\\bin\\textpad\\textpad.exe',
>  'embedded': False,
>  'execfile': [],
>  'execute': ['ipmagic(r"%logstart -t \'~\\_ipython\\ipython.log\' append")'],
>  'gthread': 0,
>  'help': 0,
>  'ignore': 0,
>  'import_all': ['IPython.Extensions.InterpreterExec'],
>  'import_mod': [],
>  'import_some': [[]],
>  'include': ['ipythonrc'],
>  'ipythondir': 'C:\\home\\mspacek\\_ipython',
>  'log': 0,
>  'logfile': '',
>  'logplay': '',
>  'magic_docstrings': 0,
>  'messages': 1,
>  'multi_line_specials': 1,
>  'nosep': 0,
>  'opts': Struct({'profile': 'pysh', 'logfile': 'C:\\home\\mspacek\\_ipython\\ipython.log'}),
>  'pdb': 0,
>  'pprint': 1,
>  'profile': 'pysh',
>  'prompt_in1': '\\C_LightGreen\\u@\\h\\C_LightBlue[\\C_LightCyan\\Y1\\C_LightBlue]\\C_Green|\\#> ',
>  'prompt_in2': '\\C_Green|\\C_LightGreen\\D\\C_Green> ',
>  'prompt_out': '<\\#> ',
>  'prompts_pad_left': 1,
>  'pylab': 0,
>  'qthread': 0,
>  'quick': 0,
>  'rcfile': 'ipythonrc.ini',
>  'readline': 1,
>  'readline_merge_completions': 1,
>  'readline_omit__names': 0,
>  'readline_parse_and_bind': ['tab: complete',
>                              '"\\C-l": possible-completions',
>                              'set show-all-if-ambiguous on',
>                              '"\\C-o": tab-insert',
>                              '"\\M-i": "    "',
>                              '"\\M-o": "\\d\\d\\d\\d"',
>                              '"\\M-I": "\\d\\d\\d\\d"',
>                              '"\\C-r": reverse-search-history',
>                              '"\\C-s": forward-search-history',
>                              '"\\C-p": history-search-backward',
>                              '"\\C-n": history-search-forward',
>                              '"\\e[A": history-search-backward',
>                              '"\\e[B": history-search-forward',
>                              '"\\C-k": kill-line',
>                              '"\\C-u": unix-line-discard'],
>  'readline_remove_delims': '-/~',
>  'screen_length': -1,
>  'separate_in': '',
>  'separate_out': '',
>  'separate_out2': '',
>  'system_verbose': 0,
>  'tk': 0,
>  'upgrade': 0,
>  'wildcards_case_sensitive': 1,
>  'wthread': 0,
>  'wxversion': '0',
>  'xmode': 'Context'}
> 
> ***************************************************************************
> 
> Crash traceback:
> 
> ---------------------------------------------------------------------------
> exceptions.KeyboardInterrupt                  Python 2.4.3: C:\bin\Python24\python.exe
>                                                    Thu Apr 27 17:23:12 2006
> A problem occured executing Python code.  Here is the sequence of function
> calls leading up to the error, with the most recent (innermost) call last.
> 
> C:\home\mspacek\Desktop\source\callbacks.c in 'calling callback function'()
>     185 
>     186 
>     187 
>     188 
>     189 
>     190 
>     191 
>     192 
>     193 
>     194 
>     195 
>     196 
>     197 
>     198 
>     199 
> --> 200 
>     201 
>     202 
>     203 
>     204 
>     205 
>     206 
>     207 
>     208 
>     209 
>     210 
>     211 
>     212 
>     213 
>     214 
>     215 
> 
> C:\bin\Python24\Lib\site-packages\readline\Console.py in hook_wrapper_23(stdin=2084091112, stdout=2084091144, prompt='\x01\x1b[0;32m\x02\x01\x1b[1;32m\x02 at Godel\x01\x1b[1;34m\x02[\x01\x1b[1;36m\x02Desktop\x01\x1b[1;34m\x02]\x01\x1b[0;32m\x02|\x01\x1b[1;32m\x0236\x01\x1b[0;32m\x02> \x01\x1b[0m\x02')
>     626 
>     627 # I use ctypes to create a C-callable from a Python wrapper that
>     628 # handles the exceptions and gets the result into the right form.
>     629 
>     630 # the type for our C-callable wrapper
>     631 HOOKFUNC22 = CFUNCTYPE(c_char_p, c_char_p)
>     632 HOOKFUNC23 = CFUNCTYPE(c_char_p, c_void_p, c_void_p, c_char_p)
>     633 
>     634 readline_hook = None # the python hook goes here
>     635 readline_ref = None  # this holds a reference to the c-callable to keep it alive
>     636 
>     637 def hook_wrapper_23(stdin, stdout, prompt):
>     638   '''Wrap a Python readline so it behaves like GNU readline.'''
>     639   try:
>     640     # call the Python hook
> --> 641     res = readline_hook(prompt)
>         res = undefined
>         global readline_hook = <bound method Readline.readline of <readline.PyReadline.Readline instance at 0x00C05710>>
>         prompt = '\x01\x1b[0;32m\x02\x01\x1b[1;32m\x02 at Godel\x01\x1b[1;34m\x02[\x01\x1b[1;36m\x02Desktop\x01\x1b[1;34m\x02]\x01\x1b[0;32m\x02|\x01\x1b[1;32m\x0236\x01\x1b[0;32m\x02> \x01\x1b[0m\x02'
>     642     # make sure it returned the right sort of thing
>     643     if res and not isinstance(res, str):
>     644       raise TypeError, 'readline must return a string.'
>     645   except KeyboardInterrupt:
>     646     # GNU readline returns 0 on keyboard interrupt
>     647     return 0
>     648   except EOFError:
>     649     # It returns an empty string on EOF
>     650     res = ''
>     651   except:
>     652     print >>sys.stderr, 'Readline internal error'
>     653     traceback.print_exc()
>     654     res = '\n'
>     655   # we have to make a copy because the caller expects to free the result
>     656   n = len(res)
> 
> KeyboardInterrupt: 
> 
> ***************************************************************************
> 
> History of session input:
> a[5] = 'hello'
> a = []
> a[5] = 'hello'
> a[0] = 'hello'
> a
> print a
> a={}
> a['92']='92 - track7c blah blah'
> a
> a[92]='92 - track7c blah blah'
> a
> a[b]='sdfsdf'
> a[56]='sdfsdf'
> a
> a['a']='sdfsdfsdfsdfsdfs'
> a
> a
> #? del
> man del
> del(a,'92')
> a.del('92')
> a
> del(a,56)
> del(a[56])
> a
> '1234' + None
> Data
> '123'.find(1)
> '123'.find('1')
> '123'.find('3')
> '1233333'.find('3')
> #?'1233333'.find
> #?find
> #?find()
> dir(find())
> 
> *** Last line of input (may not be in above history):
> dir(find())
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.net
> http://scipy.net/mailman/listinfo/ipython-dev



From jorgen.stenarson at bostream.nu  Wed May 24 14:42:18 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Wed, 24 May 2006 20:42:18 +0200
Subject: [IPython-dev] [Fwd: IPython Crash Report]
In-Reply-To: <44749EAD.3050005@mspacek.mm.st>
References: <4473F36D.2090909@colorado.edu> <447499A4.6000100@bostream.nu>
	<44749EAD.3050005@mspacek.mm.st>
Message-ID: <4474A90A.5050402@bostream.nu>

ok, then I guess we will have to leave this for now. Keep the reports 
coming.

/J?rgen

Martin Spacek skrev:
> Jorgen,
> 
> Sorry, I can't reproduce it either. I don't remember much about my 
> configuration back then. I think I was running without the -pylab 
> switch. It only happened once, and since it generated a report, I 
> thought I should submit it.
> 
> Cheers,
> 
> Martin
> 
> J?rgen Stenarson wrote:
>> Hi Martin,
>>
>> I'm not able to reproduce a crash like this when hitting ctrl-c but 
>> perhaps I'm not running ipython the same way you did. The only thing I 
>> see is that KeyboardInterupt is printed and I get a new prompt. Is 
>> there anything else you could say about your configuration, the 
>> provided traceback doesn't give much to go on.
>>
>> probably unrelated to your problem:
>> I have had some problems with ctrl-c when using the eggsetup.py 
>> version and launching using the ipyhon.exe file in python/scripts. It 
>> is however not a problem with a traceback. But the problem is that 
>> python.exe is launched by ipython.exe and when you press ctrl-c 
>> ipython.exe gets the interrupt and exits but python.exe is still 
>> running which leads to some really strange behaviour where the 
>> ordinary commandprompt is printed every other line and the python 
>> prompt is printed on the other lines.
>>
>>
> 
> 



From fperez.net at gmail.com  Tue May 30 02:32:17 2006
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 30 May 2006 00:32:17 -0600
Subject: [IPython-dev] Closing in on 0.7.2?
Message-ID: <db6b5ecc0605292332h561ce545r53c8ba04697f5a61@mail.gmail.com>

Hi all,

according to:

http://projects.scipy.org/ipython/ipython/milestone/0.7.2

we're two tickets away from 0.7.2.  In the meantime, I've flushed
absolutely everything I had related to ipython on private email (I get
a fair amount of stuff off-list) and in the SAGE list (SAGE is a heavy
duty ipython user, so they tend to find lots of little --and not so
little-- nits).

If anyone has anything that's truly a blocker, plase say so soon.
Otherwise, we're more or less done.

One thing: what's the pyreadline status?  Are we good to release that?
 Are all messages gone?  Once it's ready, I don't want lingering
messages printed on the user's system, so we should clean those up.
I'd also like to know exactly what to put in the manual concerning the
windows install instructions before release, which still mention the
old UNC readline.

I made a ticket to this effect, so that we don't forget:

http://projects.scipy.org/ipython/ipython/ticket/65


Once we close these two tickets, we should be good to release, and
I've also flushed enough things that were only known to me, that Ville
can really now continue handling all public ipython issues as I work
on chainsaw.  I hacked quite a bit on the ipapi module in an attempt
to leave it in a state which I can remain compatible with in chainsaw,
so we may be able to use the ipapi objects as a safe transition path
from 0.7.X to 1.0.

Cheers,

f



From jorgen.stenarson at bostream.nu  Wed May 31 15:28:43 2006
From: jorgen.stenarson at bostream.nu (=?ISO-8859-1?Q?J=F6rgen_Stenarson?=)
Date: Wed, 31 May 2006 21:28:43 +0200
Subject: [IPython-dev] pyreadline release
Message-ID: <447DEE6B.9050106@bostream.nu>

Hi,

I think pyreadline is ready for release. Ville has removed all messages 
from ipython about pyreadline. I have added some documentation on the 
wiki page about binary installation (this could be included in the 
ipython manual as well). However I have onlay addded a placeholder for 
the download URL. I will send fernando a copy of the binary installer 
and when that is uploaded I can change the URL placeholder to the 
correct address.

/J?rgen