isympy in newest ipython

16 views
Skip to first unread message

Ondrej Certik

unread,
Jun 13, 2011, 2:31:23 AM6/13/11
to ipython user list, sympy
Hi,

when I try to import "isympy" in the newest ipython (installed in
Qsnake from qsnake.com), I get:

Qsnake: ondrej@eagle:~/repos/sympy(cg_coeff)$ bin/isympy
Traceback (most recent call last):
File "bin/isympy", line 180, in <module>
main()
File "bin/isympy", line 177, in main
init_session(ipython, **args)
File "sympy/interactive/session.py", line 122, in init_session
ip = IPython.ipapi.get()
AttributeError: 'module' object has no attribute 'ipapi'


What is the best way that we should fix this? I would add some
conditional imports into sympy, but I wanted to ask, what the final
import line will be once ipython gets released.

Thanks,
Ondrej

Aaron S. Meurer

unread,
Jun 13, 2011, 2:54:12 AM6/13/11
to sy...@googlegroups.com, ipython user list
There's a sample script at http://code.google.com/p/sympy/issues/detail?id=1797. I don't know if it's still relevant.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>

Brian Granger

unread,
Jun 13, 2011, 4:44:29 PM6/13/11
to Min RK, Ondrej Certik, ipython user list, sympy
But they probably want to start this at the application level right?
So the config gets parsed. Ondrej, we should figure this out before
sympy0.7 is released so that isympy works with the soon-to-be-released
IPython 0.11.

On Mon, Jun 13, 2011 at 12:19 AM, Min RK <benja...@gmail.com> wrote:
> I believe it should be:
>
> from IPython.core.interactiveshell import InteractiveShell
>
> ip = InteractiveShell.instance()
>
> -MinRK

>> _______________________________________________
>> IPython-User mailing list
>> IPytho...@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
> _______________________________________________
> IPython-User mailing list
> IPytho...@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>

--
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgra...@calpoly.edu and elli...@gmail.com

Ondrej Certik

unread,
Jun 13, 2011, 4:49:04 PM6/13/11
to sy...@googlegroups.com, ipython user list
On Mon, Jun 13, 2011 at 1:44 PM, Brian Granger <elli...@gmail.com> wrote:
> But they probably want to start this at the application level right?
> So the config gets parsed.  Ondrej, we should figure this out before
> sympy0.7 is released so that isympy works with the soon-to-be-released
> IPython 0.11.

That's right, we should definitely figure this out before sympy 0.7.0.
As I see it, we will try to import the old ipython, and if it fails,
then some preferred way in the new ipython. I will play with this in
the evening and provide some options that work, and you can then tell
me, if it is going to be supported in the IPython 0.11.

Ondrej

Ondrej Certik

unread,
Jun 13, 2011, 4:51:40 PM6/13/11
to sy...@googlegroups.com

Brian Granger

unread,
Jun 13, 2011, 8:12:59 PM6/13/11
to sy...@googlegroups.com, ipython user list
Ondrej,

On Mon, Jun 13, 2011 at 1:49 PM, Ondrej Certik <ond...@certik.cz> wrote:

Do you want things like command line flags and config file parsing to
work? If so (I imagine you do) I would look at subclassing the main
IPython application. BUT, this part of the 0.11 is still ongoing and
has not been merged into master yet, so it could be difficult to rely
on it *today*. But, we do plan on releasing before SciPy in July and
that part of the code should be stable soon. This may be an issue if
you are trying to release in the next few days.

Brian

> Ondrej
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>
>

--

Brian Granger

unread,
Jun 13, 2011, 8:45:46 PM6/13/11
to sy...@googlegroups.com, ipython user list
Ondrej,

One other thing that probably should be changed is that currently the
sympy test suite requires IPython and I think the APIs it relies on
have changed in significant ways. It would be nice to decouple the
test suite from IPython.

Cheers,

Brian

Vladimir Perić

unread,
Jun 14, 2011, 2:26:57 AM6/14/11
to sy...@googlegroups.com
On Tue, Jun 14, 2011 at 2:45 AM, Brian Granger <elli...@gmail.com> wrote:
Ondrej,

One other thing that probably should be changed is that currently the
sympy test suite requires IPython and I think the APIs it relies on
have changed in significant ways.  It would be nice to decouple the
test suite from IPython.

I don't have IPython installed and the SymPy tests run just fine.
 



--
Vladimir Perić

Brian Granger

unread,
Jun 14, 2011, 2:26:13 PM6/14/11
to sy...@googlegroups.com
OK, then the issue is having the wrong version of IPython installed.
But, the test suite should be independent of IPython (even the wrong
version).

Cheers,

Brian

Vladimir Perić

unread,
Jun 14, 2011, 2:32:36 PM6/14/11
to sy...@googlegroups.com
On Tue, Jun 14, 2011 at 8:26 PM, Brian Granger <elli...@gmail.com> wrote:
OK, then the issue is having the wrong version of IPython installed.
But, the test suite should be independent of IPython (even the wrong
version).

Cheers,

Brian

I agree, could you write the version you have and I'll check it out (or better yet, open an issue). The exact errors would be useful too. Thanks.
 



--
Vladimir Perić

Ondrej Certik

unread,
Jun 14, 2011, 4:34:49 PM6/14/11
to sy...@googlegroups.com
On Tue, Jun 14, 2011 at 11:32 AM, Vladimir Perić <vlada...@gmail.com> wrote:
> On Tue, Jun 14, 2011 at 8:26 PM, Brian Granger <elli...@gmail.com> wrote:
>>
>> OK, then the issue is having the wrong version of IPython installed.
>> But, the test suite should be independent of IPython (even the wrong
>> version).
>>
>> Cheers,
>>
>> Brian
>
> I agree, could you write the version you have and I'll check it out (or
> better yet, open an issue). The exact errors would be useful too. Thanks.

Thanks for looking into it Vlad. Yep, it should definitely be
independent of ipython. The dependency probably got in by an accident.

Ondrej

Reply all
Reply to author
Forward
0 new messages