ipython

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ipython

fadk
Hi,
Is is possible to use ipython shell with python.net ? please let me know how to do so ?

Thanks for your help.

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: ipython

Michael Foord-5
Kapil fadnis wrote:
> Hi,
> Is is possible to use ipython shell with python.net
> <http://python.net> ? please let me know how to do so ?
>
Have you tried it? What happens?

Michael

> Thanks for your help.
> ------------------------------------------------------------------------
>
> _________________________________________________
> Python.NET mailing list - [hidden email]
> http://mail.python.org/mailman/listinfo/pythondotnet


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: ipython

fadk
I dont know how to ? I run the Python.net console from the Python.net directory and it invokes the Python.exe console which calls the regular python mode. Is there a another way to run Python.net?
Thanks for the quick response.

On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord <[hidden email]> wrote:
Kapil fadnis wrote:
Hi,
Is is possible to use ipython shell with python.net <http://python.net> ? please let me know how to do so ?

Have you tried it? What happens?

Michael

Thanks for your help.
------------------------------------------------------------------------

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog




_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: ipython

Tribble, Brett

In theory it should work, but I haven’t tried it myself. It certainly works from the interactive Python “shell” in Maya. Copy clr.pyd and python.runtime.dll into a directory that is part of IPython’s %pythonpath% and also part of the system path %path%. Load the clr with the “import clr” statement, and you should be good to go. I have noticed that when invoked this way, Maya’s native version of Python “forgets” how to load subsequent .pyd modules. It appears that the clr intercepts these import statements and fails to handle them correctly. I have resolved this by simply loading all .pyd modules I think I’ll need before loading the clr.

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:pythondotnet-bounces+btribble=[hidden email]] On Behalf Of Kapil fadnis
Sent: Monday, April 13, 2009 10:05 AM
To: Michael Foord
Cc: [hidden email]
Subject: Re: [Python.NET] ipython

 

I dont know how to ? I run the Python.net console from the Python.net directory and it invokes the Python.exe console which calls the regular python mode. Is there a another way to run Python.net?

Thanks for the quick response.

On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord <[hidden email]> wrote:

Kapil fadnis wrote:

Hi,
Is is possible to use ipython shell with python.net <http://python.net> ? please let me know how to do so ?

Have you tried it? What happens?

Michael

Thanks for your help.
------------------------------------------------------------------------

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet



--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

 


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: ipython

fadk
Thanks Brett. Yes, it works. The way I did it and Michael Foord pointed me to it, is to start python and then run
 
import IPython
IPython.Shell.IPShell().mainloop(sys_exit=1)
or create a bat file with this cmd
 
@"YOUR PYTHONNET DIR\python.exe" "C:\Python25\scripts\ipython.py" %*
 

 
On Mon, Apr 13, 2009 at 1:41 PM, Tribble, Brett <[hidden email]> wrote:

In theory it should work, but I haven’t tried it myself. It certainly works from the interactive Python “shell” in Maya. Copy clr.pyd and python.runtime.dll into a directory that is part of IPython’s %pythonpath% and also part of the system path %path%. Load the clr with the “import clr” statement, and you should be good to go. I have noticed that when invoked this way, Maya’s native version of Python “forgets” how to load subsequent .pyd modules. It appears that the clr intercepts these import statements and fails to handle them correctly. I have resolved this by simply loading all .pyd modules I think I’ll need before loading the clr.

 

From: pythondotnet-bounces+btribble=maxis.com@python.org [mailto:[hidden email]=maxis.com@python.org] On Behalf Of Kapil fadnis
Sent: Monday, April 13, 2009 10:05 AM
To: Michael Foord
Cc: [hidden email]
Subject: Re: [Python.NET] ipython

 

I dont know how to ? I run the Python.net console from the Python.net directory and it invokes the Python.exe console which calls the regular python mode. Is there a another way to run Python.net?

Thanks for the quick response.

On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord <[hidden email]> wrote:

Kapil fadnis wrote:

Hi,
Is is possible to use ipython shell with python.net <http://python.net> ? please let me know how to do so ?

Have you tried it? What happens?

Michael

Thanks for your help.
------------------------------------------------------------------------

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet



--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

 



_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet