ipython / ipython
- Source
- Commits
- Network (12)
- Issues (122)
- Downloads (0)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
-
0 comments Created 14 days ago by ipythonellisonbgmilestone-0.11Document winhpcjob.py and launcher.pyprio-lowOriginal Launchpad bug 502787: https://bugs.launchpad.net/ipython/+bug/502787
Reported by: ellisonbg (Brian Granger).These modules need documentation.
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonfperezprio-mediumFix the copyright statement in source code files to be accuratemilestone-0.11Original Launchpad bug 502789: https://bugs.launchpad.net/ipython/+bug/502789
Reported by: ellisonbg (Brian Granger).The copyright statements in some source files are inaccurate and need to be updated.
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonellisonbgprio-mediumImplement PBS support in ipclustermilestone-0.11Original Launchpad bug 502793: https://bugs.launchpad.net/ipython/+bug/502793
Reported by: ellisonbg (Brian Granger).It is currently broken.
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythongael-varoquauxwx frontend don't display well commands outputprio-lowOriginal Launchpad bug 345610: https://bugs.launchpad.net/ipython/+bug/345610
Reported by: laurent-dufrechou (Laurent Dufrechou).There must be locale error for commands taht goes throught process under VISTA SP1 french:
!dir ->
Le volume dans le lecteur C n'a pas de nom. Le num‚ro de s‚rie du volume est 1860-8F8E
R‚pertoire de C:\Users\ldufrechou\Desktop\Ipython-dev\test\ipython-sync-frontend-retweaks\IPython\frontend\wx
19/03/2009 21:57 .
19/03/2009 21:57 ..
19/03/2009 21:55 20ÿ691 console_widget.py
19/03/2009 21:57 15ÿ647 console_widget.pyc
19/03/2009 21:56 5ÿ754 ipythonx.py
19/03/2009 21:55 20ÿ476 wx_frontend.py
19/03/2009 21:57 18ÿ174 wx_frontend.pyc
19/03/2009 21:55 0 init.py
6 fichier(s) 80ÿ742 octets 2 R‚p(s) 1ÿ123ÿ250ÿ176 octets libresComments
Please log in to comment. -
0 comments Created 14 days ago by ipythonls command not supported in ipythonx wx frontendwishlistOriginal Launchpad bug 345611: https://bugs.launchpad.net/ipython/+bug/345611
Reported by: laurent-dufrechou (Laurent Dufrechou).related to ipythonx (wx frontend) pre v0.10
!dir works well ls don't work while it works in classical ipython console
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonellisonbgmilestone-0.11Update the Sphinx docs for the new ipclusterprio-lowOriginal Launchpad bug 502798: https://bugs.launchpad.net/ipython/+bug/502798
Reported by: ellisonbg (Brian Granger).The ipcluster program has been completely refactored to use the new config system. The Sphinx docs for ipcluster need to be updated to reflect this.
Comments
Please log in to comment. -
Update the changes doc to reflect the kernel config work
0 comments Created 14 days ago by ipythonOriginal Launchpad bug 502799: https://bugs.launchpad.net/ipython/+bug/502799
Reported by: ellisonbg (Brian Granger).IPython.kernel was refactored in the Fall of 2009 to use the new config system. We need to write the changes for this merge in our Sphinx docs.
Comments
Please log in to comment. -
5 comments Created 14 days ago by ipythonfperezprio-criticalmilestone-0.11Ensure %gui qt works with new Mayavi and pylabellisonbgOriginal Launchpad bug 508953: https://bugs.launchpad.net/ipython/+bug/508953
Reported by: fdo.perez (Fernando Perez).Right now mayavi/qt is only on SVN, but eventually we need to ensure that %gui qt allows mayavi/qt and pylab/qt to work together.
For more details:
http://mail.scipy.org/pipermail/ipython-dev/2010-January/005728.htmlComments
[ LP comment 1 by: Michele Mattioni, on 2010-01-18 11:54:43.261168+00:00 ]
Expected:
The window should respond to the command (zoom, rotate...) and not freeze.
The prompt should be back and be responsive.
[ LP comment 2 by: Michele Mattioni, on 2010-01-18 12:02:03.250363+00:00 ]
Ok, this is weird.
Sometimes the window freeze, sometimes respond to the command (like zoom and rotate).
However I can't get the prompt back and ready to insert a new command.
[ LP comment 3 by: Brian Granger, on 2010-01-18 16:42:52+00:00 ]
Mayavi and pylab are probably doing some funny things with the event
loop that is messing up
things. It will probably require someone looking through the
Mayavi/pylab/traits code carefully
to look for these things.Cheers,
Brian
On Mon, Jan 18, 2010 at 4:02 AM, Michele Mattioni mattions@gmail.com">mattions@gmail.com wrote:
Ok, this is weird.
Sometimes the window freeze, sometimes respond to the command (like zoom and rotate).
However I can't get the prompt back and ready to insert a new command.
-- Ensure %gui qt works with new Mayavi and pylab https://bugs.launchpad.net/bugs/508953 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: Confirmed
Bug description: Right now mayavi/qt is only on SVN, but eventually we need to ensure that %gui qt allows mayavi/qt and pylab/qt to work together.
For more details: http://mail.scipy.org/pipermail/ipython-dev/2010-January/005728.html
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 4 by: Fernando Perez, on 2010-01-18 23:16:28.353993+00:00 ]
The attached script can be run in ipython trunk-dev, and shows the problem:
maqroll[Desktop]> ip
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
Type "copyright", "credits" or "license" for more information.IPython 0.11.bzr.r1346 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.In [1]: gui -a qt
Out[1]: <PyQt4.QtGui.QApplication object at 0x93086ac>In [2]: run qt_embedding.py
Button pushed
Terminal is frozen here, until we close the mayavi window.
In contrast, if we run the same script in 0.10 with -q4thread:
(ipython-0.10)maqroll[Desktop]> ip -q4thread Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
Type "copyright", "credits" or "license" for more information.IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.In [1]: run qt_embedding.py
In [2]: 1+1 # terminal accepts input though window remains open
Out[2]: 2In [3]: Button pushed
Thanks to Gael for the feedback to fix the api calls in the example script.
Please log in to comment.I think this is related to the larger issues we are having with Traits and IPython's new even t loop stuff.
-
3 comments Created 14 days ago by ipythonvvatsaGetting "DeadReferenceError: Calling Stale Broker" after ipcontroller restartprio-mediumOriginal Launchpad bug 308253: https://bugs.launchpad.net/ipython/+bug/308253
Reported by: vvatsa (Vishal Vatsa).Not Sure that is a bug or an expected behavior.
I am starting the ipcontoller such that it reuses the ipcontroller-tc.furl between restarts.
After the restart, if I invoke a DeadReferenceError with the following traceback:
I am using the blocking TaskClient from an ipython shell.In [8]: tc.spin()
DeadReferenceError Traceback (most recent call last)
/home/vishal/ in ()
/usr/lib/python2.5/site-packages/IPython/kernel/taskclient.pyc in spin(self)
119 scheduler is idle for some reason. 120 """--> 121 return blockingCallFromThread(self.task_controller.spin)
122 123 def queue_status(self, verbose=False):/usr/lib/python2.5/site-packages/IPython/kernel/twistedutil.pyc in blockingCallFromThread(f, *a, **kw)
67 @raise: any error raised during the callback chain. 68 """---> 69 return twisted.internet.threads.blockingCallFromThread(reactor, f, *a, **kw)
70 71 else:/usr/lib/python2.5/site-packages/twisted/internet/threads.pyc in blockingCallFromThread(reactor, f, *a, **kw)
81 result = queue.get() 82 if isinstance(result, failure.Failure):---> 83 result.raiseException()
84 return result 85/usr/lib/python2.5/site-packages/twisted/python/failure.pyc in raiseException(self)
317 information if available. 318 """--> 319 raise self.type, self.value, self.tb
320 321DeadReferenceError: Calling Stale Broker
Comments
[ LP comment 1 by: Brian Granger, on 2009-04-14 21:38:33.292246+00:00 ]
I have confirmed this. It also occurs for the MultiEngineClient when the controller stop and is restarted underneath a live client. The client should have reconnect logic that is triggered on a DeadReferenceError.
[ LP comment 2 by: Vishal Vatsa, on 2009-04-24 18:22:23+00:00 ]
Hey Brian,
Totally forgot about this bug. Since I have had a look at this before,
feel free to assign it to me.-vishal
2009/4/14 Brian Granger ellisonbg@gmail.com">ellisonbg@gmail.com:
I have confirmed this. It also occurs for the MultiEngineClient when the controller stop and is restarted underneath a live client. The client should have reconnect logic that is triggered on a DeadReferenceError.
** Changed in: ipython Importance: Undecided => Medium
** Changed in: ipython Status: New => Confirmed
** Changed in: ipython Assignee: (unassigned) => Brian Granger (ellisonbg)
-- Getting "DeadReferenceError: Calling Stale Broker" after ipcontroller restart https://bugs.launchpad.net/bugs/308253 You received this bug notification because you are a direct subscriber of the bug.
Status in IPython - Enhanced Interactive Python: Confirmed
Bug description: Not Sure that is a bug or an expected behavior.
I am starting the ipcontoller such that it reuses the ipcontroller-tc.furl between restarts. After the restart, if I invoke a DeadReferenceError with the following traceback: I am using the blocking TaskClient from an ipython shell.
In [8]: tc.spin()
DeadReferenceError Traceback (most recent call last)
/home/vishal/ in ()
/usr/lib/python2.5/site-packages/IPython/kernel/taskclient.pyc in spin(self) 119 scheduler is idle for some reason. 120 """ --> 121 return blockingCallFromThread(self.task_controller.spin) 122 123 def queue_status(self, verbose=False):
/usr/lib/python2.5/site-packages/IPython/kernel/twistedutil.pyc in blockingCallFromThread(f, a, **kw) 67 @raise: any error raised during the callback chain. 68 """ ---> 69 return twisted.internet.threads.blockingCallFromThread(reactor, f, a, **kw) 70 71 else:
/usr/lib/python2.5/site-packages/twisted/internet/threads.pyc in blockingCallFromThread(reactor, f, *a, **kw) 81 result = queue.get() 82 if isinstance(result, failure.Failure): ---> 83 result.raiseException() 84 return result 85
/usr/lib/python2.5/site-packages/twisted/python/failure.pyc in raiseException(self) 317 information if available. 318 """ --> 319 raise self.type, self.value, self.tb 320 321
DeadReferenceError: Calling Stale Broker
Please log in to comment.[ LP comment 3 by: Brian Granger, on 2009-04-27 21:13:32.675484+00:00 ]
Thanks for looking into this!
-
Original Launchpad bug 409633: https://bugs.launchpad.net/ipython/+bug/409633
Reported by: fdo.perez (Fernando Perez).From a discussion on the scipy-dev list, starting here:
http://mail.scipy.org/pipermail/scipy-dev/2009-August/012486.html
Robert went ahead and implemented it as a magic using the new demo improvements:
We should fold these into ipython itself.
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonfperezCreate a daily build PPA for ipythonwishlistOriginal Launchpad bug 417969: https://bugs.launchpad.net/ipython/+bug/417969
Reported by: fdo.perez (Fernando Perez).Once our trunk stabilizes some, we should offer a daily PPA to make it easy for interested users to follow our tree.
Some useful links and references:
https://code.edge.launchpad.net/~fta/+junk/ppa-confs
https://code.edge.launchpad.net/~fta/+junk/ppa-scripts
https://wiki.ubuntu.com/DailyBuilds
http://castrojo.wordpress.com/2009/08/21/making-daily-builds/Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonBetter dependency handling for test suiteprio-highOriginal Launchpad bug 508970: https://bugs.launchpad.net/ipython/+bug/508970
Reported by: fdo.perez (Fernando Perez).This bug is a follow-up of:
https://bugs.launchpad.net/ipython/+bug/362142
which is now closed and split into several more specific reports. See the above for extra background.
The main point of this ticket is best summarized by Brian here:
It is still super easy for a single developer to break the test suite by making their new module depend on something (twisted, wx, etc.). For that dev, they always have the dep. installed, so they never see the failure, so all their new tests will run fine. This is particularly insidious (still) for twisted because iptest does not have a clean way of declaring test dependencies and run methods for individual files.
We are trying to do this by subpackage, but that is quite inflexible - what if only a single file in a subpackage depends on twisted - then the rest of the subpackage can't be tested using nose.
We need a simple, declarative API for "declaring" the testing related information on a per subpackage or per module basis. This includes:
- Dependencies
- Method of running the test (nose+iptest/trial)
- Thing like "test this subpackage this way, but these two modules are different" We run into this with frontend, which uses twisted in a few places, but not everywhere.
Comments
Please log in to comment. -
1 comment Created 14 days ago by ipythonImprove robustness and debuggability of test suiteprio-highOriginal Launchpad bug 508971: https://bugs.launchpad.net/ipython/+bug/508971
Reported by: fdo.perez (Fernando Perez).This bug is a follow-up of:
https://bugs.launchpad.net/ipython/+bug/362142
which is now closed and split into several more specific reports. See the above for extra background.
The main points brought up by Brian:
Our test suite is still quite fragile and difficult to debug when things go wrong (case in point, your recent bug report about the history being dumped to the screen). If we can get the dpendency issues worked out (to isolate twisted and nose) I think most of this fragility is localized to the nose extension that handles the one time IPython shell. I think our test infrastructure has to be completely independent of our main IPython code (the testing infrastucture should never do "from IPython import ...").
At some point, we figured out how we could enable the writing of IPython doctests without the nose extension (do you remember how this can be done?). As I remember we talked about using this idea along with pexpect to isolate the running IPython to another process.
Jorgen noted:
I think using pexpect requires some research if you want to keep the the
tests running on windows.Brian's reply:
Yes, this is a huge problem - pexpect doesn't work on Windows...We should check with the Sage folks, I know at one point, they were working on a windows port of pexpect called wexpect.
Twisted does have many of the same capabilities that pexpect has for working with external processes. That might be our best bet.
Comments
Please log in to comment.[ LP comment 1 by: Fernando Perez, on 2010-01-18 01:39:06.370752+00:00 ]
Some notes on the above:
I talked with William Stein (sage) a few days ago: no major progress from them on using pexpect for windows, instead they are moving away from pexpect as much as possible by building library wrappers for everything they can (like maxima and gap).
I don't see us abandoning nose anytime soon. Trial has a few critical problems:
it would make testing depend on twisted for us. Nose is a tiny, self-contained download, but Twisted is a much larger dependency. Too much for something as critical as testing.
It has no discovery mechanism for doctests.
My earlier efforts on doing ipython doctests without nose were only partly successful. In the last few weeks that I've been working a lot on this, I realized we really need quite a bit of machinery to be able to validate full ipython sessions, just doing syntax conversion to get a unittest out of a docstring (the part I was able to succeed on) isn't sufficient for the whole test suite.
I don't think it's really possible to expect our test suite to pass without an ipython shell running somewhere. We are more than just plain python, and to test all of that we really need a true ipython somewhere that we can beat on.
Having said all this, I think things now aren't really that bad. Having cleaned up the test machinery a lot recently, it's working quite well, debugging is possible with --pdb or other mechanisms, etc. The only thing that is hard is debugging a big doctest with lots of output, but that's simply how doctests are, not something specific to ipython (and for that reason, a bad idea in general if you want your tests to be debuggable).
I'm all for making our testing machinery as simple/robust as humanly possible, because I fully realize the importance of the test support in the health of a project. But having spent literally upwards of a hundred hours on this problem alone, I'm not sure right now I'm capable of making it much simpler without writing something like nose again, from scratch.
One ray of light may come from python itself: I think for 2.7 they are improving unittest, so perhaps we could find better support there once it's out.
I'm open to revisiting this question when possible, but I'm not terribly optimistic on me making lots of improvements beyond what's right now in my trunk-dev branch (which actually works quite well, it must be said). But I'd love to see someone who comes with a fresh eye on this problem make progress on it!
-
Original Launchpad bug 514613: https://bugs.launchpad.net/ipython/+bug/514613
Reported by: ellisonbg (Brian Granger).Currently in IPython.core we sometimes use IPython.utils.io.Term to print and sometimes we just do print. The advantage of using Term is that it will properly handle colors on Windows. But we don't use it everywhere. Really, we need to come up with a uniform way of handling printing to stdout/stderr in IPython. This is particularly relevant as we refactor the core to be used without a terminal.
Comments
[ LP comment 1 by: Fernando Perez, on 2010-01-30 05:43:41+00:00 ]
On Fri, Jan 29, 2010 at 8:40 PM, Brian Granger ellisonbg@gmail.com wrote:
Public bug reported:
Currently in IPython.core we sometimes use IPython.utils.io.Term to print and sometimes we just do print. The advantage of using Term is that it will properly handle colors on Windows. But we don't use it everywhere. Really, we need to come up with a uniform way of handling printing to stdout/stderr in IPython. This is particularly relevant as we refactor the core to be used without a terminal.
Absolutely: we should probably add a little tool that looks for naked
print statements and flags them. It's OK to have one in the middle of
debuggin on your own, but we probably shouldn't leave any in committed
code.Thanks!
Please log in to comment.[ LP comment 2 by: Brian Granger, on 2010-01-30 06:06:39+00:00 ]
Thinking about moving towards 2.6/3.0 support...
It would probably be a good idea to unify Term/print into a new API
that closely follows the
print function of python 2.6/3.0. We could even write a simply
version of the print function
that works with 2.5 and would allow us to move to the new API now. We
will need to do this
for the refactor of IPython.core for GUI versions of IPython.Cheers,
Brian
Absolutely: we should probably add a little tool that looks for naked print statements and flags them. It's OK to have one in the middle of debuggin on your own, but we probably shouldn't leave any in committed code.
Thanks!
-- Decide when to use Term and when to print https://bugs.launchpad.net/bugs/514613 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: Currently in IPython.core we sometimes use IPython.utils.io.Term to print and sometimes we just do print. The advantage of using Term is that it will properly handle colors on Windows. But we don't use it everywhere. Really, we need to come up with a uniform way of handling printing to stdout/stderr in IPython. This is particularly relevant as we refactor the core to be used without a terminal.
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com -
0 comments Created 14 days ago by ipythonellisonbgprio-mediumImplement SGE support in ipclustermilestone-0.11Original Launchpad bug 502794: https://bugs.launchpad.net/ipython/+bug/502794
Reported by: ellisonbg (Brian Granger).This is needed by a number of folks.
Comments
Please log in to comment. -
%store raises exception when storing compiled regex
1 comment Created 14 days ago by ipythonOriginal Launchpad bug 396351: https://bugs.launchpad.net/ipython/+bug/396351
Reported by: tmp-ipython (matt_ipython).import re compiled_re = re.compile(r'^(\d+)') %store compiled_re
AttributeError: class
The object "compiled_re" does in fact get pickled and is automatically restored when ipython is next launched. But code to print out user feedback is assuming that the object being stored has an attribute "class", which a compiled regular expression does not have.
I'm not sure if there is a reliable way to always get equivalent of the "name" attribute for all objects or not. In the couple cases I tried however (including for the compiled_re object), replacing:
obj.class.name
with
type(obj).name
worked. I would think that doing something like this which is not necessarily 100% reliable should be inside of a try/except block.
I'm new to iPython as of today. I'm running version "0.10.bzr.r1163".
Comments
Please log in to comment.[ LP comment 1 by: Ville M. Vainio, on 2009-07-07 06:32:30+00:00 ]
On Tue, Jul 7, 2009 at 7:13 AM, matt_ipythontmp_ipython@mailinator.com">tmp_ipython@mailinator.com wrote:
The object "compiled_re" does in fact get pickled and is automatically restored when ipython is next launched. But code to print out user feedback is assuming that the object being stored has an attribute "class", which a compiled regular expression does not have.
Yeah, it's trivial to just do the class name lookup in Try/Except.
Currently the code is:/usr/local/lib/python2.6/dist-packages/IPython/Extensions/pspersistence.pyc in magic_store(self, parameter_s)
178 #pickled = pickle.dumps(obj) 179 self.db[ 'autorestore/' + args[0] ] = obj--> 180 print "Stored '%s' (%s)" % (args[0], obj.class.name)
181-- Ville M. Vainio
http://tinyurl.com/vainio -
redefining stdout in imported module breaks cmdprompt on windows
1 comment Created 14 days ago by ipythonOriginal Launchpad bug 383554: https://bugs.launchpad.net/ipython/+bug/383554
Reported by: techtonik (anatoly techtonik).When import the module that redefines stdout, the colorful IPython prompt breaks (pyreadline is at 1.5), although other colors work in error messages.
{{{ Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.In [1]: from yyy import xxx
☺←[0;32m☻In [☺←[1;32m☻2☺←[0;32m☻]: ☺←[0m☻
☺←[0;32m☻In [☺←[1;32m☻3☺←[0;32m☻]: ☺←[0m☻some strange command
File "", line 1
some strange command ^SyntaxError: invalid syntax
☺←[0;32m☻In [☺←[1;32m☻4☺←[0;32m☻]: ☺←[0m☻
}}}
-- cut xxx.py --- import sys
class restdout:
def __init__(self, fp): self.fp = fp def write(self, s): self.fp.write(s)sys.stdout = restdout(sys.stdout)
Comments
-
Original Launchpad bug 329739: https://bugs.launchpad.net/ipython/+bug/329739
Reported by: laurent-dufrechou (Laurent Dufrechou).under linux:
launch ipythonx then:
%cpaste
then push a key.
All freezeComments
Please log in to comment. -
0 comments Created 14 days ago by ipythonfperezprio-mediumCrashHandler doesn't inspect modules properlymilestone-0.11Original Launchpad bug 515652: https://bugs.launchpad.net/ipython/+bug/515652
Reported by: ellisonbg (Brian Granger).If I make Magic an object and look at the crash reporter I see things like:
global The = undefined global Component = <class 'IPython.core.component.Component'> global subclass = undefined global that = undefined instance = undefined global will = undefined global = undefined global to = undefined global be. = undefinedThe variables here are not in Python code but are words from a
docstring in that module.
Any idea on what is going on here?Is it by any chance being loaded at runtime and the file may have
changed since you started ipython? The python inspection libraries
have caching bugs, I try in several places to flush those caches to
avoid this problem, but I may not be doing it right everywhere.This is old, old, horrible code I hacked very early on in ipython's
life on top of something I hadn't written and that was pretty bad to
begin with. It's in serious need of a test suite so it can be
refactored...At least as a pointer, the machinery responsible is around here:
So what's happening is that the list of 'unique names' being generated
is for some reason being computed from the wrong line of code, so text
from a docstring is read instead of text from the proper line of
source that originated the exception.Sorry not to be more helpful, this is something that needs a solid
chunk of deep work at some point, not something we can clear quickly
(the refactoring I mean, this little bug might be fixable with a one-line change somewhere).Comments
Please log in to comment. -
1 comment Created 14 days ago by ipythonellisonbgRobust readline support on OS X's builtin Pythonprio-mediumOriginal Launchpad bug 254023: https://bugs.launchpad.net/ipython/+bug/254023
Reported by: seanj-xyke (Sean Jensen-Grey).Re-edited 9/25/2008,
Short:
The bug contains a description and a solution for getting readline to work reliably on the mac. The solution outlined recommends shipping the egg for readline with ipython and installing it in site-packages. Optionally modifying the ipython.py script to contain a reference to the egg.
See below.
With a default source install of IPython 0.8.4, typing code into the ipython shell is a little frustrating since I cannot use the tab key to indent code.
Even with the -noreadline option used when starting ipython, the tab key will not emit a tab or spaces in the ipython shell.
I understand that readline support on OS X 10.5 is provided by libedit which does not have the same functionality as gnureadline.
And that by installing gnu readline I get the behavior I want.
And that there is an install guide @ http://ipython.scipy.org/moin/InstallationOSXLeopard
It would seem to me that the usability of ipython on the mac under leopard is pretty flawed due to poor readline implementation (out of the box). At least with how IPython interacts with it.
A couple possibilities to remedy this would be:
- Rather than say that libedit was detected, say something along the lines of
(only on darwin and if libedit was detected ...)
"""
The libedit replacement for gnu readline was detected on your mac.
IPython needs gnu readline to function optimally. Using the tab key to indent code
will not work without it.Please install pyreadline for osx. Or modify the ipython script itself.
see, http://pypi.python.org/pypi/readline/2.5.1
"""
- Ship the pyreadline.egg with the tar.gz of the source, during setup if they are using darwin, include the egg and modify the ipython start script.
My new start script looks like
import sys
sys.path.insert( 0, '/Users/sean/python/readline-2.5.1-py2.5-macosx-10.5-fat.egg')import IPython.Shell
IPython.Shell.start().mainloop()And it works great. I just had to download the egg from pypi and add it to my sys.path, INFRONT of everything else.pur
Adding in pyreadline support on the mac would only take 360k of extra space, it would save an extra configuration step. The setup command purveyed on blogs and on the OSX install page failed with a gcc error on my machine (new leopard 10.5.2 install with latest xcode tools).
I think shipping a binary egg that only ipython used would be best solution.
Comments
-
Original Launchpad bug 362568: https://bugs.launchpad.net/ipython/+bug/362568
Reported by: andrea-riciputi (Andrea Riciputi).Nowadays many Python packages have classes and/or methods that can be both lower and upper case. Being able to get autocompletion suggestion in a case insensitive way could be really usefull to many IPython users. I'm talking about something similar to what you get in most modern shells, where you get file completion no matter the file name case. Something that works like this:
Foo.a[TAB][TAB]
Foo.amethod Foo.AnotherMethodif the user types "m" she gets Foo.amethod, whilst if she types "n" she gets Foo.AnotherMethod
Thomas Heller suggested to hack the attr_matches() and global_matches() methods in completer.py (see the patch below). I think a better solution would be a new configuration option (let say tab_case = True|False) to be set in the ipython_rc.py file. I'm sorry, but I don't know IPython internals enough to be able to be more specific. However I think this feature could be a usefull improvement to many IPython users.
Comments
-
0 comments Created 14 days ago by ipythonprio-mediumInclude improvements from anythingipython.elmilestone-0.11Original Launchpad bug 405582: https://bugs.launchpad.net/ipython/+bug/405582
Reported by: fdo.perez (Fernando Perez).At: http://mercurial.intuxication.org/hg/anythingipython/summary
there is a little Emacs module with fixes for ipython.el and what appear to be other improvements. We should contact its author, listed as
Thierry Volpiatto - thierry.volpiatto AT gmail.com
to inquire whether he'd be interested in contributing this code upstream (i.e. with us). As it currently stands his code is GPL'd but it's a tiny module on top of ipython.el itself (which is BSD), so hopefully the author will be amenable to relicensing it as BSD so its changes can be merged back with ipython proper.
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonfperezMisc. problems in our Sphinx based docsprio-lowOriginal Launchpad bug 413776: https://bugs.launchpad.net/ipython/+bug/413776
Reported by: ellisonbg (Brian Granger).I am observing multple problems with the Sphinx based documentation. I am using the 0.11 trunk and Sphinx 0.6.2. We need to go through our docs and probably do the following:
- Update all of our extensions to the latest version from matplotlib, etc.
- Fix all the errors we are having with our api docs.
Here are some of the actual errors:
WARNING: extension 'ipython_console_highlighting' has no setup() function; is it really a Sphinx extension module?
/Users/bgranger/Documents/Computation/IPython/Code/inputhook/docs/sphinxext/docscrape.py:117: UserWarning: Unknown section Options
warn("Unknown section %s" % key)When reading sources, Sphinx gives MANY (WARNING/2) errors about problems with our module docstrings.
Then we get lots of these:
(WARNING/2) toctree references unknown document u'api/generated/generated/IPython.config.api'
checking consistency... /Users/bgranger/Documents/Computation/IPython/Code/inputhook/docs/source/api/generated/gen.txt:: WARNING: document isn't included in any toctree
doneComments
Please log in to comment. -
12 comments Created 14 days ago by ipythonvvatsaipcluster does not start all the enginesprio-lowOriginal Launchpad bug 509015: https://bugs.launchpad.net/ipython/+bug/509015
Reported by: fdo.perez (Fernando Perez).As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED>
Date: Sat, Jan 16, 2010 at 8:58 AM
Subject: [IPython-user] ipcluster does not start all the engines
To: "ipython-user@scipy.org" ipython-user@scipy.orgHi,
I did not find any previous notes on this.
I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.However, when using ipcluster on one of these machines in ssh mode, with this clusterfile,
send_furl = False
engines = { 'tev1' : 16,
'tev2' : 16, 'tev3' : 16, 'tev4' : 16}
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count):
exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
Comments
[ LP comment 1 by: Vishal Vatsa, on 2010-01-18 09:36:37.944247+00:00 ]
Hi Tony,
Which version of ipython are you using?
Thanks,
-vishal[ LP comment 2 by: Vishal Vatsa, on 2010-01-18 15:30:05+00:00 ]
Ipython version info from user.
---------- Forwarded message ---------- From: Toby Burnett tburnett@uw.edu
Date: 2010/1/18
Subject: RE: [IPython-user] ipcluster does not start all the engines
To: "vishal.vatsa@gmail.com" vishal.vatsa@gmail.com">vishal.vatsa@gmail.comHI Vishal,
Thanks for looking at it. I’m using 0.10 with python 2.5.4
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
IPython 0.10 -- An enhanced Interactive Python.
--Toby
P.S. I tried to join the bug list, separate from user list I guess. No response.
[ LP comment 3 by: Brian Granger, on 2010-01-18 16:41:12+00:00 ]
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
Great, glad it is useful to you.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
I think I know what the issue is here. We have found that sometimes
the engines startup
so fast that the controller is not yet up and running. The engine
that try to connect
before the controller is running fail. Twisted is fully capable of
handling many simultaneous
connections, so I don't think it is that.The good news is that all of this is fixed in trunk (ipcluster is much
improved). The bad news
is that I haven't yet gotten the ssh mode cluster working with the new
ipcluster in trunk.
It shouldn't be difficult, and Vishal knows this code as well.In the mean time, I would suggest looking through ipcluster.py - you
should be able to put a delay
between when the controller is started and when the engines are started.Cheers,
Brian
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
** Affects: ipython Importance: Undecided Status: New
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 4 by: Vishal Vatsa, on 2010-01-18 21:21:06+00:00 ]
2010/1/18 Brian Granger ellisonbg@gmail.com">ellisonbg@gmail.com:
I think I know what the issue is here. We have found that sometimes the engines startup so fast that the controller is not yet up and running. The engine that try to connect before the controller is running fail. Twisted is fully capable of handling many simultaneous connections, so I don't think it is that.
Yep this sound about correct.
Though it should not happen as, there is a _delay_start method which
waits for the furl files to be created on disk, which should be the test
that ipcontroller is up and running.Toby, which OS are you on? could the filesystem semantics be different?
(In theory, it should work on windows/cygwin but I have never tested it)I have not been able to replicate this so far on NAS backed cluster.
If this continues to be an issue for you, I can try to give you a patch
to insert a delay in the ssh engine start.Regards,
-vishal[ LP comment 5 by: Brian Granger, on 2010-01-18 22:38:16+00:00 ]
Yep this sound about correct. Though it should not happen as, there is a _delay_start method which waits for the furl files to be created on disk, which should be the test that ipcontroller is up and running.
Yes, even though that method exists, we have sometimes observed it to fail.
Toby, which OS are you on? could the filesystem semantics be different? (In theory, it should work on windows/cygwin but I have never tested it)
The problems we had with this were on Windows.
I have not been able to replicate this so far on NAS backed cluster. If this continues to be an issue for you, I can try to give you a patch to insert a delay in the ssh engine start.
Regards, -vishal
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 6 by: Toby Burnett, on 2010-01-18 23:13:58.126879+00:00 ]
This was on linux.
So I guess the only issue is a slight delay after starting the ipcontroller. I'll try that, thanks.Looking at the ipcluster code, (version 0.10) I see that the ssh mode is not supported for windows to linux, a case that we would like to use. Hopefully with the new version when you get it to work>
[ LP comment 7 by: Brian Granger, on 2010-01-18 23:25:06+00:00 ]
Is there a ssh daemon that is usable on Windows. I now about putty
for client ssh and we could use
that. Not sure if users would have an ssh daemon on Windows though.
For Windows, the best
solution is to use the Windows HPC 2008 OS and its builtin job
scheduler (IPython has very good support for this).
Only downside is the cost of the OS ;(Brian
On Mon, Jan 18, 2010 at 3:13 PM, Toby Burnett tburnett@uw.edu wrote:
This was on linux. So I guess the only issue is a slight delay after starting the ipcontroller. I'll try that, thanks.
Looking at the ipcluster code, (version 0.10) I see that the ssh mode is not supported for windows to linux, a case that we would like to use. Hopefully with the new version when you get it to work>
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 8 by: Vishal Vatsa, on 2010-01-18 23:39:09+00:00 ]
I have used cygwin and openssh to get a shell on winXP even X11
portfowarding in cygwin work :)2010/1/18 Brian Granger ellisonbg@gmail.com">ellisonbg@gmail.com:
Is there a ssh daemon that is usable on Windows. I now about putty for client ssh and we could use that. Not sure if users would have an ssh daemon on Windows though. For Windows, the best solution is to use the Windows HPC 2008 OS and its builtin job scheduler (IPython has very good support for this). Only downside is the cost of the OS ;(
Brian
On Mon, Jan 18, 2010 at 3:13 PM, Toby Burnett tburnett@uw.edu">tburnett@uw.edu wrote:
This was on linux. So I guess the only issue is a slight delay after starting the ipcontroller. I'll try that, thanks.
Looking at the ipcluster code, (version 0.10) I see that the ssh mode is not supported for windows to linux, a case that we would like to use. Hopefully with the new version when you get it to work>
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D. Assistant Professor of Physics Cal Poly State University, San Luis Obispo bgranger@calpoly.edu ellisonbg@gmail.com
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a bug assignee.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
[ LP comment 9 by: Brian Granger, on 2010-01-19 00:00:11+00:00 ]
What about non-cygwin Windows?
On Mon, Jan 18, 2010 at 3:39 PM, Vishal Vatsa vishal.vatsa@gmail.com wrote:
I have used cygwin and openssh to get a shell on winXP even X11 portfowarding in cygwin work :)
2010/1/18 Brian Granger ellisonbg@gmail.com">ellisonbg@gmail.com:
Is there a ssh daemon that is usable on Windows. I now about putty for client ssh and we could use that. Not sure if users would have an ssh daemon on Windows though. For Windows, the best solution is to use the Windows HPC 2008 OS and its builtin job scheduler (IPython has very good support for this). Only downside is the cost of the OS ;(
Brian
On Mon, Jan 18, 2010 at 3:13 PM, Toby Burnett tburnett@uw.edu wrote:
This was on linux. So I guess the only issue is a slight delay after starting the ipcontroller. I'll try that, thanks.
Looking at the ipcluster code, (version 0.10) I see that the ssh mode is not supported for windows to linux, a case that we would like to use. Hopefully with the new version when you get it to work>
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D. Assistant Professor of Physics Cal Poly State University, San Luis Obispo bgranger@calpoly.edu ellisonbg@gmail.com
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a bug assignee.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 10 by: Toby Burnett, on 2010-01-19 15:56:55.304633+00:00 ]
About ssh on windows, we use the cygwin version, but not in the cygwin bash shell.
C:\Users\burnett>ssh -V
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004I tried a version of my script that starts an ipcontroller, then 16 ipengines on each of the 4 machines. It I delay after the ipcontroller, I have the same problem: 2-3 engines don't get started per machine. However, a 100 ms delay in that loop that creates the engines works just fine.
This seems inconsistent with an assertion about how the engines connect to a controller.
[ LP comment 11 by: Vishal Vatsa, on 2010-01-19 16:30:54+00:00 ]
Would you mind sending me a copy of your script.
Also, is the setup like:
ipcontroller is on windows and ipengines are on linux-v
2010/1/19 Toby Burnett tburnett@uw.edu:
About ssh on windows, we use the cygwin version, but not in the cygwin bash shell. C:\Users\burnett>ssh -V OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
I tried a version of my script that starts an ipcontroller, then 16 ipengines on each of the 4 machines. It I delay after the ipcontroller, I have the same problem: 2-3 engines don't get started per machine. However, a 100 ms delay in that loop that creates the engines works just fine.
This seems inconsistent with an assertion about how the engines connect to a controller.
-- ipcluster does not start all the engines https://bugs.launchpad.net/bugs/509015 You received this bug notification because you are a bug assignee.
Status in IPython - Enhanced Interactive Python: New
Bug description: As reported on the mailing list...
---------- Forwarded message ---------- From: Toby Burnett <tburnett@EMAIL-REMOVED> Date: Sat, Jan 16, 2010 at 8:58 AM Subject: [IPython-user] ipcluster does not start all the engines To: "ipython-user@scipy.org" ipython-user@scipy.org
Hi, I did not find any previous notes on this. I have a cluster of 4 machines, each with 8 hyperthreaded cores, so I can run 16 engines per machine, or 64 in all. It is amazingly easy and useful, thanks so much for providing this.
However, when using ipcluster on one of these machines in ssh mode, with this clusterfile, send_furl = False engines = { 'tev1' : 16, 'tev2' : 16, 'tev3' : 16, 'tev4' : 16 }
I typically get about 50 engines to actually start. Since there seems to be no log file for ipcluster (in spite of code that seems like it should record which engines it tried to start), I can't send that. The ipcontroller log file looks fine, except for recording fewer than the 64 engines that I expected.
I have an alternative, very klugy method that starts a controller, then executes 64 ssh commands to the respective machines to simply run ipengine. I found the same problem, which went away when I introduced a 1 second delay after each ssh call, which of course takes more than a minute to run, and leaves all those ssh processes running.
So I suspect that the same thing would work in the loop in this method of ipcluster.SSHEngineSet
def _ssh_engine(self, hostname, count): exec_engine = "ssh %s sh %s/%s-sshx.sh %s" % ( hostname, self.temp_dir, os.environ['USER'], self.engine_command ) cmds = exec_engine.split() dlist = [] log.msg("about to start engines...") for i in range(count): log.msg('Starting engines: %s' % exec_engine) d = getProcessOutput(cmds[0], cmds[1:], env=os.environ) dlist.append(d) return gatherBoth(dlist, consumeErrors=True)
but that would be inelegant, given that the real problem is probably related to the controller not responding properly to multiple requests.
Thanks for looking at this.
--Toby Burnett
Please log in to comment.[ LP comment 12 by: Toby Burnett, on 2010-01-19 18:40:49.459167+00:00 ]
Here is the script, with an attempt to use ipcluster ssh commented out. The 64-engine case is run on one of the same nodes.
def setup_mec(engines=None, machines='tev1 tev2 tev3 tev4'.split()):
""" On windows:start cluster and 4 engines on the local machine, in the current directory On linux: (our tev cluster) start controller on local machine, 16 engines/machine in all """ if os.name=='nt': engines = engines or 4 os.system(r'start /MIN /D %s cmd /K python C:\python25\scripts\ipcluster local -xy -n %d'% (os.getcwd(),engines)) else: # on a tev machine engines = engines or 16 #default on a tev machine! #clusterfile_data='send_furl = False'\ # + '\nengines={'\ # + '\n'.join(['\t"%s" : %d,'%(m,engines) for m in machines])\ # + '\n}' #print 'cluster info:\n%s' % clusterfile_data #ofile=open('clusterfile', 'w') #ofile.writelines(clusterfile_data) #ofile.close() #os.system('ipcluster ssh -xy --clusterfile clusterfile &') # old, klugy way os.system('ipcontroller local -xy&') for m in machines: for i in range(engines): time.sleep(0.1) # make sure the controller is started ? os.system('ssh %s ipengine&'% m) # this assumes that the environment is setup with non-interactive login -
17 comments Created 14 days ago by ipythonfperezprio-highunicode bug - encoding inputmilestone-0.11Original Launchpad bug 339642: https://bugs.launchpad.net/ipython/+bug/339642
Reported by: vsevolod-solovyov (Murkt).Default Python shell:
u'абвгд' u'\u0430\u0431\u0432\u0433\u0434'
IPython 0.9.1:
u'абвгд' u'\xd0\xb0\xd0\xb1\xd0\xb2\xd0\xb3\xd0\xb4'
'абвгд'.decode('utf8') u'\u0430\u0431\u0432\u0433\u0434'sys.stdin.encoding is 'UTF-8'.
How to fix: remove the line №2022 from IPython/iplib.py (for 0.9.1 release). Here it is:
--- a/iplib.py +++ b/iplib.py @@ -2019,7 +2019,6 @@
# this allows execution of indented pasted code. It is tempting # to add '\n' at the end of source to run commands like ' a=1' # directly, but this fails for more complicated scenariossource=source.encode(self.stdin_encoding) if source[:1] in [' ', '\t']: source = 'if 1:\n%s' % source
I didn't find any intoduced bugs by a quick check.
Additionaly, I checked ipython-wx and ipythonx - latter doesn't have this bug.
Comments
[ LP comment 1 by: Murkt, on 2009-03-08 20:07:25.828411+00:00 ]
This line in trunk: http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/IPython//iplib.py#L2031
[ LP comment 2 by: Murkt, on 2009-03-08 20:54:18.976119+00:00 ]
This bug was noticed in 2006 year: http://lists.ipython.scipy.org/pipermail/ipython-dev/2006-August/002305.html
[ LP comment 3 by: Sergey Kishchenko, on 2009-03-09 11:57:58.714729+00:00 ]
I confirm this bug. Attached patch fixed the issue for me
[ LP comment 4 by: Laurent Dufrechou, on 2009-03-17 20:20:24.848465+00:00 ]
also related :
https://bugs.launchpad.net/bugs/290677
[ LP comment 5 by: Fernando Perez, on 2009-03-17 20:24:00.727454+00:00 ]
That's indeed a bug, but the patch is removing a line that was put in there explicitly for some reason. So what I'd like to have, before committing this, is a set of tests in a file named test_unicode.py, that encapsulates all of the recent unicode work.
Unfortunately a lot of these unicode fixes have been made in a completely ad-hoc manner, as people report problems, but we don't have a centralized list of cases to check against. His may be a reasonable fix, for all I know, but I'm afraid that if we apply it we'll get back 10 old bugs again. I don't know, maybe not, but there's simply no way to be sure.
I'm one of the most ignorant of our bunch in unicode issues, blissfully living in the stupidity of the ascii world. It would be great if one of us who knows more about this stuff could at least write a set of simple unicode tests that catch many of the recently reported encoding problems. Jorgen, Ville, any chance you guys could take this up at some point? You know about it a lot more than I do...
[ LP comment 6 by: Jörgen Stenarson, on 2009-03-17 20:28:38.963967+00:00 ]
The proposed patch does not work for me on win32 with or without pyreadline
sys.stdin.encoding == "cp1252"
Standard python:
c:\python>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
"åäö" '\xe5\xe4\xf6' u"åäö" u'\xe5\xe4\xf6'
IPython from trunk:
c:\python>ipython
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.In [1]: "åäö"
Out[1]: '\xe5\xe4\xf6'In [2]: u"åäö"
Out[2]: u'\xe5\xe4\xf6'In [3]:
Do you really want to exit ([y]/n)?IPython with proposed change:
c:\python>ipython
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.In [1]: "åäö"
Out[1]: '\xc3\xa5\xc3\xa4\xc3\xb6'In [2]: u"åäö"
Out[2]: u'\xe5\xe4\xf6'In [3]:
Do you really want to exit ([y]/n)?
[ LP comment 7 by: Rodrigo Senra, on 2009-03-24 03:46:20.603219+00:00 ]
This bugis still live and kicking.
The problem is in iplib.py: source=source.encode(self.stdin_encoding)This is wrong whenever there is a unicode string in source.
A simple:
x = u"ação"
with the offending line becomes:
x = u'a\xc3\xa7\xc3\xa3o'
Notice that the encoding is done inplace,and the u"" is kept after the encoding. This is wrong.
I have removed the line, and it is now working for me. Do not know enough of IPython internals to predict side effects. I hope this helps.
regards,
Rod Senra
[ LP comment 8 by: INADA Naoki, on 2009-04-12 00:25:48.950763+00:00 ]
This is another patch that handle encoded byte string literal and unicode literal correctly.
source=source.encode(self.stdin_encoding) if source[:1] in [u' ', u'\t']: source = u'if 1:\n%s' % sourcesource = '# coding: %s\n%s' % (self.stdin_encoding, source)
[ LP comment 9 by: Fernando Perez, on 2009-04-14 07:20:50+00:00 ]
Can anyone provide a set of tests that we can actually run
automatically for this? Honestly, until we have actual tests, this is
like playing whack-a-mole blind: the problems will just keep
resurfacing... What we need is a test file for unicode that can be
run reliably, by anyone, and that shows the various issues...As I said earlier, it's quite possible that the various proposed fixes
work for someone, but without actual tests that we can include,
there's no way to know what they may break for someone else (as has
happened in the past).Sorry to seem like a curmudgeon: I really appreciate people
contributing ideas and even code. But we need to fix these unicode
problems the right way, else we'll be hunting them forever.[ LP comment 10 by: Brian Granger, on 2009-04-14 17:38:38+00:00 ]
Definitely, I don't like playing whack-a-mole blind. These types of
bug fixes definitely need tests before fixes get commited.Brian
On Tue, Apr 14, 2009 at 12:20 AM, Fernando Perez fperez.net@gmail.com wrote:
Can anyone provide a set of tests that we can actually run automatically for this? Honestly, until we have actual tests, this is like playing whack-a-mole blind: the problems will just keep resurfacing... What we need is a test file for unicode that can be run reliably, by anyone, and that shows the various issues...
As I said earlier, it's quite possible that the various proposed fixes work for someone, but without actual tests that we can include, there's no way to know what they may break for someone else (as has happened in the past).
Sorry to seem like a curmudgeon: I really appreciate people contributing ideas and even code. But we need to fix these unicode problems the right way, else we'll be hunting them forever.
-- unicode bug - encoding input https://bugs.launchpad.net/bugs/339642 You received this bug notification because you are a member of IPython Developers, which is subscribed to IPython.
Status in IPython - Enhanced Interactive Python: New
Bug description: Default Python shell:
u'абвгд' u'\u0430\u0431\u0432\u0433\u0434'
IPython 0.9.1:
u'абвгд' u'\xd0\xb0\xd0\xb1\xd0\xb2\xd0\xb3\xd0\xb4' 'абвгд'.decode('utf8') u'\u0430\u0431\u0432\u0433\u0434'
sys.stdin.encoding is 'UTF-8'.
How to fix: remove the line No.2022 from IPython/iplib.py (for 0.9.1 release). Here it is:
--- a/iplib.py +++ b/iplib.py @@ -2019,7 +2019,6 @@
# this allows execution of indented pasted code. It is tempting # to add '\n' at the end of source to run commands like ' a=1' # directly, but this fails for more complicated scenariossource=source.encode(self.stdin_encoding) if source[:1] in [' ', '\t']: source = 'if 1:\n%s' % source
I didn't find any intoduced bugs by a quick check.
Additionaly, I checked ipython-wx and ipythonx - latter doesn't have this bug.
-- Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com[ LP comment 11 by: Jörgen Stenarson, on 2009-04-14 18:16:27+00:00 ]
Fernando Perez skrev:
Can anyone provide a set of tests that we can actually run automatically for this? Honestly, until we have actual tests, this is like playing whack-a-mole blind: the problems will just keep resurfacing... What we need is a test file for unicode that can be run reliably, by anyone, and that shows the various issues...
As I said earlier, it's quite possible that the various proposed fixes work for someone, but without actual tests that we can include, there's no way to know what they may break for someone else (as has happened in the past).
Sorry to seem like a curmudgeon: I really appreciate people contributing ideas and even code. But we need to fix these unicode problems the right way, else we'll be hunting them forever.
I agree, but part of the problem here is that part of the problem is to
have the correct visual output in the shell and this may be difficult to
check automatically. I have a feeling that this problem is also platform
dependent making it necessary to run the tests on several platforms as
well to see that the bug has been fixed./Jörgen
[ LP comment 12 by: Fernando Perez, on 2009-04-14 21:58:00+00:00 ]
On Tue, Apr 14, 2009 at 11:16 AM, Jörgen Stenarson
jorgen.stenarson@bostream.nu wrote:
Fernando Perez skrev:
I agree, but part of the problem here is that part of the problem is to have the correct visual output in the shell and this may be difficult to check automatically. I have a feeling that this problem is also platform dependent making it necessary to run the tests on several platforms as well to see that the bug has been fixed.
Well, even if we have a special file we need to re-run by hand, that
would be better than little snippets as we have. At least the file
can be run by the test suite automatically and not crashing is a good
start. Core developers can then re-run it by hand (we can put an "if
__name__" main section at the bottom for this) to check visually. This is basically what we are doing now with snippets all over the
mailing list, I'm just suggesting that unless all those checks are:- collected in one file
- auto-executed
we'll never get anywhere reliable on these unicode problems. We can
then have a note to manually do%run test_unicode
ourselves for the full visual verification.
Cheers,
f
[ LP comment 13 by: gdamjan, on 2009-05-02 01:04:38.272380+00:00 ]
I can confirm this bug and the sollution given.
Now obviously the bug is in the input handling of ipython .. how do you make test cases for that??
[ LP comment 14 by: Andy Mikhailenko, on 2009-05-14 20:52:29.106176+00:00 ]
Confirming. "UTF-8" in all cases, IPython prints screwed up "unicode" strings and this renders the program almost unusable.
Anyone got ideas about how to test this? I guess IPython developers possess a bit more knowledge of the immense innards of the package than reporters of the bug do, so users could expect at least some guidelines for writing tests, could they?
Maybe we should allow to tune bug-related behaviour in user settings until the bug is finally fixed? This may also help with testing.
[ LP comment 15 by: pawciobiel, on 2009-09-04 00:24:55.923328+00:00 ]
Confirming.
core/iplib.py
2201
--- source=source.encode(self.stdin_encoding)Apart of the above, shouldn't the input be decoded if it's not unicode?
(Similar issue was in python2.5/code.py) core/iplib.py
2332,2334d2330
< line = raw_input_original(prompt)
< if not isinstance(line, unicode):
< line = line.decode(self.stdin_encoding)cheers,
[ LP comment 16 by: INADA Naoki, on 2009-10-08 03:52:22.535452+00:00 ]
I manage to fix this bug in Python side: http://bugs.python.org/issue5911
But if the python issue is fixed in Python 2.7, this problem is still in Python 2.6 and lower.Please log in to comment.[ LP comment 17 by: t0ster, on 2010-04-26 16:45:21.798105+00:00 ]
Patches worked for me, removing 'source=source.encode(self.stdin_encoding)' helped in Mac OS X 10.6
Thanks
-
Original Launchpad bug 503903: https://bugs.launchpad.net/ipython/+bug/503903
Reported by: ellisonbg (Brian Granger).The find_job_cmd function at line 565 of launcher.py fails on line 560 when the Windows HPC stuff is not installed.
But find_job_cmd is called at import (always), so it fails.We should probably just return 'job' if find_cmd('job') fails.
This is only used on Windows.
def find_job_cmd():
if os.name=='nt': return find_cmd('job') else: return 'job'Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonmilestone-0.11generics.complete_object brokenprio-criticalOriginal Launchpad bug 527968: https://bugs.launchpad.net/ipython/+bug/527968
Reported by: dsdale24 (Darren Dale).generics.complete_object appears to be broken in the trunk (0.11alpha). It keeps returning TryNext in situations where it should not. As a result, it is proving to be very difficult to support some custom completers with the forthcoming ipython-0.11:
In [12]: generics.complete_object('foo', dir('foo'))
TryNext Traceback (most recent call last)
/Users/darren/Projects/phynx.git/ in ()
/Users/darren/Projects/ipython/IPython/external/simplegeneric.pyc in dispatch(*args, **kw)
73 f = _gbt(t, _sentinel) 74 if f is not _sentinel:---> 75 return f(*args, **kw)
76 else: 77 return func(*args, **kw)/Users/darren/Projects/ipython/IPython/utils/generics.pyc in complete_object(obj, prev_completions)
60 own_attrs + prev_completions. 61 """---> 62 raise TryNext
63 64TryNext:
Comments
Please log in to comment. -
Offer finer control for initialization of input streams
0 comments Created 14 days ago by ipythonOriginal Launchpad bug 337002: https://bugs.launchpad.net/ipython/+bug/337002
Reported by: fdo.perez (Fernando Perez).For details, see:
https://mail.enthought.com/pipermail/enthought-dev/2009-March/020086.html
For embedding in GUI toolkits, we need finer control over raw_input at ipython startup time.
Comments
Please log in to comment. -
6 comments Created 14 days ago by ipythoncPickle works in standard interpreter, but not in IPythonprio-highOriginal Launchpad bug 363115: https://bugs.launchpad.net/ipython/+bug/363115
Reported by: reckoner (reckoner).for example:
In IPython:
class Mylist(list):
def __init__(self,x=[]): list.__init__(self,x)from cPickle import dumps w=Mylist([1,2,3]) dumps(w)
PicklingError: Can't pickle : attribute
lookup main.Mylist failedHowever, using the standard Python interpreter:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
from cPickle import dumps class Mylist(list): ... def init(self,x=[]): ... list.init(self,x) ... w=Mylist([1,2,3]) dumps(w) 'ccopy_reg\n_reconstructor\np1\n(cmain\nMylist\np2\ncbuiltin\nlist\np3\n (lp4\nI1\naI2\naI3\natRp5\n.'
Comments
[ LP comment 1 by: avdd, on 2009-07-16 03:48:57.797382+00:00 ]
Has nothing to do with pickle, but the FakeModule that is registered as main:
$ python Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys sys.modules[name].foo = 1 foo 1
a$ ipython
In [1]: import sys
In [2]: sys.modules[name].foo = 1
In [3]: foo
NameError Traceback (most recent call last)
/home/avdd/ in ()
NameError: name 'foo' is not defined
In [4]:
[ LP comment 2 by: Matt Hickford, on 2009-07-18 19:36:43.821085+00:00 ]
I have problem that neither pickle nor cPickle work in ipython (but work in python proper).
In my case pickle.dump works but pickle.
This is Jaunty, Python 2.6
My error:
AttributeError: 'FakeModule' object has no attribute 'Dictionary'(I have a custom class inherited from list called Dictionary)
[ LP comment 3 by: Ville M. Vainio, on 2009-07-18 20:11:20+00:00 ]
On Sat, Jul 18, 2009 at 10:36 PM, Matt
Hickfordmatt.hickford+launchpad@gmail.com wrote:
I have problem that neither pickle nor cPickle work in ipython (but work in python proper).
In my case pickle.dump works but pickle.
I think you'll note that pickle works when the class of the pickleable
object is not declared interactively, but rather imported from module.-- Ville M. Vainio
http://tinyurl.com/vainio[ LP comment 4 by: reckoner, on 2009-07-19 23:50:39+00:00 ]
If you get the class using the %run magic instead of importing, you DO
get the pickle failure. I don't know if doing %run is the same as
defining a class interactively, though.Any guidance appreciated.
thanks.
On Sat, Jul 18, 2009 at 1:11 PM, Ville M. Vainiovivainio@gmail.com wrote:
On Sat, Jul 18, 2009 at 10:36 PM, Matt Hickfordmatt.hickford+launchpad@gmail.com wrote:
I have problem that neither pickle nor cPickle work in ipython (but work in python proper).
In my case pickle.dump works but pickle.
I think you'll note that pickle works when the class of the pickleable object is not declared interactively, but rather imported from module.
-- Ville M. Vainio http://tinyurl.com/vainio
-- cPickle works in standard interpreter, but not in IPython https://bugs.launchpad.net/bugs/363115 You received this bug notification because you are a direct subscriber of the bug.
Status in IPython - Enhanced Interactive Python: Confirmed
Bug description:
for example:
In IPython:
class Mylist(list): def init(self,x=[]): list.init(self,x)
from cPickle import dumps w=Mylist([1,2,3]) dumps(w)
PicklingError: Can't pickle : attribute lookup main.Mylist failed
However, using the standard Python interpreter:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from cPickle import dumps class Mylist(list): ... def init(self,x=[]): ... list.init(self,x) ... w=Mylist([1,2,3]) dumps(w) 'ccopy_reg\n_reconstructor\np1\n(cmain\nMylist\np2\ncbuiltin\nlist\np3\n (lp4\nI1\naI2\naI3\natRp5\n.'
[ LP comment 5 by: eteq, on 2009-12-17 01:34:20.367155+00:00 ]
I've encountered this in the past - I always just define any class I want to pickle in a file and then reload the module as necessary instead of pickling outputs from run or interactively-defined objects. That seems safer anyway - otherwise if you restart the interpreter, the methods on the object are forgotten.
It seems to work fine if you pickle from a file and then load that file with an interactively-defined or defined in "run" version, though.
Please log in to comment.[ LP comment 6 by: Zak Stone, on 2009-12-17 03:02:24.672555+00:00 ]
For me, a similar problem arises when I am simply unpickling dictionaries in ipython -- no custom classes involved.
-
readline in OS X does not have correct key bindings
0 comments Created 14 days ago by ipythonOriginal Launchpad bug 516716: https://bugs.launchpad.net/ipython/+bug/516716
Reported by: ben-j-schiller (thesylex).I'm using OS X 10.5.8, and have installed Python 2.6.4 (not using the built-in version). I have confirmed the same problem with OS X 10.6.2. I compiled iPython 0.10 against Python 2.6.4, and the following keys do not work: home, end, page up page down (for history searching), ctrl/esc + left/right for word navigation.
Here's a fix (for default ipythonrc)
readline_parse_and_bind "\e[1~": beginning-of-line
readline_parse_and_bind "\e[4~": end-of-line
readline_parse_and_bind "\e[5~": history-search-backward
readline_parse_and_bind "\e[6~": history-search-forward
readline_parse_and_bind "\e[5C": forward-word
readline_parse_and_bind "\e[5D": backward-word
readline_parse_and_bind "\e\e[C": forward-word
readline_parse_and_bind "\e\e[D": backward-wordThese are the standard key bindings and should be compatible with all *nix systems (someone please test linux). Note that these are not the standard OS X key bindings in Terminal, but should be compatible with them. In particular, Terminal uses shift+page up/down instead of page up/down for the escape codes I used. I gave the forward/backword-word bindings for OS X and linux. Home/end are simply disabled in Terminal by default and people will have to fix that themselves.
Also, the implementation in ipython of up/down for history searching is non-standard. I recommend using page up/down as I have it here, and changing up/down to use all of history. I can see by the comments that people have already complained about this....
Comments
Please log in to comment. -
0 comments Created 14 days ago by ipythonfperezprio-lowIssues in magic_whos codemilestone-0.11Original Launchpad bug 509043: https://bugs.launchpad.net/ipython/+bug/509043
Reported by: gokhansever (Gokhan Sever).1-) In .../IPython/core/magic.py looking at the magic_whos code:
You still mention of Numeric. Shouldn't these instances be cleared both in code and documentation providing that you drop support for Python 2.4 and below?
2-) Lines 966-967 in magic.py:
# for these types, show len() instead of data: seq_types = [types.DictType,types.ListType,types.TupleType]with a sample code:
In [18]: ll = range(10)
In [19]: whos
Variable Type Data/Info
a InteractiveShell <InteractiveShell('ipython.component0')>
b NoneType None
ll list [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]From this, either the comment or the output of the whos needs to be updated.
Python version: 0.11.bzr.r1346
Platform info : os.name -> posix, sys.platform -> linux2
: Linux-2.6.31.9-174.fc12.i686.PAE-i686-with-fedora-12-ConstantinePython info : 2.6.2 (r262:71600, Aug 21 2009, 12:22:21) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)]
Comments
Please log in to comment. -
1 comment Created 14 days ago by ipythondreload produces spurious traceback when numpy is involvedprio-mediumOriginal Launchpad bug 306805: https://bugs.launchpad.net/ipython/+bug/306805
Reported by: fdo.perez (Fernando Perez).Original report by Robin on the ipython user list is below.
I see the problem by using dreload(), but I can't reproduce it by manually calling the pieces of the code that break in that traceback. Will need to investigate further; there's a slim chance it's a problem in numpy's machinery that tries to detect that it's being imported from the build directory.
Original report:
From: Robin robince@gmail.com">robince@gmail.com
Date: Fri, Dec 5, 2008 at 10:12 AM
Subject: [IPython-user] dreload numpy - source dir error
To: "ipython-user@scipy.org" ipython-user@scipy.orgHi,
I thought I had seen this come up but I can't find it - so sorry if it has...
I have an error using dreload with numpy... I get the error about
importing numpy in the source directory whenever I try to dreload
something that uses numpy. For the most part it does seem to work (I'm
not changing numpy - its my own code I'm trying to dreload) but the
long trace back is a bit annoying because it breaks the list of
results when scrolling through the history...Anyway here is an example:
robin-mbp:amaripool robince$ ipython
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
Type "copyright", "credits" or "license" for more information.IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import numpy
In [2]: reload numpy
------> reload(numpy) Out[2]: In [3]: dreload numpy
------> dreload(numpy) Reloading numpy
Reloading numpy.numpy
Reloading numpy.show
ImportError Traceback (most recent call last)
/Users/robince/phd/amaripool/ in ()
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/deep_reload.pyc in reload(module, exclude)
179 builtin.import = deep_import_hook 180 try: --> 181 ret = deep_reload_hook(module) 182 finally: 183 builtin.import = original_import/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/deep_reload.pyc in deep_reload_hook(module)
157 name = module.name 158 if '.' not in name: --> 159 return import_module(name, name, None) 160 i = name.rfind('.') 161 pname = name[:i]/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/deep_reload.pyc in import_module(partname, fqname, parent)
145 146 try: --> 147 m = imp.load_module(fqname, fp, pathname, stuff) 148 finally: 149 if fp: fp.close()/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/init.pyc in ()
119 its source directory; please exit the numpy source tree, and relaunch
120 your python intepreter from there.""" --> 121 raise ImportError(msg) 122 from version import version as version 123ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch your python intepreter from there.Cheers
Robin
Comments
Please log in to comment.[ LP comment 1 by: eteq, on 2009-09-04 00:41:46.232025+00:00 ]
This is happening for me as well in 0.10 - it's pretty annoying in that it renders dreload (a very useful function) essentially useless. It doesn't even work to do dreload(somemodulethatusesnumpy,exclude=['numpy','numpy.numpy','numpy.show'])
-
1 comment Created 14 days ago by ipythonfperezprio-highThe skip_doctest decorator is failing to work on Shell.MatplotlibShellBase.magic_runmilestone-0.11Original Launchpad bug 366209: https://bugs.launchpad.net/ipython/+bug/366209
Reported by: ellisonbg (Brian Granger).The skip_doctest decorator should cause the Shell.MatplotlibShellBase.magic_run method to be skipped for doctesting. But it isn't. Hmmm.
Comments
-
Original Launchpad bug 462980: https://bugs.launchpad.net/ipython/+bug/462980
Reported by: unpingco (Jose Unpingco).When I do a non-blocking pendingResult, how can I check how many are actually done? in other words, doing
In[10]: pr.get_result()
locks up if there is even one result that is not completed yet. Is it possible to do something that would collect the results, if they are available, and not lock up on whichever of the engines that are not done yet?
Comments
Please log in to comment. -
2 comments Created 14 days ago by ipythonstderr missing in IPython + Emacs + WinXPprio-lowOriginal Launchpad bug 237204: https://bugs.launchpad.net/ipython/+bug/237204
Reported by: jietang86 (Jie Tang).WinXP Pro SP2
Emacs 22.1
ipython.el
python-mode.elstderr doesn't show up when using IPython with ipython.el inside Emacs.
e.g.:
In [2]: from sys import stderr,stdout
In [3]: stdout.write('\nfoo\n')
foo
In [4]: stderr.write('\nbar\n')
In [5]:
It seems like sys.stderr has some buffering issues; if I flush the stream using stderr.flush() after writing to it the text displays.
In [6]: stderr.flush()
bar
In [7]:
As a workaround I added calls to
Term.cout.flush()
Term.cerr.flush()right before IPython's "In[]" input prompt is displayed (around line 1675 in iplib.py)
Comments
[ LP comment 1 by: Joe Covalesky, on 2008-06-06 17:39:46.864436+00:00 ]
This workaround didn't fix this problem for me.
WinXP Pro SP2
Emacs 22.1.1
ipython.el 2927
python-mode.el 4.75
pyreadline 1.3 or trunk (post-1.5)Please log in to comment.[ LP comment 2 by: Brian Granger, on 2009-04-14 20:21:09.437714+00:00 ]
Any thoughts on this from Windows/Emacs users?
- ellisonbg▾
- fperez▾
- gael-varoquaux▾
- milestone-0.11▾
- prio-critical▾
- prio-high▾
- prio-low▾
- prio-medium▾
- villemvainio▾
- vvatsa▾
- wishlist▾
- Apply to Selection
-
Change Color…
Previewpreview
- Rename…
- Delete



