Noah Gift | 1 Mar 17:43
Picon
Gravatar

ipython on solaris 10

Anyone else using ipython on Solaris 10?  Readline is a problem on the  
system python for Solaris too.  It seems like it would be awesome to  
figure out a way for ipython to automatically grab a readline egg if  
the platform doesn't support it.  I happen to need to use IPython on  
AIX, Solaris, HP-UX, Red Hat, OS X, Ubuntu, FreeBSD, and NetBSD, for  
better or worse :)

This might be trivial to figure out at PyCon for those that are  
attending as didn't Ludwig do all the hard work?

Noah Gift / http://noahgift.com
Ville M. Vainio | 1 Mar 17:51
Picon
Gravatar

Re: ipython on solaris 10

On Sat, Mar 1, 2008 at 6:43 PM, Noah Gift <noah.gift <at> gmail.com> wrote:

>  system python for Solaris too.  It seems like it would be awesome to
>  figure out a way for ipython to automatically grab a readline egg if
>  the platform doesn't support it.  I happen to need to use IPython on
>  AIX, Solaris, HP-UX, Red Hat, OS X, Ubuntu, FreeBSD, and NetBSD, for
>  better or worse :)

This should be quite easy to do. We could also get pyreadline for
windows as well.

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
skip | 1 Mar 18:02
Picon
Favicon

Re: ipython on solaris 10


    Noah> Anyone else using ipython on Solaris 10?  Readline is a problem on
    Noah> the system python for Solaris too.  

I had no idea there was even a Sun-provided version of Python on Solaris.
Is there some reason you can't build from source?  You can then easily
include all the packages which interest you.

--

-- 
Skip Montanaro - skip <at> pobox.com - http://www.webfast.com/~skip/
Noah Gift | 1 Mar 18:10
Picon
Gravatar

Re: ipython on solaris 10



On Sat, Mar 1, 2008 at 12:02 PM, <skip <at> pobox.com> wrote:

   Noah> Anyone else using ipython on Solaris 10?  Readline is a problem on
   Noah> the system python for Solaris too.

I had no idea there was even a Sun-provided version of Python on Solaris.
Is there some reason you can't build from source?  You can then easily
include all the packages which interest you.

Anyone can download Solaris 10 and run it in a Virtual Machine, in fact I recommend it, it is a really interesting OS.  It does come with Python 2.4.4 which is a pretty recent version of Python.  Obviously compiling is less appealing then easy_install though.  In addition, on some machines due to configurations I may use, say a T2000 with the Niagra chip, I wouldn't really want to compile software and potentially mess up a LDOM accidently.

--
Skip Montanaro - skip <at> pobox.com - http://www.webfast.com/~skip/

_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
Robert Love | 1 Mar 23:23
Picon

Re: yet another leopard/readline question

Has anybody ever gotten Apple's take on all the problem we're having  
with readline?  I would think a politely worded letter to Ernie (prabhaka <at> apple.com 
), the user relations manager for science,  with the groups concerns  
might go some way to getting a fully compliant readline replacement  
from Apple.

On Feb 27, 2008, at 12:08 PM, Barry Wark wrote:

> I can replicate your experience on our PPC running 10.5.2. I'm a bit
> swamped right now at work but I'll try to look at it when I can sneak
> some time. In the mean time, would you file a bug on the IPython trac
> (http://projects.scipy.org/ipython/ipython) so that we can keep track
> of this issue?
>
> thanks,
> Barry
>
> On Tue, Feb 26, 2008 at 7:09 AM, Stephen Uhlhorn <stephenlists <at> gmail.com 
> > wrote:
>> Is it possible that when I call 'easy_install' on my ppc machine it
>> finds the *-i386.egg and then decides to try and build the egg and
>> readline from scratch, rather than using the binary?
>>
>> Or, do I need to build the readline library on my ppc machine? Is
>> readline.so compatible with ppc?
>>
>> Thanks-
>>
>>
>> -stephen
>> _______________________________________________
>> IPython-user mailing list
>> IPython-user <at> scipy.org
>> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>>
> _______________________________________________
> IPython-user mailing list
> IPython-user <at> scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
Flavio Coelho | 2 Mar 14:25
Picon
Gravatar

Re: ipython1 and farm tasking

On Thu, Feb 28, 2008 at 1:59 PM, Brian Granger <ellisonbg.net <at> gmail.com> wrote:

>
>  Another thing to keep in mind.  Whatever database solution you use,
>  you need to make sure that it supports multiple simultaneous client
>  reading/writing from it.  Otherwise, your database can easily get into
>  an inconsistent state.  This is outside my area of expertise, so you
>  will have to investigate this yourself.

ZODB with ZEO does handle multiple concurrent connections, but I am
still trying to figure out how to make it work with multiple
processes. I have been successuful with multi-threaded access so far.

I am trying the relstorage back-end now to compar it to the standard
ZEO+FileStorage for concurrent writes.

>  As a side issue, I would love to help develop a nice standard database
>  backend that ipython engines and read/write to.  This would provide a
>  very attractive way of handling global state.  One option that might
>  scale very well is mnesia, erlangs distributed database.  Thoughts?

I think if I can figure out how to  make ZODB work with Ipython1 (or
any other multi-processing solution) I will be able to say that
without any doubt, ZODB is the best solution for what you have in
mind. for a number of reasons:

1- It is a OO database, which means that "live" objects can flow in
and out of the database seamlessly without the burden of a ORM layer
to allow the interaction with a relational DB.
2-  Objects will able to be persisted not only during an
Ipithon1session, but also for as long as the user wants to (through
multiple sessions).
3- The seamless connection between memory and Database that ZODB
provides works great as a memory management tool, allowing for
effortless off-loading of large objects to the db as they go out of
scope, until they are needed again down the line.
it supports single file storage, or standard rdms server as backends,
such as (Postgres, MySQL, or Oracle)
4- It is a Pure python(and Pythonic) Solution.

>
>  Why did you choose ZODB - is it already a part of your system?

I chose ZODB beacuse  of the reasons I mention above, but mainly
because Its absolutely transparent. I dont have to write a lot of
"boiler plate" code just to get the data to and from the DB.

Flávio

>  >
>  >
>  >
>  >  On Wed, Feb 27, 2008 at 7:29 PM, Brian Granger <ellisonbg.net <at> gmail.com> wrote:
>  >  > Alex,
>  >  >
>  >  >  First, I would suggest updating your ipython1 install from our svn
>  >  >  repository.  We are about to push out a major new version and the
>  >  >  documentation is _much_ better.  Also, there are many new features
>  >  >  that will hopefully help you.  Here is a simple example (using the
>  >  >  latest svn of ipython1):
>  >  >
>  >  >  In [1]: from ipython1.kernel import client
>  >  >
>  >  >  In [2]: mec = client.MultiEngineClient(('127.0.0.1',10105))
>  >  >
>  >  >  In [3]: tc = client.TaskClient(('127.0.0.1',10113))
>  >  >
>  >  >  In [4]: def fold_package(x):
>  >  >    ...:     return 2.0*x
>  >  >    ...:
>  >  >
>  >  >  In [5]: mec.push_function(dict(fold_package=fold_package))
>  >  >  Out[5]: [None, None, None, None]
>  >  >
>  >  >  In [6]: tasks =
>  >  >  [client.Task("y=fold_package(x)",push={'x':x},pull=('y',)) for x in
>  >  >  range(128)]
>  >  >
>  >  >  In [7]: task_ids = [tc.run(t) for t in tasks]
>  >  >
>  >  >  In [8]: tc.barrier(task_ids)
>  >  >
>  >  >  In [9]: task_results = [tc.get_task_result(tid) for tid in task_ids]
>  >  >
>  >  >  In [10]: results = [tr.ns.y for tr in task_results]
>  >  >
>  >  >  In [11]: print results
>  >  >  [0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0,
>  >  >  24.0, 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 38.0, 40.0, 42.0, 44.0,
>  >  >  46.0, 48.0, 50.0, 52.0, 54.0, 56.0, 58.0, 60.0, 62.0, 64.0, 66.0,
>  >  >  68.0, 70.0, 72.0, 74.0, 76.0, 78.0, 80.0, 82.0, 84.0, 86.0, 88.0,
>  >  >  90.0, 92.0, 94.0, 96.0, 98.0, 100.0, 102.0, 104.0, 106.0, 108.0,
>  >  >  110.0, 112.0, 114.0, 116.0, 118.0, 120.0, 122.0, 124.0, 126.0, 128.0,
>  >  >  130.0, 132.0, 134.0, 136.0, 138.0, 140.0, 142.0, 144.0, 146.0, 148.0,
>  >  >  150.0, 152.0, 154.0, 156.0, 158.0, 160.0, 162.0, 164.0, 166.0, 168.0,
>  >  >  170.0, 172.0, 174.0, 176.0, 178.0, 180.0, 182.0, 184.0, 186.0, 188.0,
>  >  >  190.0, 192.0, 194.0, 196.0, 198.0, 200.0, 202.0, 204.0, 206.0, 208.0,
>  >  >  210.0, 212.0, 214.0, 216.0, 218.0, 220.0, 222.0, 224.0, 226.0, 228.0,
>  >  >  230.0, 232.0, 234.0, 236.0, 238.0, 240.0, 242.0, 244.0, 246.0, 248.0,
>  >  >  250.0, 252.0, 254.0]
>  >  >
>  >  >  Or if you don't need load balancing:
>  >  >
>  >  >  # This sends the fold_package function for you!
>  >  >  results = mec.map(fold_package, range(128))
>  >  >
>  >  >  Let us know if you run into other problems.
>  >  >
>  >  >  Cheers,
>  >  >
>  >  >  Brian
>  >  >
>  >  >
>  >  >
>  >  >  On Mon, Feb 25, 2008 at 7:44 PM, Alexandre Gillet <gillet <at> scripps.edu> wrote:
>  >  >  > Hi,
>  >  >  >
>  >  >  >  I just started using ipython1 do to distribute job on multiple cpu.  I
>  >  >  >  am having some issue and I am not sure how it works.
>  >  >  >  I want to pass a function to be run by each task on each client.
>  >  >  >  In the following code, the function fold_package need to be run on each
>  >  >  >  client.
>  >  >  >
>  >  >  >  packages_list=[ '3114', '3115','3116']
>  >  >  >  # create a  remote  controller instance
>  >  >  >  rc = kernel.RemoteController(('127.0.0.1',10105))
>  >  >  >  # create task controller instance
>  >  >  >  tc = kernel.TaskController(('127.0.0.1', 10113))
>  >  >  >  # commands won't block by default
>  >  >  >  rc.block = False
>  >  >  >  # get id of available engine
>  >  >  >  engines_id = rc.getIDs()
>  >  >  >  # process the list of packages by dispatching them to different computer
>  >  >  >  # create the task list
>  >  >  >  tasks = [kernel.Task("fold_package(%s)"%t) for t in packages_list]
>  >  >  >  # test task controller
>  >  >  >  taskIDs = [tc.run(t) for t in tasks]
>  >  >  >
>  >  >  >
>  >  >  >  when I run that code I get:
>  >  >  >  NameError: name 'fold_package' is not defined
>  >  >  >
>  >  >  >  My questions are;
>  >  >  >  How do you pass a function define in my script to the client engine?
>  >  >  >  Or Do I have to create a package that will contains my function and
>  >  >  >  installed it on each client?
>  >  >  >
>  >  >  >  Thanks for any advices and answers.
>  >  >  >  Alex
>  >  >  >
>  >  >  >  --
>  >  >  >   o Alexandre Gillet    Ph.D.           email: gillet <at> scripps.edu
>  >  >  >  /  The Scripps Research Institute,
>  >  >  >  o  Dept. Molecular Biology,  MB-5,
>  >  >  >  \  10550  North Torrey Pines Road,
>  >  >  >   o La Jolla,  CA 92037-1000,  USA.
>  >  >  >  /  tel: (858) 784-2053
>  >  >  >  o  fax: (858) 784-2860
>  >  >  >     web: http://mgl.scripps.edu/projects/tangible_models/
>  >  >  >  _______________________________________________
>  >  >  >  IPython-user mailing list
>  >  >  >  IPython-user <at> scipy.org
>  >  >  >  http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>  >  >  >
>  >  >  _______________________________________________
>  >  >  IPython-user mailing list
>  >  >  IPython-user <at> scipy.org
>  >  >  http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>  >  >
>  >
>
Erich Heine | 3 Mar 01:43
Picon

A useful couple of scripts

Hi all,

Ive recently been playing with ipython, and like it quite a bit. I did however discover a bit of frustration, namely with editor interaction.  I am a gvim user, and using the command edit on a new file causes ipython to try and run that file as soon as the text editor opens up. The -x command of course fixes this, but its still a bit annoying, switching windows to do a run file, then back to the text editor. Being a heavy tab user in gvim, another annoyance is not being able to specify weather a new tab is how I choose to open the file.

Not being one to shirk my open source duties (and seeing this as a good excuse to poke around ipython internals), Ive created a script for having gvim and ipython work very nicely together. Ive attached both to this email (hoping of course that the mailing list allows such things).

There are 2 files:
ipserver.py -- this file contains the ipython stuff
ipy.vim -- this file contains the gvim stuff

In combination they allow for a few functionalities:
1. the vim magic command. This is a fancy wrapper around the edit magic, that allows for a new option, -t, which opens the text in a new gvim tab.  Otherwise it works the same as edit -x. (it internally calls edit -x). This magic command also juggles vim server management, so when it is called when there is not a gvim running, it creates a new gvim instance, named after the ipython session name.  Once such a gvim instance is running, it will be used for subsequent uses of the vim command.

2. ipython - gvim interaction. Once a file has been opened with the vim magic (and a session set up, see below), pressing the F5 key in vim will cause the calling ipython instance to execute run filename.py. (if you typo like I do, this is very useful)

3. ipython server - this is a thread wich listens on a unix domain socket, and runs commands sent to that socket.

Note, this only works on POSIX systems, that allow for AF_UNIX type sockets. It has only been tested on linux (a fairly recent debian testing distro).

To install it put, the ipserver.py in your favorite locaion for sourcing ipython scripts. I put the ipy.vim in ~/.vim/after/ftplugin/python/.

To use (this can be scripted im sure, but i usually have 2 or 3 ipythons and corresponding gvims open):

import ipserver
ipserver.setup('sessionname')

Then use ipython as you normally would, until you need to edit something. Instead of edit, use the vim magic.
Thats it!


If anyone sees ways to improve this, please let me know. Also, if anyone can think of a good way of allowing debugging interaction via this method, I'm hoping for a way to do that with 0.8.x. Ipython1, from what I've seen of it so far, appears to allow the debugging integration pretty easy (and the above python integration...).

Regards and have fun
Erich

PS this code is public domain, in case anyone cares about licensing stuff.

Attachment (ipserver.py): text/x-python, 4959 bytes
Attachment (ipy.vim): application/octet-stream, 1530 bytes
_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
Tony Cappellini | 3 Mar 05:55
Picon

Graphical interface for iPython

I'm somewhat new to using iPython, and like it a lot.
However, I've gotten quite used to the command line completion (etc)
found in PyCrust & PyAlamode from wxPython (not to mention PyWin32
from the Win32 extensions).

Has there been any chatter about making a graphical UI for iPython
that has (at the least) command line completion (drop down combo box
for objects)?

thanks
Fernando Perez | 3 Mar 06:01
Picon
Gravatar

Re: Graphical interface for iPython

On Sun, Mar 2, 2008 at 8:55 PM, Tony Cappellini <cappy2112 <at> gmail.com> wrote:
> I'm somewhat new to using iPython, and like it a lot.
>  However, I've gotten quite used to the command line completion (etc)
>  found in PyCrust & PyAlamode from wxPython (not to mention PyWin32
>  from the Win32 extensions).
>
>  Has there been any chatter about making a graphical UI for iPython
>  that has (at the least) command line completion (drop down combo box
>  for objects)?

We're working on it.  Right now :)

We're doing a lot of internal architectural updates as part of
ipython1, so it  will be a few weeks before all of this is usable, but
we're pretty close.  A tiny bit of patience, please :)

Cheers,

f
Tony Cappellini | 3 Mar 06:41
Picon

Capturing output with logging

I wanted to save the output of %quickref to a file

so I initiated %logstart -o
%quickref
%logoff

The logfile only contains this
_ip.magic(r"cd \atemp")
_ip.magic("cd Varscanner/")
_ip.magic("logstart -o")
_ip.magic("quickref ")
_ip.magic("logstop ")
_ip.magic("quickref ")

The output of %quickref isn't in the logfile.
What did I miss?

I've got the iPython manual open to %logstart- but something isn't
working the way I'd expect

Gmane