From zeitlinie at yahoo.de Thu May 1 03:48:58 2014 From: zeitlinie at yahoo.de (Zeitlinie) Date: Thu, 01 May 2014 09:48:58 +0200 Subject: [IPython-dev] Mayavi broken TraitError Message-ID: <5361FC6A.1090502@yahoo.de> Does anyone on this list use Mayavi for 3D visualization? For me the new version I had to move to is broken. Trying to just open a figure like from mayavi import mlab as ml ml.figure() fails with the error msgs. appended. If you need a more detailed traceback pls. let me know. I'm running opensuse 13.1 with the following p Mayavi related packages installed: python-mayavi-4.3.1-1.6.x86_64 python-mayavi-doc-4.3.1-1.6.x86_64 vtk-6.0.0-3.1.4.x86_64 python-tvtk-4.3.1-1.6.x86_64 vtkdata-6.0.0-2.1.2.noarch python-vtk-qt-6.0.0-3.1.4.x86_64 python-evtk-0.2.0-1.6.x86_64 python-vtk-6.0.0-3.1.4.x86_64 vtk-java-6.0.0-3.1.4.x86_64 vtk-devel-6.0.0-3.1.4.x86_64 vtk-qt-6.0.0-3.1.4.x86_64 vtk-tcl-6.0.0-3.1.4.x86_64 vtk-examples-6.0.0-3.1.4.x86_64 python-traits-4.3.0-4.3.x86_64 python-traitsui-4.3.0-4.25.noarch Any help would be most appreciated. Mark ========== Error msgs. ================= TraitError: The 'input' trait of a PolyDataMapper instance is 'read only'. In [3]: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/tvtk/messenger.py", line 308, in send _messenger.send(obj, event, *args, **kw_args) File "/usr/lib64/python2.7/site-packages/tvtk/messenger.py", line 249, in send getattr(inst, meth)(source, event, *args, **kw_args) File "/usr/lib64/python2.7/site-packages/tvtk/tvtk_base.py", line 456, in update_traits setattr(self, name, val) File "/usr/lib64/python2.7/site-packages/traits/trait_handlers.py", line 170, in error value ) TraitError: The 'alpha_bit_planes' trait of a XOpenGLRenderWindow instance must be 'f' or 'false' or 'n' or 'no' or 'off' or 'on' or 't' or 'true' or 'y' or 'yes' or 0 or 1, but a value of 8 was specified. If you suspect this is an IPython bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at ipython-dev at scipy.org You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it. Extra-detailed tracebacks for bug-reporting purposes can be enabled via: %config Application.verbose_crash=True Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/tvtk/pyface/ui/wx/scene.py", line 535, in OnPaint self.light_manager = light_manager.LightManager(self) File "/usr/lib64/python2.7/site-packages/tvtk/pyface/light_manager.py", line 351, in __init__ light = CameraLight(self.renwin) File "/usr/lib64/python2.7/site-packages/tvtk/pyface/light_manager.py", line 167, in __init__ self.glyph = LightGlyph() File "/usr/lib64/python2.7/site-packages/tvtk/pyface/light_manager.py", line 59, in __init__ tf.input = arrow.output File "/usr/lib64/python2.7/site-packages/traits/trait_handlers.py", line 102, in _read_only name, class_of( object ) ) TraitError: The 'input' trait of a TransformFilter instance is 'read only'. If you suspect this is an IPython bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at ipython-dev at scipy.org You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it. Extra-detailed tracebacks for bug-reporting purposes can be enabled via: %config Application.verbose_crash=True From arnd.baecker at web.de Thu May 1 04:26:16 2014 From: arnd.baecker at web.de (Arnd Baecker) Date: Thu, 1 May 2014 10:26:16 +0200 (CEST) Subject: [IPython-dev] Mayavi broken TraitError In-Reply-To: <5361FC6A.1090502@yahoo.de> References: <5361FC6A.1090502@yahoo.de> Message-ID: Hi, On Thu, 1 May 2014, Zeitlinie wrote: > Does anyone on this list use Mayavi for 3D visualization? A better place to ask is MayaVi users enthought-dev > For me the new version I had to move to is broken. On a SUSE machine of a colleage we also had problems installing MayaVi as somehow a recent vtk (ver 6) was installed, while the provided tvtk version did not support vtk 6. In the end installing the whole ETS (http://code.enthought.com/projects/) and a downgraded vtk did solve it somehow; I don't have the details and would not really recommmend that approach... (Note that I never encountered such type of dependency problems with *ubuntu or debian ..) Support for VTK-6.x was announced two weeks ago, so you could give installing the development version of ETS a try, see http://code.enthought.com/source/ To install this without root access to an arbitrary place you can do: export PYTHONPATH=/MYDEST/lib/python2.7/site-packages/:$PYTHONPATH python ets.py python setup.py develop --prefix=/MYDEST BTW: It seems that the bug you encounter is already described here: https://github.com/enthought/mayavi/issues/127 Best, Arnd From doug.blank at gmail.com Thu May 1 12:58:12 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 1 May 2014 12:58:12 -0400 Subject: [IPython-dev] Two frontends, one kernel Message-ID: Devs, I have been trying to find the cause of this bug for some time, and I thought that someone might be able to provide a hint as to where to look to find the issue. We have an external kernel that works very well when you connect onto it with a single frontend. But when you connect two frontends (console or notebook), then the conversation gets confused. More detail: Terminal 1: ipython console --profile calico works fine. Terminal 2: ipython console --profile calico --existing starts, but now things are confused. Now, each terminal takes turns being able to get the prompt. If run in notebook, then code execution never signals the end of computing (the [*] never turns to a number, but you can still enter and get results back). In the console, output is received, but the prompt is in the other terminal. It works fine with a single front end. Any ideas appreciated! -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Thu May 1 14:37:11 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 1 May 2014 11:37:11 -0700 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: What are your socket types on the Kernel side? On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: > Devs, I have been trying to find the cause of this bug for some time, and > I thought that someone might be able to provide a hint as to where to look > to find the issue. > > We have an external kernel that works very well when you connect onto it > with a single frontend. But when you connect two frontends (console or > notebook), then the conversation gets confused. > > More detail: > > Terminal 1: > > ipython console --profile calico > > works fine. > > Terminal 2: > > ipython console --profile calico --existing > > starts, but now things are confused. Now, each terminal takes turns being > able to get the prompt. If run in notebook, then code execution never > signals the end of computing (the [*] never turns to a number, but you can > still enter and get results back). In the console, output is received, but > the prompt is in the other terminal. > > It works fine with a single front end. > > Any ideas appreciated! > > -Doug > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Thu May 1 15:45:40 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 1 May 2014 15:45:40 -0400 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: > What are your socket types on the Kernel side? > Here is the definitions for our channels: public class ShellChannel : Channel { base(session, auth, transport, address, port, SocketType.DEALER) { } } public class IOPubChannel : Channel { base(session, auth, transport, address, port, SocketType.PUB) { } } public class ControlChannel : Channel { base(session, auth, transport, address, port, SocketType.DEALER) { } } public class StdInChannel : Channel { base(session, auth, transport, address, port, SocketType.DEALER) { } } public class HeartBeatChannel : Channel { base(session, auth, transport, address, port, SocketType.REP) { } } Could that really effect multi-frontend, but not single? -Doug > > > On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: > >> Devs, I have been trying to find the cause of this bug for some time, and >> I thought that someone might be able to provide a hint as to where to look >> to find the issue. >> >> We have an external kernel that works very well when you connect onto it >> with a single frontend. But when you connect two frontends (console or >> notebook), then the conversation gets confused. >> >> More detail: >> >> Terminal 1: >> >> ipython console --profile calico >> >> works fine. >> >> Terminal 2: >> >> ipython console --profile calico --existing >> >> starts, but now things are confused. Now, each terminal takes turns being >> able to get the prompt. If run in notebook, then code execution never >> signals the end of computing (the [*] never turns to a number, but you can >> still enter and get results back). In the console, output is received, but >> the prompt is in the other terminal. >> >> It works fine with a single front end. >> >> Any ideas appreciated! >> >> -Doug >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Thu May 1 16:01:59 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 1 May 2014 13:01:59 -0700 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: All of those DEALER sockets should be ROUTER sockets. The DEALER behavior is correct for only one peer, but it will round-robin replies if there is more than one. Clearly some documentation is wrong. Where did you get the suggestion that they should be DEALER sockets? -MinRK On Thu, May 1, 2014 at 12:45 PM, Doug Blank wrote: > On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: > >> What are your socket types on the Kernel side? >> > > Here is the definitions for our channels: > > public class ShellChannel : Channel { > base(session, auth, transport, address, port, SocketType.DEALER) { > } > } > public class IOPubChannel : Channel { > base(session, auth, transport, address, port, SocketType.PUB) { > } > } > public class ControlChannel : Channel { > base(session, auth, transport, address, port, SocketType.DEALER) { > } > } > public class StdInChannel : Channel { > base(session, auth, transport, address, port, SocketType.DEALER) { > } > } > public class HeartBeatChannel : Channel { > base(session, auth, transport, address, port, SocketType.REP) { > } > } > > Could that really effect multi-frontend, but not single? > > -Doug > > > >> >> >> On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: >> >>> Devs, I have been trying to find the cause of this bug for some time, >>> and I thought that someone might be able to provide a hint as to where to >>> look to find the issue. >>> >>> We have an external kernel that works very well when you connect onto it >>> with a single frontend. But when you connect two frontends (console or >>> notebook), then the conversation gets confused. >>> >>> More detail: >>> >>> Terminal 1: >>> >>> ipython console --profile calico >>> >>> works fine. >>> >>> Terminal 2: >>> >>> ipython console --profile calico --existing >>> >>> starts, but now things are confused. Now, each terminal takes turns >>> being able to get the prompt. If run in notebook, then code execution never >>> signals the end of computing (the [*] never turns to a number, but you can >>> still enter and get results back). In the console, output is received, but >>> the prompt is in the other terminal. >>> >>> It works fine with a single front end. >>> >>> Any ideas appreciated! >>> >>> -Doug >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Thu May 1 16:24:11 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 1 May 2014 16:24:11 -0400 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: On Thu, May 1, 2014 at 4:01 PM, MinRK wrote: > All of those DEALER sockets should be ROUTER sockets. The DEALER behavior > is correct for only one peer, but it will round-robin replies if there is > more than one. > If I change the ShellChannel to ROUTER then the kernel will no longer respond. If I change the others to ROUTER, then I don't see a difference with prior behavior. > Clearly some documentation is wrong. Where did you get the suggestion > that they should be DEALER sockets? > Probably a combination of finding what would work, and looking at other code (it is sometimes hard to translate code and docs between different ZMQ libraries). Thank you for helping me track this down! -Doug > > -MinRK > > > On Thu, May 1, 2014 at 12:45 PM, Doug Blank wrote: > >> On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: >> >>> What are your socket types on the Kernel side? >>> >> >> Here is the definitions for our channels: >> >> public class ShellChannel : Channel { >> base(session, auth, transport, address, port, SocketType.DEALER) { >> } >> } >> public class IOPubChannel : Channel { >> base(session, auth, transport, address, port, SocketType.PUB) { >> } >> } >> public class ControlChannel : Channel { >> base(session, auth, transport, address, port, SocketType.DEALER) { >> } >> } >> public class StdInChannel : Channel { >> base(session, auth, transport, address, port, SocketType.DEALER) { >> } >> } >> public class HeartBeatChannel : Channel { >> base(session, auth, transport, address, port, SocketType.REP) { >> } >> } >> >> Could that really effect multi-frontend, but not single? >> >> -Doug >> >> >> >>> >>> >>> On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: >>> >>>> Devs, I have been trying to find the cause of this bug for some time, >>>> and I thought that someone might be able to provide a hint as to where to >>>> look to find the issue. >>>> >>>> We have an external kernel that works very well when you connect onto >>>> it with a single frontend. But when you connect two frontends (console or >>>> notebook), then the conversation gets confused. >>>> >>>> More detail: >>>> >>>> Terminal 1: >>>> >>>> ipython console --profile calico >>>> >>>> works fine. >>>> >>>> Terminal 2: >>>> >>>> ipython console --profile calico --existing >>>> >>>> starts, but now things are confused. Now, each terminal takes turns >>>> being able to get the prompt. If run in notebook, then code execution never >>>> signals the end of computing (the [*] never turns to a number, but you can >>>> still enter and get results back). In the console, output is received, but >>>> the prompt is in the other terminal. >>>> >>>> It works fine with a single front end. >>>> >>>> Any ideas appreciated! >>>> >>>> -Doug >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Thu May 1 17:35:14 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 1 May 2014 14:35:14 -0700 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: ROUTER sockets use an IDENTITY prefix to determine who the recipient should be. In an IPython message, this would be the frames prior to the '' delimiter. You must send these as the beginning of the reply in order for the reply to arrive at the correct peer. -MinRK On Thu, May 1, 2014 at 1:24 PM, Doug Blank wrote: > On Thu, May 1, 2014 at 4:01 PM, MinRK wrote: > >> All of those DEALER sockets should be ROUTER sockets. The DEALER behavior >> is correct for only one peer, but it will round-robin replies if there is >> more than one. >> > > If I change the ShellChannel to ROUTER then the kernel will no longer > respond. > > If I change the others to ROUTER, then I don't see a difference with prior > behavior. > > > >> Clearly some documentation is wrong. Where did you get the suggestion >> that they should be DEALER sockets? >> > > Probably a combination of finding what would work, and looking at other > code (it is sometimes hard to translate code and docs between different ZMQ > libraries). > > Thank you for helping me track this down! > > -Doug > > >> >> -MinRK >> >> >> On Thu, May 1, 2014 at 12:45 PM, Doug Blank wrote: >> >>> On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: >>> >>>> What are your socket types on the Kernel side? >>>> >>> >>> Here is the definitions for our channels: >>> >>> public class ShellChannel : Channel { >>> base(session, auth, transport, address, port, SocketType.DEALER) { >>> } >>> } >>> public class IOPubChannel : Channel { >>> base(session, auth, transport, address, port, SocketType.PUB) { >>> } >>> } >>> public class ControlChannel : Channel { >>> base(session, auth, transport, address, port, SocketType.DEALER) { >>> } >>> } >>> public class StdInChannel : Channel { >>> base(session, auth, transport, address, port, SocketType.DEALER) { >>> } >>> } >>> public class HeartBeatChannel : Channel { >>> base(session, auth, transport, address, port, SocketType.REP) { >>> } >>> } >>> >>> Could that really effect multi-frontend, but not single? >>> >>> -Doug >>> >>> >>> >>>> >>>> >>>> On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: >>>> >>>>> Devs, I have been trying to find the cause of this bug for some time, >>>>> and I thought that someone might be able to provide a hint as to where to >>>>> look to find the issue. >>>>> >>>>> We have an external kernel that works very well when you connect onto >>>>> it with a single frontend. But when you connect two frontends (console or >>>>> notebook), then the conversation gets confused. >>>>> >>>>> More detail: >>>>> >>>>> Terminal 1: >>>>> >>>>> ipython console --profile calico >>>>> >>>>> works fine. >>>>> >>>>> Terminal 2: >>>>> >>>>> ipython console --profile calico --existing >>>>> >>>>> starts, but now things are confused. Now, each terminal takes turns >>>>> being able to get the prompt. If run in notebook, then code execution never >>>>> signals the end of computing (the [*] never turns to a number, but you can >>>>> still enter and get results back). In the console, output is received, but >>>>> the prompt is in the other terminal. >>>>> >>>>> It works fine with a single front end. >>>>> >>>>> Any ideas appreciated! >>>>> >>>>> -Doug >>>>> >>>>> _______________________________________________ >>>>> IPython-dev mailing list >>>>> IPython-dev at scipy.org >>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Fri May 2 12:04:53 2014 From: doug.blank at gmail.com (Doug Blank) Date: Fri, 2 May 2014 12:04:53 -0400 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: On Thu, May 1, 2014 at 5:35 PM, MinRK wrote: > ROUTER sockets use an IDENTITY prefix to determine who the recipient > should be. > Ok, I think I understand, but still not working. Here is some wording that (if correct) could be inserted in an expanded discussion of the wire protocol (which doesn't yet mention socket type): http://ipython.org/ipython-doc/dev/development/messaging.html#the-wire-protocol """ If you only want to implement basic functionality (one frontend per kernel, no parallel or cluster support) then using DEALER instead of ROUTER is fine, and a good place to start because you don't need the complexity of the routing protocol. You can simply leave out the routing prefixes before the delimiter in the wire protocol. If you do want more than the basic functionality (such as allowing two frontends to a kernel) then you must use the ROUTER socket type, and must have the correct routing prefixes. """ The problem is that I haven't gotten the routing to work, and it seems like it deserves some documentation. For example, watching the IPython kernel, I appear to see the following kinds of routing: message type: "kernel_info_reply", routing appears to be "SESSION_ID": *** KERNEL SENT: "['860e49d1-3852-4d9a-a623-01271cc95f21', '', '1832e7dad75f76550782d188b01d902c259da4b1d12ad9aa51c11bb756176065', '{"date":"2014-05-02T11:36:54.231974","username":"kernel","session":"a97ba32b-b539-4b37-ab2e-08076f5a9bd6","msg_id":"e4cc180a-d262-4ac8-b4e0-fbc9e49855fb","msg_type":"kernel_info_reply"}', '{"date":"2014-05-02T11:36:53.956564","username":"dblank","session":"860e49d1-3852-4d9a-a623-01271cc95f21","msg_id":"08428883-db50-401d-8601-e62fadcf38ba","msg_type":"kernel_info_request"}', '{}', '{"protocol_version":[4,1],"language_version":[2,7,5],"language":"python","ipython_version":[2,0,0,""]}']" message type: "status", routing appears to be "kernel.KERNEL_ID.status": *** KERNEL SENT: "['kernel.a5092211-ccf1-4017-bab9-58bab7d8eb52.status', '', '1a3ac6b69c87a4e5c30ea95001c86868ee1af08b4e6d953f0478f117ac6f6124', '{"date":"2014-05-02T11:37:56.826835","username":"kernel","session":"a97ba32b-b539-4b37-ab2e-08076f5a9bd6","msg_id":"fefb1c9c-8c93-4a7e-85a0-6440eda8af99","msg_type":"status"}', '{"date":"2014-05-02T11:37:56.824306","username":"dblank","session":"860e49d1-3852-4d9a-a623-01271cc95f21","msg_id":"335597c6-2101-4343-8d64-2a9d328617ef","msg_type":"execute_request"}', '{}', '{"execution_state":"busy"}']" message type: "execute_repl", routing is "execute_reply", raw data (end of message) is list of session ids: *** KERNEL SENT: "[u'execute_reply', {'status': u'ok', 'execution_count': 2, 'user_variables': {}, 'payload': [], 'user_expressions': {}}, {'parent_header': {}, 'msg_type': 'execute_request', 'msg_id': '4a153840-c5f1-4f24-813f-4585c9eb776f', 'content': {'code': '1 + 1\n', 'silent': False, 'user_variables': [], 'store_history': True, 'user_expressions': {}, 'allow_stdin': True}, 'header': {'date': datetime.datetime(2014, 5, 2, 11, 42, 50, 892870), 'username': 'dblank', 'session': '1a402950-a0bf-417d-88d3-13b6d58506c3', 'msg_id': '4a153840-c5f1-4f24-813f-4585c9eb776f', 'msg_type': 'execute_request'}, 'buffers': [], 'metadata': {}}, {'dependencies_met': True, 'engine': u'a5092211-ccf1-4017-bab9-58bab7d8eb52', 'status': u'ok', 'started': datetime.datetime(2014, 5, 2, 11, 42, 50, 896000)}, ['1a402950-a0bf-417d-88d3-13b6d58506c3']]" Am I reading this correctly? If so, then many kernel developers may stop at basic communication and use DEALER (which is fine, I guess). For those of us you want to implement the full spec (with the expectation of having parallel engines working), each of these cases will need to be dealt with, right? Thanks again! -Doug > In an IPython message, this would be the frames prior to the '' > delimiter. You must send these as the beginning of the reply in order for > the reply to arrive at the correct peer. > > -MinRK > > > On Thu, May 1, 2014 at 1:24 PM, Doug Blank wrote: > >> On Thu, May 1, 2014 at 4:01 PM, MinRK wrote: >> >>> All of those DEALER sockets should be ROUTER sockets. The DEALER >>> behavior is correct for only one peer, but it will round-robin replies if >>> there is more than one. >>> >> >> If I change the ShellChannel to ROUTER then the kernel will no longer >> respond. >> >> If I change the others to ROUTER, then I don't see a difference with >> prior behavior. >> >> >> >>> Clearly some documentation is wrong. Where did you get the suggestion >>> that they should be DEALER sockets? >>> >> >> Probably a combination of finding what would work, and looking at other >> code (it is sometimes hard to translate code and docs between different ZMQ >> libraries). >> >> Thank you for helping me track this down! >> >> -Doug >> >> >>> >>> -MinRK >>> >>> >>> On Thu, May 1, 2014 at 12:45 PM, Doug Blank wrote: >>> >>>> On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: >>>> >>>>> What are your socket types on the Kernel side? >>>>> >>>> >>>> Here is the definitions for our channels: >>>> >>>> public class ShellChannel : Channel { >>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>> } >>>> } >>>> public class IOPubChannel : Channel { >>>> base(session, auth, transport, address, port, SocketType.PUB) { >>>> } >>>> } >>>> public class ControlChannel : Channel { >>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>> } >>>> } >>>> public class StdInChannel : Channel { >>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>> } >>>> } >>>> public class HeartBeatChannel : Channel { >>>> base(session, auth, transport, address, port, SocketType.REP) { >>>> } >>>> } >>>> >>>> Could that really effect multi-frontend, but not single? >>>> >>>> -Doug >>>> >>>> >>>> >>>>> >>>>> >>>>> On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: >>>>> >>>>>> Devs, I have been trying to find the cause of this bug for some time, >>>>>> and I thought that someone might be able to provide a hint as to where to >>>>>> look to find the issue. >>>>>> >>>>>> We have an external kernel that works very well when you connect onto >>>>>> it with a single frontend. But when you connect two frontends (console or >>>>>> notebook), then the conversation gets confused. >>>>>> >>>>>> More detail: >>>>>> >>>>>> Terminal 1: >>>>>> >>>>>> ipython console --profile calico >>>>>> >>>>>> works fine. >>>>>> >>>>>> Terminal 2: >>>>>> >>>>>> ipython console --profile calico --existing >>>>>> >>>>>> starts, but now things are confused. Now, each terminal takes turns >>>>>> being able to get the prompt. If run in notebook, then code execution never >>>>>> signals the end of computing (the [*] never turns to a number, but you can >>>>>> still enter and get results back). In the console, output is received, but >>>>>> the prompt is in the other terminal. >>>>>> >>>>>> It works fine with a single front end. >>>>>> >>>>>> Any ideas appreciated! >>>>>> >>>>>> -Doug >>>>>> >>>>>> _______________________________________________ >>>>>> IPython-dev mailing list >>>>>> IPython-dev at scipy.org >>>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> IPython-dev mailing list >>>>> IPython-dev at scipy.org >>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Fri May 2 13:04:51 2014 From: benjaminrk at gmail.com (MinRK) Date: Fri, 2 May 2014 10:04:51 -0700 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: On Fri, May 2, 2014 at 9:04 AM, Doug Blank wrote: On Thu, May 1, 2014 at 5:35 PM, MinRK wrote: > >> ROUTER sockets use an IDENTITY prefix to determine who the recipient >> should be. >> > > Ok, I think I understand, but still not working. Here is some wording that > (if correct) could be inserted in an expanded discussion of the wire > protocol (which doesn't yet mention socket type): > > http://ipython.org/ipython-doc/dev/development/messaging.html#the-wire-protocol > > """ > If you only want to implement basic functionality (one frontend per > kernel, no parallel or cluster support) then using DEALER instead of ROUTER > is fine, and a good place to start because you don't need the complexity of > the routing protocol. You can simply leave out the routing prefixes before > the delimiter in the wire protocol. > > If you do want more than the basic functionality (such as allowing two > frontends to a kernel) then you must use the ROUTER socket type, and must > have the correct routing prefixes. > """ > I would not add this. I would consider it purely an accident that any kernel with DEALER sockets sometimes appears to work, and no kernel should ever use DEALER sockets on the kernel. I think suggesting that DEALER sockets might work in simple cases would only increase the likelihood that new kernels use dealer sockets, when none should. The addition of a kernel_info request at startup, which is about to go into IPython master, will mean that no kernel using DEALER sockets will work in any frontend, because there will be a minimum of two client sockets connected to the kernel?s shell channel. > The problem is that I haven't gotten the routing to work, and it seems > like it deserves some documentation. For example, watching the IPython > kernel, I appear to see the following kinds of routing: > > message type: "kernel_info_reply", routing appears to be "SESSION_ID": > > *** KERNEL SENT: "['860e49d1-3852-4d9a-a623-01271cc95f21', '', > '1832e7dad75f76550782d188b01d902c259da4b1d12ad9aa51c11bb756176065', > '{"date":"2014-05-02T11:36:54.231974","username":"kernel","session":"a97ba32b-b539-4b37-ab2e-08076f5a9bd6","msg_id":"e4cc180a-d262-4ac8-b4e0-fbc9e49855fb","msg_type":"kernel_info_reply"}', > '{"date":"2014-05-02T11:36:53.956564","username":"dblank","session":"860e49d1-3852-4d9a-a623-01271cc95f21","msg_id":"08428883-db50-401d-8601-e62fadcf38ba","msg_type":"kernel_info_request"}', > '{}', > '{"protocol_version":[4,1],"language_version":[2,7,5],"language":"python","ipython_version":[2,0,0,""]}']" > > message type: "status", routing appears to be "kernel.KERNEL_ID.status": > > *** KERNEL SENT: "['kernel.a5092211-ccf1-4017-bab9-58bab7d8eb52.status', > '', > '1a3ac6b69c87a4e5c30ea95001c86868ee1af08b4e6d953f0478f117ac6f6124', > '{"date":"2014-05-02T11:37:56.826835","username":"kernel","session":"a97ba32b-b539-4b37-ab2e-08076f5a9bd6","msg_id":"fefb1c9c-8c93-4a7e-85a0-6440eda8af99","msg_type":"status"}', > '{"date":"2014-05-02T11:37:56.824306","username":"dblank","session":"860e49d1-3852-4d9a-a623-01271cc95f21","msg_id":"335597c6-2101-4343-8d64-2a9d328617ef","msg_type":"execute_request"}', > '{}', '{"execution_state":"busy"}']" > > message type: "execute_repl", routing is "execute_reply", raw data (end of > message) is list of session ids: > > *** KERNEL SENT: "[u'execute_reply', {'status': u'ok', 'execution_count': > 2, 'user_variables': {}, 'payload': [], 'user_expressions': {}}, > {'parent_header': {}, 'msg_type': 'execute_request', 'msg_id': > '4a153840-c5f1-4f24-813f-4585c9eb776f', 'content': {'code': '1 + 1\n', > 'silent': False, 'user_variables': [], 'store_history': True, > 'user_expressions': {}, 'allow_stdin': True}, 'header': {'date': > datetime.datetime(2014, 5, 2, 11, 42, 50, 892870), 'username': 'dblank', > 'session': '1a402950-a0bf-417d-88d3-13b6d58506c3', 'msg_id': > '4a153840-c5f1-4f24-813f-4585c9eb776f', 'msg_type': 'execute_request'}, > 'buffers': [], 'metadata': {}}, {'dependencies_met': True, 'engine': > u'a5092211-ccf1-4017-bab9-58bab7d8eb52', 'status': u'ok', 'started': > datetime.datetime(2014, 5, 2, 11, 42, 50, 896000)}, > ['1a402950-a0bf-417d-88d3-13b6d58506c3']]" > > Am I reading this correctly? If so, then many kernel developers may stop > at basic communication and use DEALER (which is fine, I guess). For those > of us you want to implement the full spec (with the expectation of having > parallel engines working), each of these cases will need to be dealt with, > right? > I suppose I should add a bit of a zmq primer to the message spec. The relevant bits: ROUTER sockets use IDENTITIES to pick the peer to send messages to. This is the part of the message preceding the ?? delimiter. A ROUTER *must* send replies with the same routing prefix as the requests it receives. A simple (Python) example: DELIM = b''# request_msg normally constructed by router_socket.recv_multipart() request_msg = [ b'blob', b'other blob', DELIM, b'message frame 0', b'message frame 1'] delim_idx = request_msg.index(DELIM) identities = msg[:delim_idx] msg_frames = msg[delim_idx + 1:] # handle msg.... # build reply_frames with the same routing prefix as the request: reply_frames = [ b'reply 0', b'reply 1' ] reply_msg = identities + [DELIM] + reply_frames router_socket.send_multipart(reply_msg) PUB sockets are different. PUB sockets use only the first message part as a TOPIC, on which sub sockets can filter. In IPython, this is generally ignored, but the message spec describes what IPython does with pub topics. The PUB topic should *not* be the routing prefix used by the ROUTER socket. -MinRK > Thanks again! > > -Doug > > > >> In an IPython message, this would be the frames prior to the '' >> delimiter. You must send these as the beginning of the reply in order for >> the reply to arrive at the correct peer. >> >> -MinRK >> >> >> On Thu, May 1, 2014 at 1:24 PM, Doug Blank wrote: >> >>> On Thu, May 1, 2014 at 4:01 PM, MinRK wrote: >>> >>>> All of those DEALER sockets should be ROUTER sockets. The DEALER >>>> behavior is correct for only one peer, but it will round-robin replies if >>>> there is more than one. >>>> >>> >>> If I change the ShellChannel to ROUTER then the kernel will no longer >>> respond. >>> >>> If I change the others to ROUTER, then I don't see a difference with >>> prior behavior. >>> >>> >>> >>>> Clearly some documentation is wrong. Where did you get the suggestion >>>> that they should be DEALER sockets? >>>> >>> >>> Probably a combination of finding what would work, and looking at other >>> code (it is sometimes hard to translate code and docs between different ZMQ >>> libraries). >>> >>> Thank you for helping me track this down! >>> >>> -Doug >>> >>> >>>> >>>> -MinRK >>>> >>>> >>>> On Thu, May 1, 2014 at 12:45 PM, Doug Blank wrote: >>>> >>>>> On Thu, May 1, 2014 at 2:37 PM, MinRK wrote: >>>>> >>>>>> What are your socket types on the Kernel side? >>>>>> >>>>> >>>>> Here is the definitions for our channels: >>>>> >>>>> public class ShellChannel : Channel { >>>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>>> } >>>>> } >>>>> public class IOPubChannel : Channel { >>>>> base(session, auth, transport, address, port, SocketType.PUB) { >>>>> } >>>>> } >>>>> public class ControlChannel : Channel { >>>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>>> } >>>>> } >>>>> public class StdInChannel : Channel { >>>>> base(session, auth, transport, address, port, SocketType.DEALER) { >>>>> } >>>>> } >>>>> public class HeartBeatChannel : Channel { >>>>> base(session, auth, transport, address, port, SocketType.REP) { >>>>> } >>>>> } >>>>> >>>>> Could that really effect multi-frontend, but not single? >>>>> >>>>> -Doug >>>>> >>>>> >>>>> >>>>>> >>>>>> >>>>>> On Thu, May 1, 2014 at 9:58 AM, Doug Blank wrote: >>>>>> >>>>>>> Devs, I have been trying to find the cause of this bug for some >>>>>>> time, and I thought that someone might be able to provide a hint as to >>>>>>> where to look to find the issue. >>>>>>> >>>>>>> We have an external kernel that works very well when you connect >>>>>>> onto it with a single frontend. But when you connect two frontends (console >>>>>>> or notebook), then the conversation gets confused. >>>>>>> >>>>>>> More detail: >>>>>>> >>>>>>> Terminal 1: >>>>>>> >>>>>>> ipython console --profile calico >>>>>>> >>>>>>> works fine. >>>>>>> >>>>>>> Terminal 2: >>>>>>> >>>>>>> ipython console --profile calico --existing >>>>>>> >>>>>>> starts, but now things are confused. Now, each terminal takes turns >>>>>>> being able to get the prompt. If run in notebook, then code execution never >>>>>>> signals the end of computing (the [*] never turns to a number, but you can >>>>>>> still enter and get results back). In the console, output is received, but >>>>>>> the prompt is in the other terminal. >>>>>>> >>>>>>> It works fine with a single front end. >>>>>>> >>>>>>> Any ideas appreciated! >>>>>>> >>>>>>> -Doug >>>>>>> >>>>>>> _______________________________________________ >>>>>>> IPython-dev mailing list >>>>>>> IPython-dev at scipy.org >>>>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> IPython-dev mailing list >>>>>> IPython-dev at scipy.org >>>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> IPython-dev mailing list >>>>> IPython-dev at scipy.org >>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Fri May 2 17:31:58 2014 From: doug.blank at gmail.com (Doug Blank) Date: Fri, 2 May 2014 17:31:58 -0400 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: On Fri, May 2, 2014 at 1:04 PM, MinRK wrote: > On Fri, May 2, 2014 at 9:04 AM, Doug Blank wrote: > > On Thu, May 1, 2014 at 5:35 PM, MinRK wrote: >> >>> ROUTER sockets use an IDENTITY prefix to determine who the recipient >>> should be. >>> >> >> Ok, I think I understand, but still not working. Here is some wording >> that (if correct) could be inserted in an expanded discussion of the wire >> protocol (which doesn't yet mention socket type): >> > >> http://ipython.org/ipython-doc/dev/development/messaging.html#the-wire-protocol >> >> """ >> If you only want to implement basic functionality (one frontend per >> kernel, no parallel or cluster support) then using DEALER instead of ROUTER >> is fine, and a good place to start because you don't need the complexity of >> the routing protocol. You can simply leave out the routing prefixes before >> the delimiter in the wire protocol. >> >> If you do want more than the basic functionality (such as allowing two >> frontends to a kernel) then you must use the ROUTER socket type, and must >> have the correct routing prefixes. >> """ >> > I would not add this. I would consider it purely an accident that any > kernel with DEALER sockets sometimes appears to work, and no kernel should > ever use DEALER sockets on the kernel. > Just to be clear, using DEALER always works without any routing identifiers, with all of the frontends (only one at a time, or course). IPython may not have been design to work this way, may have security issues, and may not work in the future. But with IPython 1, and 2, it works. But now to my question: > I think suggesting that DEALER sockets might work in simple cases would > only increase the likelihood that new kernels use dealer sockets, when none > should. > > The addition of a kernel_info request at startup, which is about to go > into IPython master, will mean that no kernel using DEALER sockets will > work in any frontend, because there will be a minimum of two client sockets > connected to the kernel?s shell channel. > > >> The problem is that I haven't gotten the routing to work, and it seems >> like it deserves some documentation. For example, watching the IPython >> kernel, I appear to see the following kinds of routing: >> >> message type: "kernel_info_reply", routing appears to be "SESSION_ID": >> >> >> message type: "status", routing appears to be "kernel.KERNEL_ID.status": >> >> >> message type: "execute_repl", routing is "execute_reply", raw data (end >> of message) is list of session ids: >> >> >> Am I reading this correctly? If so, then many kernel developers may stop >> at basic communication and use DEALER (which is fine, I guess). For those >> of us you want to implement the full spec (with the expectation of having >> parallel engines working), each of these cases will need to be dealt with, >> right? >> > I suppose I should add a bit of a zmq primer to the message spec. The > relevant bits: > > ROUTER sockets use IDENTITIES to pick the peer to send messages to. This > is the part of the message preceding the ?? delimiter. A ROUTER *must*send replies with the same routing prefix as the requests it receives. > That is an important bit of info! The IPython section on the wire protocol is very misleading in this routing section. > PUB sockets are different. PUB sockets use only the first message part as a TOPIC, on which sub sockets can filter. In IPython, this is generally ignored, but the message spec describes what IPython does with pub topics. The PUB topic should *not* be the routing prefix used by the ROUTER socket. > > What is the "first message part"? Rather than a primer on zmq, I'd rather see something very specific with respect to IPython. What does the request look like? What should the PUB response look like? What would a ROUTER response look like? Is it true that all kernel sends are in response to a request, except for the very first "starting" status message? In that case, it creates a routing identity from scratch? Thanks so much... I feel I am getting close! -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Fri May 2 18:25:17 2014 From: benjaminrk at gmail.com (Min RK) Date: Fri, 2 May 2014 15:25:17 -0700 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: > On May 2, 2014, at 14:31, Doug Blank wrote: > >> On Fri, May 2, 2014 at 1:04 PM, MinRK wrote: >>> On Fri, May 2, 2014 at 9:04 AM, Doug Blank wrote: >>> >>>> On Thu, May 1, 2014 at 5:35 PM, MinRK wrote: >>>> ROUTER sockets use an IDENTITY prefix to determine who the recipient should be. >>> >>> Ok, I think I understand, but still not working. Here is some wording that (if correct) could be inserted in an expanded discussion of the wire protocol (which doesn't yet mention socket type): >> >>> http://ipython.org/ipython-doc/dev/development/messaging.html#the-wire-protocol >>> >>> """ >>> If you only want to implement basic functionality (one frontend per kernel, no parallel or cluster support) then using DEALER instead of ROUTER is fine, and a good place to start because you don't need the complexity of the routing protocol. You can simply leave out the routing prefixes before the delimiter in the wire protocol. >>> >>> If you do want more than the basic functionality (such as allowing two frontends to a kernel) then you must use the ROUTER socket type, and must have the correct routing prefixes. >>> """ >> >> I would not add this. I would consider it purely an accident that any kernel with DEALER sockets sometimes appears to work, and no kernel should ever use DEALER sockets on the kernel. >> > Just to be clear, using DEALER always works without any routing identifiers, with all of the frontends (only one at a time, or course). IPython may not have been design to work this way, may have security issues, and may not work in the future. But with IPython 1, and 2, it works. Also to be clear: this will stop being true in master next week, which is why I don't think it's worth mentioning that DEALER sockets sort of work sometimes, because it is always the wrong thing to use. > But now to my question: > >> I think suggesting that DEALER sockets might work in simple cases would only increase the likelihood that new kernels use dealer sockets, when none should. >> >> The addition of a kernel_info request at startup, which is about to go into IPython master, will mean that no kernel using DEALER sockets will work in any frontend, because there will be a minimum of two client sockets connected to the kernel?s shell channel. >> >>> >>> The problem is that I haven't gotten the routing to work, and it seems like it deserves some documentation. For example, watching the IPython kernel, I appear to see the following kinds of routing: >>> >>> message type: "kernel_info_reply", routing appears to be "SESSION_ID": >>> >>> >>> message type: "status", routing appears to be "kernel.KERNEL_ID.status": >>> >>> >>> message type: "execute_repl", routing is "execute_reply", raw data (end of message) is list of session ids: >>> >>> >>> Am I reading this correctly? If so, then many kernel developers may stop at basic communication and use DEALER (which is fine, I guess). For those of us you want to implement the full spec (with the expectation of having parallel engines working), each of these cases will need to be dealt with, right? >> >> I suppose I should add a bit of a zmq primer to the message spec. The relevant bits: >> >> ROUTER sockets use IDENTITIES to pick the peer to send messages to. This is the part of the message preceding the ?? delimiter. A ROUTER must send replies with the same routing prefix as the requests it receives. >> > That is an important bit of info! The IPython section on the wire protocol is very misleading in this routing section. >> PUB sockets are different. PUB sockets use only the first message part as a TOPIC, on which sub sockets can filter. In IPython, this is generally ignored, but the message spec describes what IPython does with pub topics. The PUB topic should not be the routing prefix used by the ROUTER socket. > What is the "first message part"? > > Rather than a primer on zmq, I'd rather see something very specific with respect to IPython. What does the request look like? What should the PUB response look like? What would a ROUTER response look like? > > Is it true that all kernel sends are in response to a request, except for the very first "starting" status message? In that case, it creates a routing identity from scratch? Adding an example request/iopub/reply cycle in the wire format is a good idea. I will try to draft one this weekend. The general principal: one request has one reply. the routing identity is relevant only to that one reply, and the reply's routing prefix should be identical to the request's. Side effect messages on IOPub do not use routing identities. But they do have a slightly analogous behavior called a subscription topic. This value should not be influenced by the routing prefix, and in practice has no effect because frontends subscribe to all topics (this last statement is already in the msg spec doc). -MinRK > > Thanks so much... I feel I am getting close! > > -Doug > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Sat May 3 00:11:54 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 3 May 2014 00:11:54 -0400 Subject: [IPython-dev] Two frontends, one kernel In-Reply-To: References: Message-ID: Got this stage working; it was largely just getting that identity on the front of the shell ROUTER packets. I suspect that there will be things to expand and refine once we can start using the kernel as an engine in a cluster... I hope that using 3rd-party kernels in a parallel cluster is still on the TODO list. I'd be glad to look over any new docs. Thanks again! -Doug > Adding an example request/iopub/reply cycle in the wire format is a good > idea. I will try to draft one this weekend. The general principal: one > request has one reply. the routing identity is relevant only to that one > reply, and the reply's routing prefix should be identical to the request's. > Side effect messages on IOPub do not use routing identities. But they do > have a slightly analogous behavior called a subscription topic. This value > should not be influenced by the routing prefix, and in practice has no > effect because frontends subscribe to all topics (this last statement is > already in the msg spec doc). > > -MinRK > > > Thanks so much... I feel I am getting close! > > -Doug > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhu at aero.iitb.ac.in Sat May 3 04:09:05 2014 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Sat, 03 May 2014 13:39:05 +0530 Subject: [IPython-dev] Mayavi broken TraitError In-Reply-To: References: <5361FC6A.1090502@yahoo.de> Message-ID: <5364A421.3070308@aero.iitb.ac.in> On 5/1/14 1:56 PM, Arnd Baecker wrote: > On Thu, 1 May 2014, Zeitlinie wrote: > >> Does anyone on this list use Mayavi for 3D visualization? > > A better place to ask is > MayaVi users > enthought-dev Indeed, that is the right forum to ask as this question is not IPython related at all. > Support for VTK-6.x was announced two weeks ago, > so you could give installing the development version > of ETS a try, see http://code.enthought.com/source/ > To install this without root access to an arbitrary place > you can do: > export PYTHONPATH=/MYDEST/lib/python2.7/site-packages/:$PYTHONPATH > python ets.py python setup.py develop --prefix=/MYDEST > > BTW: It seems that the bug you encounter is already described here: > https://github.com/enthought/mayavi/issues/127 Yes, all this is fixed in master, so using master is the best bet until we finish some further cleanup and cut a new release. cheers, Prabhu From clyde.fare at gmail.com Sat May 3 11:00:24 2014 From: clyde.fare at gmail.com (Clyde Fare) Date: Sat, 3 May 2014 16:00:24 +0100 Subject: [IPython-dev] Execute python code from the notebook dashboard Message-ID: Hi, I'm trying to create a graphical IPython notebook dashboard that represents a collection of notebooks as a network, where nodes are the notebooks and the links between them are links between notebooks specified in markdown cells. I've got something that kind of works ( https://github.com/Clyde-fare/ipython_graphdash) but it requires manual execution of some python code in the directory that IPython is launched from. I'd like to get rid of this requirement by having this python code execute when people click the refresh notebook list icon on the dashboard. I'm very much a beginner javascript wise but as far as I can tell when we open a notebook a python kernel is launched but at the dashboard there is no kernel active and so in order to execute some python code I would have to first launch a kernel and then pass it the code I want to run. I think I can probably go away and figure out how to do that but I wanted to check whether this was the right idea, or whether there was a simpler way? Cheers Clyde -------------- next part -------------- An HTML attachment was scrubbed... URL: From klonuo at gmail.com Sat May 3 12:31:22 2014 From: klonuo at gmail.com (klo uo) Date: Sat, 3 May 2014 18:31:22 +0200 Subject: [IPython-dev] Html object graph Message-ID: Hey guys, are you are familiar with LinqPad? If not, just to say it's a lightweight code scratchpad, that can connect to various databases and allow immediate Linq execution. It can also interpret any kind of .Net code (although currently without IronPython/Ruby). I thought to ask you about main output result pane - it's a very interesting Html table representation of dumped object(s), that adapts on the object type - allows collapsible nested levels, navigable deep Exception tree, can display images, rawhtml, hyperlinqs - user defined lambda functions that are executed on user click, ... Do you think something similar would fit in IPython? As object inspection magic, or Qtconsole output pane, or else...? -------------- next part -------------- An HTML attachment was scrubbed... URL: From damontallen at gmail.com Mon May 5 08:07:22 2014 From: damontallen at gmail.com (Damon Allen) Date: Mon, 5 May 2014 08:07:22 -0400 Subject: [IPython-dev] NBVierer Down? Message-ID: Hello, Is anyone working on NBViewer? The Site itself is up by I cannot get any notebooks to render. I went to HipChat a couple of times trying to ask, but no one was there. I thought someone might want to look into it. Damon -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Mon May 5 08:10:58 2014 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 5 May 2014 08:10:58 -0400 Subject: [IPython-dev] NBVierer Down? In-Reply-To: References: Message-ID: This works for me: http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb -Doug On Mon, May 5, 2014 at 8:07 AM, Damon Allen wrote: > Hello, > > Is anyone working on NBViewer? The Site itself is up by I cannot get any > notebooks to render. I went to HipChat a couple of times trying to ask, > but no one was there. I thought someone might want to look into it. > > Damon > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From damontallen at gmail.com Mon May 5 08:15:12 2014 From: damontallen at gmail.com (Damon Allen) Date: Mon, 5 May 2014 08:15:12 -0400 Subject: [IPython-dev] NBVierer Down? In-Reply-To: References: Message-ID: That is odd. I keep getting error screens until now. Now other notebooks are loading... Damon On Mon, May 5, 2014 at 8:10 AM, Doug Blank wrote: > This works for me: > > > http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb > > -Doug > > > On Mon, May 5, 2014 at 8:07 AM, Damon Allen wrote: > >> Hello, >> >> Is anyone working on NBViewer? The Site itself is up by I cannot get >> any notebooks to render. I went to HipChat a couple of times trying to >> ask, but no one was there. I thought someone might want to look into it. >> >> Damon >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rgbkrk at gmail.com Mon May 5 08:32:00 2014 From: rgbkrk at gmail.com (Kyle Kelley) Date: Mon, 5 May 2014 07:32:00 -0500 Subject: [IPython-dev] NBVierer Down? In-Reply-To: References: Message-ID: Yeah, I just fixed it. Detailed summary: nbviewer currently pulls from IPython's master branch on deployments. My guess is that on the last deployment, the git submodules were out of sync and salt+supervisor were unable to rectify the situation. I updated the submodules manually then made sure to fix the deployment setup in the salt states so this isn't an issue again. -- Kyle On Mon, May 5, 2014 at 7:15 AM, Damon Allen wrote: > That is odd. I keep getting error screens until now. Now other notebooks > are loading... > > Damon > > > > > On Mon, May 5, 2014 at 8:10 AM, Doug Blank wrote: > >> This works for me: >> >> >> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb >> >> -Doug >> >> >> On Mon, May 5, 2014 at 8:07 AM, Damon Allen wrote: >> >>> Hello, >>> >>> Is anyone working on NBViewer? The Site itself is up by I cannot get >>> any notebooks to render. I went to HipChat a couple of times trying to >>> ask, but no one was there. I thought someone might want to look into it. >>> >>> Damon >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Mon May 5 08:48:46 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Mon, 5 May 2014 14:48:46 +0200 Subject: [IPython-dev] NBVierer Down? In-Reply-To: References: Message-ID: <0E81B261-727D-4FAB-A21C-D3F115F3E3C4@gmail.com> Thanks Kyle you are awesome. https://www.youtube.com/watch?v=StTqXEQ2l-Y -- M Le 5 mai 2014 ? 14:32, Kyle Kelley a ?crit : > Yeah, I just fixed it. > > Detailed summary: nbviewer currently pulls from IPython's master branch on deployments. My guess is that on the last deployment, the git submodules were out of sync and salt+supervisor were unable to rectify the situation. I updated the submodules manually then made sure to fix the deployment setup in the salt states so this isn't an issue again. > > -- Kyle > > > > On Mon, May 5, 2014 at 7:15 AM, Damon Allen wrote: > That is odd. I keep getting error screens until now. Now other notebooks are loading... > > Damon > > > > > On Mon, May 5, 2014 at 8:10 AM, Doug Blank wrote: > This works for me: > > http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb > > -Doug > > > On Mon, May 5, 2014 at 8:07 AM, Damon Allen wrote: > Hello, > > Is anyone working on NBViewer? The Site itself is up by I cannot get any notebooks to render. I went to HipChat a couple of times trying to ask, but no one was there. I thought someone might want to look into it. > > Damon > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Mon May 5 08:49:37 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 5 May 2014 13:49:37 +0100 Subject: [IPython-dev] NBVierer Down? In-Reply-To: <0E81B261-727D-4FAB-A21C-D3F115F3E3C4@gmail.com> References: <0E81B261-727D-4FAB-A21C-D3F115F3E3C4@gmail.com> Message-ID: +1000,thanks so much. On May 5, 2014 5:46 AM, "Matthias BUSSONNIER" wrote: > Thanks Kyle you are awesome. > > > https://www.youtube.com/watch?v=StTqXEQ2l-Y > > -- > M > Le 5 mai 2014 ? 14:32, Kyle Kelley a ?crit : > > Yeah, I just fixed it. > > Detailed summary: nbviewer currently pulls from IPython's master branch on > deployments. My guess is that on the last deployment, the git submodules > were out of sync and salt+supervisor were unable to rectify the situation. > I updated the submodules manually then made sure to fix the deployment > setup in the salt states so this isn't an issue again. > > -- Kyle > > > > On Mon, May 5, 2014 at 7:15 AM, Damon Allen wrote: > >> That is odd. I keep getting error screens until now. Now other >> notebooks are loading... >> >> Damon >> >> >> >> >> On Mon, May 5, 2014 at 8:10 AM, Doug Blank wrote: >> >>> This works for me: >>> >>> >>> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb >>> >>> -Doug >>> >>> >>> On Mon, May 5, 2014 at 8:07 AM, Damon Allen wrote: >>> >>>> Hello, >>>> >>>> Is anyone working on NBViewer? The Site itself is up by I cannot get >>>> any notebooks to render. I went to HipChat a couple of times trying to >>>> ask, but no one was there. I thought someone might want to look into it. >>>> >>>> Damon >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgadbois at gmail.com Mon May 5 11:00:07 2014 From: mgadbois at gmail.com (Martin Gadbois) Date: Mon, 5 May 2014 11:00:07 -0400 Subject: [IPython-dev] SQLite kernel Message-ID: Hi! I would like to develop a SQLite kernel for IPython. Keyword, table and column completion would help building queries, and a dynamic output could resize text columns and have a proper notebook table output. To achieve that, I see two main directions: 1- Have an external kernel (like http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) coded in Python since there are no 0MQ bindings for SQLite. 2- Extend IPython itself to support SQLite, since I will need to write Python code anyway to support SQLite. What would this list recommend as an implementation strategy? Any example of creating an external kernel by reusing a subset of IPython itself? Thanks! -- Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Mon May 5 11:28:50 2014 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 5 May 2014 11:28:50 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois wrote: > Hi! > > I would like to develop a SQLite kernel for IPython. > > Keyword, table and column completion would help building queries, and a > dynamic output could resize text columns and have a proper notebook table > output. > > To achieve that, I see two main directions: > 1- Have an external kernel (like > http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) coded > in Python since there are no 0MQ bindings for SQLite. > 2- Extend IPython itself to support SQLite, since I will need to write > Python code anyway to support SQLite. > I've wanted something like this for a while! I would like to incorporate SQL as a language that could easily be used in a variety of educational settings and other open source projects. But the utility of such a project lies in the details of implementation. There are pros and cons to both approaches. But you could perhaps develop it in a manner that could be used in either situation. What would generally be useful would be to replicate the SQLite shell. It would be great if the parser was written in pure Python, and had an interpreter, also as much written in pure Python as possible. That is, it would be great if the low-level C-based sqlite API was limited, and could be swapped out. That would allow other implementations of Python (Jython, PyPy, IronPython) could use it with their own sqlite wrappers. But also, that might make it useful for interfacing other data storages (for example, CSV files, Django databases, etc.) The SQLite shell is actually a bit hairy. Here is a port of the C code to C# for example: http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell You could also use the simple-kernel [1] as a way of quickly turning a Python program into a kernel. (simple-kernel was just updated by Min, so now it is correct; thanks, Min!) This might also have connections to the ADODB API [2]... they have worked hard to make their connections be Python-implementation agnostic. Looking forward to see what you develop! -Doug [1] https://github.com/dsblank/simple_kernel [2] https://sourceforge.net/projects/adodbapi > > What would this list recommend as an implementation strategy? > Any example of creating an external kernel by reusing a subset of IPython > itself? > > Thanks! > > -- > Martin > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhamrick at berkeley.edu Mon May 5 11:52:40 2014 From: jhamrick at berkeley.edu (Jessica B. Hamrick) Date: Mon, 5 May 2014 08:52:40 -0700 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Hi all, I jut wanted to throw out there a link to the SQL magic, which may be relevant: https://github.com/catherinedevlin/ipython-sql I know it's not a whole kernel, but may be a good starting place for at least seeing what other people have been thinking about along the same directions. Cheers, Jess -- UC Berkeley, Department of Psychology Computational Cognitive Science Lab http://www.jesshamrick.com On Mon, May 5, 2014 at 8:28 AM, Doug Blank wrote: > On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois wrote: > >> Hi! >> >> I would like to develop a SQLite kernel for IPython. >> >> Keyword, table and column completion would help building queries, and a >> dynamic output could resize text columns and have a proper notebook table >> output. >> >> To achieve that, I see two main directions: >> 1- Have an external kernel (like >> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >> coded in Python since there are no 0MQ bindings for SQLite. >> 2- Extend IPython itself to support SQLite, since I will need to write >> Python code anyway to support SQLite. >> > > I've wanted something like this for a while! I would like to incorporate > SQL as a language that could easily be used in a variety of educational > settings and other open source projects. But the utility of such a project > lies in the details of implementation. > > There are pros and cons to both approaches. But you could perhaps develop > it in a manner that could be used in either situation. What would generally > be useful would be to replicate the SQLite shell. It would be great if the > parser was written in pure Python, and had an interpreter, also as much > written in pure Python as possible. That is, it would be great if the > low-level C-based sqlite API was limited, and could be swapped out. > > That would allow other implementations of Python (Jython, PyPy, > IronPython) could use it with their own sqlite wrappers. But also, that > might make it useful for interfacing other data storages (for example, CSV > files, Django databases, etc.) > > The SQLite shell is actually a bit hairy. Here is a port of the C code to > C# for example: > > http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell > > You could also use the simple-kernel [1] as a way of quickly turning a > Python program into a kernel. (simple-kernel was just updated by Min, so > now it is correct; thanks, Min!) > > This might also have connections to the ADODB API [2]... they have worked > hard to make their connections be Python-implementation agnostic. > > Looking forward to see what you develop! > > -Doug > > [1] https://github.com/dsblank/simple_kernel > [2] https://sourceforge.net/projects/adodbapi > > >> >> What would this list recommend as an implementation strategy? >> Any example of creating an external kernel by reusing a subset of IPython >> itself? >> >> Thanks! >> >> -- >> Martin >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon May 5 12:04:43 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 5 May 2014 09:04:43 -0700 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Hi Martin, On 5 May 2014 08:00, Martin Gadbois wrote: > I would like to develop a SQLite kernel for IPython. > > Keyword, table and column completion would help building queries, and a > dynamic output could resize text columns and have a proper notebook table > output. > > To achieve that, I see two main directions: > 1- Have an external kernel (like > http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) coded > in Python since there are no 0MQ bindings for SQLite. > 2- Extend IPython itself to support SQLite, since I will need to write > Python code anyway to support SQLite. > We're actually planning to refactor the IPython kernel machinery in the next few weeks to make it easier to write kernels in Python. Once this is done, you'll be able to create a new kernel by inheriting from a class in IPython, and defining methods for execution and completion. So unless you need to do it urgently, I'd recommend waiting for that infrastructure, and then it will be quite simple. Best wishes, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.corlay at gmail.com Mon May 5 12:40:32 2014 From: sylvain.corlay at gmail.com (Sylvain Corlay) Date: Mon, 5 May 2014 12:40:32 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Hi Thomas, I did not see a PR open . Do you have a link to the discussion on this? I have done some experiments with kernels implemented in Python and I am very interested in this. Sylvain On Mon, May 5, 2014 at 12:04 PM, Thomas Kluyver wrote: > Hi Martin, > > On 5 May 2014 08:00, Martin Gadbois wrote: > >> I would like to develop a SQLite kernel for IPython. >> >> Keyword, table and column completion would help building queries, and a >> dynamic output could resize text columns and have a proper notebook table >> output. >> >> To achieve that, I see two main directions: >> 1- Have an external kernel (like >> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >> coded in Python since there are no 0MQ bindings for SQLite. >> 2- Extend IPython itself to support SQLite, since I will need to write >> Python code anyway to support SQLite. >> > > We're actually planning to refactor the IPython kernel machinery in the > next few weeks to make it easier to write kernels in Python. Once this is > done, you'll be able to create a new kernel by inheriting from a class in > IPython, and defining methods for execution and completion. So unless you > need to do it urgently, I'd recommend waiting for that infrastructure, and > then it will be quite simple. > > Best wishes, > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon May 5 13:18:34 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 5 May 2014 10:18:34 -0700 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Hi Sylvain, On 5 May 2014 09:40, Sylvain Corlay wrote: > Hi Thomas, > I did not see a PR open . Do you have a link to the discussion on this? I > have done some experiments with kernels implemented in Python and I am very > interested in this. > There's no PR yet - I'm due to work on it after #4536 (message spec changes) has been merged. I think we might have discussed it in one of the weekly dev meetings, but I don't remember how long ago. I'll make sure to ping you when there's something to show for it. Best wishes, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgadbois at gmail.com Mon May 5 13:55:28 2014 From: mgadbois at gmail.com (Martin Gadbois) Date: Mon, 5 May 2014 13:55:28 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Wow that was there but not found by Google... nice! I will take a close look, thanks! On Mon, May 5, 2014 at 11:52 AM, Jessica B. Hamrick wrote: > Hi all, > > I jut wanted to throw out there a link to the SQL magic, which may be > relevant: > > https://github.com/catherinedevlin/ipython-sql > > I know it's not a whole kernel, but may be a good starting place for at > least seeing what other people have been thinking about along the same > directions. > > Cheers, > Jess > > -- > UC Berkeley, Department of Psychology > Computational Cognitive Science Lab > http://www.jesshamrick.com > > > On Mon, May 5, 2014 at 8:28 AM, Doug Blank wrote: > >> On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois wrote: >> >>> Hi! >>> >>> I would like to develop a SQLite kernel for IPython. >>> >>> Keyword, table and column completion would help building queries, and a >>> dynamic output could resize text columns and have a proper notebook table >>> output. >>> >>> To achieve that, I see two main directions: >>> 1- Have an external kernel (like >>> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >>> coded in Python since there are no 0MQ bindings for SQLite. >>> 2- Extend IPython itself to support SQLite, since I will need to write >>> Python code anyway to support SQLite. >>> >> >> I've wanted something like this for a while! I would like to incorporate >> SQL as a language that could easily be used in a variety of educational >> settings and other open source projects. But the utility of such a project >> lies in the details of implementation. >> >> There are pros and cons to both approaches. But you could perhaps develop >> it in a manner that could be used in either situation. What would generally >> be useful would be to replicate the SQLite shell. It would be great if the >> parser was written in pure Python, and had an interpreter, also as much >> written in pure Python as possible. That is, it would be great if the >> low-level C-based sqlite API was limited, and could be swapped out. >> >> That would allow other implementations of Python (Jython, PyPy, >> IronPython) could use it with their own sqlite wrappers. But also, that >> might make it useful for interfacing other data storages (for example, CSV >> files, Django databases, etc.) >> >> The SQLite shell is actually a bit hairy. Here is a port of the C code to >> C# for example: >> >> http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell >> >> You could also use the simple-kernel [1] as a way of quickly turning a >> Python program into a kernel. (simple-kernel was just updated by Min, so >> now it is correct; thanks, Min!) >> >> This might also have connections to the ADODB API [2]... they have worked >> hard to make their connections be Python-implementation agnostic. >> >> Looking forward to see what you develop! >> >> -Doug >> >> [1] https://github.com/dsblank/simple_kernel >> [2] https://sourceforge.net/projects/adodbapi >> >> >>> >>> What would this list recommend as an implementation strategy? >>> Any example of creating an external kernel by reusing a subset of >>> IPython itself? >>> >>> Thanks! >>> >>> -- >>> Martin >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgadbois at gmail.com Mon May 5 14:28:14 2014 From: mgadbois at gmail.com (Martin Gadbois) Date: Mon, 5 May 2014 14:28:14 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: Good to know! i can wait, this seems promising. Thanks! On Mon, May 5, 2014 at 12:04 PM, Thomas Kluyver wrote: > Hi Martin, > > On 5 May 2014 08:00, Martin Gadbois wrote: > >> I would like to develop a SQLite kernel for IPython. >> >> Keyword, table and column completion would help building queries, and a >> dynamic output could resize text columns and have a proper notebook table >> output. >> >> To achieve that, I see two main directions: >> 1- Have an external kernel (like >> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >> coded in Python since there are no 0MQ bindings for SQLite. >> 2- Extend IPython itself to support SQLite, since I will need to write >> Python code anyway to support SQLite. >> > > We're actually planning to refactor the IPython kernel machinery in the > next few weeks to make it easier to write kernels in Python. Once this is > done, you'll be able to create a new kernel by inheriting from a class in > IPython, and defining methods for execution and completion. So unless you > need to do it urgently, I'd recommend waiting for that infrastructure, and > then it will be quite simple. > > Best wishes, > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From modi.konark at gmail.com Mon May 5 15:08:26 2014 From: modi.konark at gmail.com (konark modi) Date: Tue, 6 May 2014 00:38:26 +0530 Subject: [IPython-dev] [Create and last update]Notebook dashboard ! Message-ID: Hi Not sure if this is implemented / planned, but I was wanting to contribute to IPython and thought if it would be good to start by adding created/updated time along with notebook name on the dashboard. Regards Konark -------------- next part -------------- An HTML attachment was scrubbed... URL: From gvwilson at third-bit.com Mon May 5 15:19:41 2014 From: gvwilson at third-bit.com (Greg Wilson) Date: Mon, 05 May 2014 15:19:41 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: <5367E44D.1040207@third-bit.com> http://github.com/gvwilson/sqlitemagic may also be of interest - it's what we use to produce the Software Carpentry lesson on SQL. thx, G On 2014-05-05 1:55 PM, Martin Gadbois wrote: > Wow that was there but not found by Google... nice! I will take a > close look, thanks! > > > On Mon, May 5, 2014 at 11:52 AM, Jessica B. Hamrick > > wrote: > > Hi all, > > I jut wanted to throw out there a link to the SQL magic, which may > be relevant: > > https://github.com/catherinedevlin/ipython-sql > > I know it's not a whole kernel, but may be a good starting place > for at least seeing what other people have been thinking about > along the same directions. > > Cheers, > Jess > > -- > UC Berkeley, Department of Psychology > Computational Cognitive Science Lab > http://www.jesshamrick.com > > > On Mon, May 5, 2014 at 8:28 AM, Doug Blank > wrote: > > On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois > > wrote: > > Hi! > > I would like to develop a SQLite kernel for IPython. > > Keyword, table and column completion would help building > queries, and a dynamic output could resize text columns > and have a proper notebook table output. > > To achieve that, I see two main directions: > 1- Have an external kernel (like > http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) > coded in Python since there are no 0MQ bindings for SQLite. > 2- Extend IPython itself to support SQLite, since I will > need to write Python code anyway to support SQLite. > > > I've wanted something like this for a while! I would like to > incorporate SQL as a language that could easily be used in a > variety of educational settings and other open source > projects. But the utility of such a project lies in the > details of implementation. > > There are pros and cons to both approaches. But you could > perhaps develop it in a manner that could be used in either > situation. What would generally be useful would be to > replicate the SQLite shell. It would be great if the parser > was written in pure Python, and had an interpreter, also as > much written in pure Python as possible. That is, it would be > great if the low-level C-based sqlite API was limited, and > could be swapped out. > > That would allow other implementations of Python (Jython, > PyPy, IronPython) could use it with their own sqlite wrappers. > But also, that might make it useful for interfacing other data > storages (for example, CSV files, Django databases, etc.) > > The SQLite shell is actually a bit hairy. Here is a port of > the C code to C# for example: > > http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell > > You could also use the simple-kernel [1] as a way of quickly > turning a Python program into a kernel. (simple-kernel was > just updated by Min, so now it is correct; thanks, Min!) > > This might also have connections to the ADODB API [2]... they > have worked hard to make their connections be > Python-implementation agnostic. > > Looking forward to see what you develop! > > -Doug > > [1] https://github.com/dsblank/simple_kernel > [2] https://sourceforge.net/projects/adodbapi > > > > What would this list recommend as an implementation strategy? > Any example of creating an external kernel by reusing a > subset of IPython itself? > > Thanks! > > -- > Martin > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > -- > Martin > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon May 5 15:37:20 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 5 May 2014 12:37:20 -0700 Subject: [IPython-dev] [Create and last update]Notebook dashboard ! In-Reply-To: References: Message-ID: Hi Konark, On 5 May 2014 12:08, konark modi wrote: > Not sure if this is implemented / planned, but I was wanting to contribute > to IPython and thought if it would be good to start by adding > created/updated time along with notebook name on the dashboard. Be aware that we're planning a bigger refactoring of the dashboard some time before IPython 3, so code you write now might be pulled out again before long. If you don't mind that risk, go for it. You might want to make sure you're not treading on Susan Tan's toes - I know she was also thinking about this. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.corlay at gmail.com Mon May 5 19:44:41 2014 From: sylvain.corlay at gmail.com (Sylvain Corlay) Date: Mon, 5 May 2014 19:44:41 -0400 Subject: [IPython-dev] Markdown MathJaX and Serif Message-ID: Hi all, We traditionally use sans-serif fonts for text meant to be displayed on a screen while serif is generally used for print. For example, default latex-beamer themes use sans-serif flavors of the computer modern font. Shouldn't Mathjax do the same, especially in the context of the IPython notebook, where the default fonts for markdown are sans-serif? Best, Sylvain -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Mon May 5 21:09:39 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 6 May 2014 02:09:39 +0100 Subject: [IPython-dev] Markdown MathJaX and Serif In-Reply-To: References: Message-ID: To the best of my understanding and some rather hasty googling, mathjax doesn't provide sans-serif mathematical fonts. I'm also pretty sure that in Beamer, in most themes even though it uses sans-serif CM variants, it still renders the math using serifed CM (or at least it used to years ago). You have to switch to special packages to get sans-serifed math, such as the cmbright one. In summary, the business of getting proper sans-serif math rendering is highly non-trivial, and ultimately it's a question for the MathJax lists. If mathjax supports it, we can too simply because we use unadulterated mathjax. But if it's not something that mathjax can do by itself, IPython isn't going to help... Cheers f On Tue, May 6, 2014 at 12:44 AM, Sylvain Corlay wrote: > Hi all, > > We traditionally use sans-serif fonts for text meant to be displayed on a > screen while serif is generally used for print. For example, default > latex-beamer themes use sans-serif flavors of the computer modern font. > Shouldn't Mathjax do the same, especially in the context of the IPython > notebook, where the default fonts for markdown are sans-serif? > > Best, > Sylvain > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From roberto.colistete at gmail.com Tue May 6 01:24:15 2014 From: roberto.colistete at gmail.com (Roberto Colistete Jr.) Date: Tue, 06 May 2014 02:24:15 -0300 Subject: [IPython-dev] IPython (terminal & Notebook) 2.0.0 on Sailfish OS In-Reply-To: <510EC481.5060604@gmail.com> References: <510EC481.5060604@gmail.com> Message-ID: <536871FF.7030905@gmail.com> Hi, New release of IPython for Sailfish OS (used by the Jolla smartphone , Nokia N9 and Nexus 4), as well as for Mer & Nemo Mobile & Plasma Active. IPython 2.0.0 is released with full terminal and Notebook interfaces. See this post in topic "IPython (terminal, Notebook) 2.0.0 for Sailfish " of Talk Maemo.org forum, it also includes screenshots : http://talk.maemo.org/showthread.php?t=93139 SymPy 0.7.5 : http://talk.maemo.org/showthread.php?p=1424146#post1424146 and NumPy 1.7.1 : https://openrepos.net/content/rcolistete/numpy-sailfish-os are also available on Sailfish OS. Best regards from Brazil, Roberto -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Tue May 6 01:35:21 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 5 May 2014 22:35:21 -0700 Subject: [IPython-dev] IPython (terminal & Notebook) 2.0.0 on Sailfish OS In-Reply-To: <536871FF.7030905@gmail.com> References: <510EC481.5060604@gmail.com> <536871FF.7030905@gmail.com> Message-ID: Great!! Thanks for keeping us updated and continuing this work. On Mon, May 5, 2014 at 10:24 PM, Roberto Colistete Jr. < roberto.colistete at gmail.com> wrote: > Hi, > > New release of IPython for Sailfish OS (used by the Jolla smartphone, > Nokia N9 and Nexus 4), as well as for Mer & Nemo Mobile & Plasma Active. > > IPython 2.0.0 is released with full terminal and Notebook interfaces. > See this post in topic "IPython (terminal, Notebook) 2.0.0 for Sailfish " > of Talk Maemo.org forum, it also includes screenshots : > http://talk.maemo.org/showthread.php?t=93139 > > SymPy 0.7.5 : > http://talk.maemo.org/showthread.php?p=1424146#post1424146 > and NumPy 1.7.1 : > https://openrepos.net/content/rcolistete/numpy-sailfish-os > are also available on Sailfish OS. > > Best regards from Brazil, > > Roberto > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason.roberts at duke.edu Tue May 6 14:35:49 2014 From: jason.roberts at duke.edu (Jason Roberts) Date: Tue, 6 May 2014 14:35:49 -0400 Subject: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server Message-ID: <035b01cf695a$010b61d0$03222570$@duke.edu> I have a situation where I have to use MS Windows for a big parallel processing job, due to Windows dependencies on some steps in the job. I have successfully used iPython on a single 16-processor machine for this purpose. Thank you very much for making this so easy to use! It has saved me a huge amount of time. Now, if possible, I would like to set up a cluster that has multiple Windows servers (Windows Server 2008 R2 Standard). The iPython documentation (http://ipython.org/ipython-doc/dev/parallel/parallel_process.html) describes several options. The one that seems best oriented for Windows, at least under the assumption that Microsoft technologies are the best choice for Windows, is to use Microsoft HPC Pack 2008 (http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html). I tried this. Unfortunately HPC Pack appears to require Active Directory to be deployed. My shop runs a mixture of different operating systems, and while we have LDAP, we do not have a full-blown deployment of Active Directory. This appears to rule out the HPC Pack option. Are there other alternatives for running an iPython cluster composed of multiple Windows servers, and which is best? Should I look at mpiexec with Open MPI? Is there some way to do it with SSH, despite the iPython documentation saying not? Thanks for any advice you can provide, and thanks again for iPython's parallel processing infrastructure. It truly is a time saver. Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.corlay at gmail.com Tue May 6 14:58:55 2014 From: sylvain.corlay at gmail.com (Sylvain Corlay) Date: Tue, 6 May 2014 14:58:55 -0400 Subject: [IPython-dev] Markdown MathJaX and Serif In-Reply-To: References: Message-ID: Hi Fernando, Thank you for your reply. In the versions of Latex/Beamer that I have used lately, the default math fonts are sans-serif, but I don't know whether this is a recent change. I have looked into a few threads on MathJax and their seem to be a few tricks to get sans-serif fonts in MathJax but indeed it is not really supported. Best, Sylvain On Mon, May 5, 2014 at 9:09 PM, Fernando Perez wrote: > To the best of my understanding and some rather hasty googling, mathjax > doesn't provide sans-serif mathematical fonts. > > I'm also pretty sure that in Beamer, in most themes even though it uses > sans-serif CM variants, it still renders the math using serifed CM (or at > least it used to years ago). You have to switch to special packages to get > sans-serifed math, such as the cmbright one. > > In summary, the business of getting proper sans-serif math rendering is > highly non-trivial, and ultimately it's a question for the MathJax lists. > If mathjax supports it, we can too simply because we use unadulterated > mathjax. But if it's not something that mathjax can do by itself, IPython > isn't going to help... > > Cheers > > f > > > On Tue, May 6, 2014 at 12:44 AM, Sylvain Corlay wrote: > >> Hi all, >> >> We traditionally use sans-serif fonts for text meant to be displayed on a >> screen while serif is generally used for print. For example, default >> latex-beamer themes use sans-serif flavors of the computer modern font. >> Shouldn't Mathjax do the same, especially in the context of the IPython >> notebook, where the default fonts for markdown are sans-serif? >> >> Best, >> Sylvain >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tritemio at gmail.com Tue May 6 15:23:34 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Tue, 6 May 2014 12:23:34 -0700 Subject: [IPython-dev] Notebook and Qt dialog issue Message-ID: Hi, I have a problem opening a Qt dialog from a notebook if the magic %gui qt (or %matplotlib qt) is executed on the same cell as the dialog call. Seems a problem similar to this closed bug: https://github.com/ipython/ipython/issues/4997 but both in ipython 2.0 and on current master I have a kernel crash when executing the gui magic and the dialog call on the same cell. The issue is shown here: http://nbviewer.ipython.org/gist/tritemio/430d68d8b0efbbb13462 Can others reproduce the problem? If yes, should I open a new issue? Thanks, Antonio -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Tue May 6 15:36:31 2014 From: benjaminrk at gmail.com (MinRK) Date: Tue, 6 May 2014 12:36:31 -0700 Subject: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server In-Reply-To: <035b01cf695a$010b61d0$03222570$@duke.edu> References: <035b01cf695a$010b61d0$03222570$@duke.edu> Message-ID: An important thing to note about ipcluster is that it?s a very complicated way to do something that?s not very complicated. All it sets out to do is: 1. start a controller with ipcontroller 2. start 0-many engines with ipengine All of the complexity comes from abstracting how processes actually start, including where machines are, batch systems, etc. But in the end, it?s just doing: $> ipcluster $> for i in {1..n}; do ipengine; done ipcluster makes some simple cases easier, but if it doesn?t do what you want, you can always start the controller and engines yourself, with no loss of functionality. Plus, a tool that only deploys a cluster on your own system is much simpler than one that tries to work in a wide variety of contexts like ipcluster. The basic steps in getting a cluster up and running: 1. configure the controller to listen on an IP visible to the other machines (c.HubFactory.ip = '1.2.3.4' in ipcontroller_config.py on the controller machine. 2. start the controller with ipcontroller 3. copy .ipython/profile_default/security/ipcontroller-*.json to all of the various machines on which you plan to start engines. 4. start ipengine as many times as is appropriate on each machine. Step 3. is unnecessary if your systems are on a shared filesystem. For instance, here is a simple version that starts a controller and engines with ssh on Linux or OS X machines, putting processes in the background with screen: $> ssh controller_host screen -dmS ipcontroller $> for host in host1 host2; do > scp ~/.ipython/profile_default/security/ipcontroller-*.json $host:.ipython/profile_default/security/ > ssh $host 'for n in {1..3}; do screen -dmS ipengine; done' > done Which is *a lot* simpler than the hundreds of lines of ipcluster, and, frankly, better behaved than the SSH launchers that ship with IPython. If you have Windows analogues for ?tell machine X to run command Y,? you can make a similar script, tailored to your use. -MinRK On Tue, May 6, 2014 at 11:35 AM, Jason Roberts wrote: I have a situation where I have to use MS Windows for a big parallel > processing job, due to Windows dependencies on some steps in the job. I > have successfully used iPython on a single 16-processor machine for this > purpose. Thank you very much for making this so easy to use! It has saved > me a huge amount of time. > > > > Now, if possible, I would like to set up a cluster that has multiple > Windows servers (Windows Server 2008 R2 Standard). The iPython > documentation ( > http://ipython.org/ipython-doc/dev/parallel/parallel_process.html) > describes several options. The one that seems best oriented for Windows, at > least under the assumption that Microsoft technologies are the best choice > for Windows, is to use Microsoft HPC Pack 2008 ( > http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html). I > tried this. Unfortunately HPC Pack appears to require Active Directory to > be deployed. My shop runs a mixture of different operating systems, and > while we have LDAP, we do not have a full-blown deployment of Active > Directory. This appears to rule out the HPC Pack option. > > > > Are there other alternatives for running an iPython cluster composed of > multiple Windows servers, and which is best? Should I look at mpiexec with > Open MPI? Is there some way to do it with SSH, despite the iPython > documentation saying not? > > > > Thanks for any advice you can provide, and thanks again for iPython?s > parallel processing infrastructure. It truly is a time saver. > > > > Jason > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgill at tokiomillennium.com Tue May 6 16:47:41 2014 From: jgill at tokiomillennium.com (John Gill) Date: Tue, 6 May 2014 20:47:41 +0000 Subject: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server In-Reply-To: References: <035b01cf695a$010b61d0$03222570$@duke.edu> Message-ID: Thanks MinRK ? that is a very helpful explanation + suggestions. This question was pretty timely. I actually had ipython 1.x running fine with HPC, but was unable to get it to work under ipython2.0. I am working towards using ssh to start the cluster up, but as you point out with a shared file system that is a whole lot easier + I think the HPC is a pretty big hammer to crack a tiny nut ? and it tends to make a mess of the nut ;) As mentioned in a previous post I am also interested in creating non-homogeneous clusters eg engines with different cpu and memory resources, on different OS?es and with different software installed + have the scheduler deal with task dependencies whilst at the same time respecting any restrictions tasks have as to what kind of engine they need run on. John From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of MinRK Sent: Tuesday, May 06, 2014 4:37 PM To: IPython developers list Subject: Re: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server An important thing to note about ipcluster is that it?s a very complicated way to do something that?s not very complicated. All it sets out to do is: 1. start a controller with ipcontroller 2. start 0-many engines with ipengine All of the complexity comes from abstracting how processes actually start, including where machines are, batch systems, etc. But in the end, it?s just doing: $> ipcluster $> for i in {1..n}; do ipengine; done ipcluster makes some simple cases easier, but if it doesn?t do what you want, you can always start the controller and engines yourself, with no loss of functionality. Plus, a tool that only deploys a cluster on your own system is much simpler than one that tries to work in a wide variety of contexts like ipcluster. The basic steps in getting a cluster up and running: 1. configure the controller to listen on an IP visible to the other machines (c.HubFactory.ip = '1.2.3.4' in ipcontroller_config.py on the controller machine. 2. start the controller with ipcontroller 3. copy .ipython/profile_default/security/ipcontroller-*.json to all of the various machines on which you plan to start engines. 4. start ipengine as many times as is appropriate on each machine. Step 3. is unnecessary if your systems are on a shared filesystem. For instance, here is a simple version that starts a controller and engines with ssh on Linux or OS X machines, putting processes in the background with screen: $> ssh controller_host screen -dmS ipcontroller $> for host in host1 host2; do > scp ~/.ipython/profile_default/security/ipcontroller-*.json $host:.ipython/profile_default/security/ > ssh $host 'for n in {1..3}; do screen -dmS ipengine; done' > done Which is a lot simpler than the hundreds of lines of ipcluster, and, frankly, better behaved than the SSH launchers that ship with IPython. If you have Windows analogues for ?tell machine X to run command Y,? you can make a similar script, tailored to your use. -MinRK On Tue, May 6, 2014 at 11:35 AM, Jason Roberts > wrote: I have a situation where I have to use MS Windows for a big parallel processing job, due to Windows dependencies on some steps in the job. I have successfully used iPython on a single 16-processor machine for this purpose. Thank you very much for making this so easy to use! It has saved me a huge amount of time. Now, if possible, I would like to set up a cluster that has multiple Windows servers (Windows Server 2008 R2 Standard). The iPython documentation (http://ipython.org/ipython-doc/dev/parallel/parallel_process.html) describes several options. The one that seems best oriented for Windows, at least under the assumption that Microsoft technologies are the best choice for Windows, is to use Microsoft HPC Pack 2008 (http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html). I tried this. Unfortunately HPC Pack appears to require Active Directory to be deployed. My shop runs a mixture of different operating systems, and while we have LDAP, we do not have a full-blown deployment of Active Directory. This appears to rule out the HPC Pack option. Are there other alternatives for running an iPython cluster composed of multiple Windows servers, and which is best? Should I look at mpiexec with Open MPI? Is there some way to do it with SSH, despite the iPython documentation saying not? Thanks for any advice you can provide, and thanks again for iPython?s parallel processing infrastructure. It truly is a time saver. Jason _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ****************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason.roberts at duke.edu Tue May 6 16:51:54 2014 From: jason.roberts at duke.edu (Jason Roberts) Date: Tue, 6 May 2014 16:51:54 -0400 Subject: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server In-Reply-To: References: <035b01cf695a$010b61d0$03222570$@duke.edu> Message-ID: <050d01cf696d$039a7680$0acf6380$@duke.edu> Thank you, MinRK. I have no problem configuring and starting the controller and engines manually. I will look into that. Jason From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of MinRK Sent: Tuesday, May 06, 2014 3:37 PM To: IPython developers list Subject: Re: [IPython-dev] iPython cluster on multiple Windows servers, without Windows HPC Server An important thing to note about ipcluster is that it?s a very complicated way to do something that?s not very complicated. All it sets out to do is: 1. start a controller with ipcontroller 2. start 0-many engines with ipengine All of the complexity comes from abstracting how processes actually start, including where machines are, batch systems, etc. But in the end, it?s just doing: $> ipcluster $> for i in {1..n}; do ipengine; done ipcluster makes some simple cases easier, but if it doesn?t do what you want, you can always start the controller and engines yourself, with no loss of functionality. Plus, a tool that only deploys a cluster on your own system is much simpler than one that tries to work in a wide variety of contexts like ipcluster. The basic steps in getting a cluster up and running: 1. configure the controller to listen on an IP visible to the other machines (c.HubFactory.ip = '1.2.3.4' in ipcontroller_config.py on the controller machine. 2. start the controller with ipcontroller 3. copy .ipython/profile_default/security/ipcontroller-*.json to all of the various machines on which you plan to start engines. 4. start ipengine as many times as is appropriate on each machine. Step 3. is unnecessary if your systems are on a shared filesystem. For instance, here is a simple version that starts a controller and engines with ssh on Linux or OS X machines, putting processes in the background with screen: $> ssh controller_host screen -dmS ipcontroller $> for host in host1 host2; do > scp ~/.ipython/profile_default/security/ipcontroller-*.json $host:.ipython/profile_default/security/ > ssh $host 'for n in {1..3}; do screen -dmS ipengine; done' > done Which is a lot simpler than the hundreds of lines of ipcluster, and, frankly, better behaved than the SSH launchers that ship with IPython. If you have Windows analogues for ?tell machine X to run command Y,? you can make a similar script, tailored to your use. -MinRK On Tue, May 6, 2014 at 11:35 AM, Jason Roberts > wrote: I have a situation where I have to use MS Windows for a big parallel processing job, due to Windows dependencies on some steps in the job. I have successfully used iPython on a single 16-processor machine for this purpose. Thank you very much for making this so easy to use! It has saved me a huge amount of time. Now, if possible, I would like to set up a cluster that has multiple Windows servers (Windows Server 2008 R2 Standard). The iPython documentation (http://ipython.org/ipython-doc/dev/parallel/parallel_process.html) describes several options. The one that seems best oriented for Windows, at least under the assumption that Microsoft technologies are the best choice for Windows, is to use Microsoft HPC Pack 2008 (http://ipython.org/ipython-doc/dev/parallel/parallel_winhpc.html). I tried this. Unfortunately HPC Pack appears to require Active Directory to be deployed. My shop runs a mixture of different operating systems, and while we have LDAP, we do not have a full-blown deployment of Active Directory. This appears to rule out the HPC Pack option. Are there other alternatives for running an iPython cluster composed of multiple Windows servers, and which is best? Should I look at mpiexec with Open MPI? Is there some way to do it with SSH, despite the iPython documentation saying not? Thanks for any advice you can provide, and thanks again for iPython?s parallel processing infrastructure. It truly is a time saver. Jason _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Tue May 6 17:31:39 2014 From: moorepants at gmail.com (Jason Moore) Date: Tue, 6 May 2014 17:31:39 -0400 Subject: [IPython-dev] How to have independent call backs for single widget Message-ID: If I have a function that makes a plot, for example: def plot_something(parameter=1.0, view=1.0): axes = expensive_function(plt.gca(), parameter) less_expensive_function(axes, view) And I make it interactive: interactive(plot_something, parameter=(0.0, 1.0), view=(0.0, 1.0)) As it stands, both the expensive_function and the less_expensive_function run whether I drag the slider for either parameter, even though if I only drag the view parameter I could theoretically only call the less_expensive_function, thus making the widget respond faster. What is a good design to have a widget depend on two or more parameters and be able to have internal knowledge in the callback function on what parameter changed? So that you can avoid overhead in computation? Jason moorepants.info +01 530-601-9791 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Tue May 6 21:40:43 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 7 May 2014 02:40:43 +0100 Subject: [IPython-dev] Notebook and Qt dialog issue In-Reply-To: References: Message-ID: Yes, please do so. I can replicate the problem here. You might want to update the example with a try/except so it runs with either pyside or pyqt, it will make it easier for others to replicate. The pyqt import line should be: from PyQt4 import QtCore, QtGui Cheers f On Tue, May 6, 2014 at 8:23 PM, Antonino Ingargiola wrote: > Hi, > > I have a problem opening a Qt dialog from a notebook if the magic %gui qt > (or %matplotlib qt) is executed on the same cell as the dialog call. > > Seems a problem similar to this closed bug: > > https://github.com/ipython/ipython/issues/4997 > > but both in ipython 2.0 and on current master I have a kernel crash when > executing the gui magic and the dialog call on the same cell. > > The issue is shown here: > > http://nbviewer.ipython.org/gist/tritemio/430d68d8b0efbbb13462 > > Can others reproduce the problem? > > If yes, should I open a new issue? > > Thanks, > Antonio > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From teresa-stout at uiowa.edu Tue May 6 22:25:37 2014 From: teresa-stout at uiowa.edu (Stout, Teresa M) Date: Wed, 7 May 2014 02:25:37 +0000 Subject: [IPython-dev] Help printing and converting to pdf ipython notebook Message-ID: Hi there, I am using your ipython notebook interface to work on a class project. I need to turn the notebook in by paper form. Therefore I would like to print off the notebook or convert it into a pdf and print it. Currently I am getting the error 500:Internal Server Error when I try to print a preview. Please help. Thank you. Kind Regards, Teresa Stout -------------- next part -------------- An HTML attachment was scrubbed... URL: From tritemio at gmail.com Tue May 6 23:52:41 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Tue, 6 May 2014 20:52:41 -0700 Subject: [IPython-dev] Notebook and Qt dialog issue In-Reply-To: References: Message-ID: Done. https://github.com/ipython/ipython/issues/5798 Antonio On Tue, May 6, 2014 at 6:40 PM, Fernando Perez wrote: > Yes, please do so. I can replicate the problem here. You might want to > update the example with a try/except so it runs with either pyside or pyqt, > it will make it easier for others to replicate. The pyqt import line should > be: > > from PyQt4 import QtCore, QtGui > > > Cheers > > f > > > On Tue, May 6, 2014 at 8:23 PM, Antonino Ingargiola wrote: > >> Hi, >> >> I have a problem opening a Qt dialog from a notebook if the magic %gui qt >> (or %matplotlib qt) is executed on the same cell as the dialog call. >> >> Seems a problem similar to this closed bug: >> >> https://github.com/ipython/ipython/issues/4997 >> >> but both in ipython 2.0 and on current master I have a kernel crash when >> executing the gui magic and the dialog call on the same cell. >> >> The issue is shown here: >> >> http://nbviewer.ipython.org/gist/tritemio/430d68d8b0efbbb13462 >> >> Can others reproduce the problem? >> >> If yes, should I open a new issue? >> >> Thanks, >> Antonio >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dketch at gmail.com Wed May 7 03:24:14 2014 From: dketch at gmail.com (David Ketcheson) Date: Wed, 7 May 2014 10:24:14 +0300 Subject: [IPython-dev] Load custom.js file that is not in my ipython profile directory Message-ID: I'd like to load some javascript into the notebook from a .js file that is not in my ipython profile directory. This would allow me to distribute the notebook and the .js file together and have users get the benefit of the .js file in the notebook. I know how to do the analogous thing with .css files, based on the content of the last cell in this notebook: http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/01_Lesson01_sourceSink.ipynb How can I do the same for javascript? -David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Wed May 7 04:07:36 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Wed, 7 May 2014 10:07:36 +0200 Subject: [IPython-dev] Help printing and converting to pdf ipython notebook In-Reply-To: References: Message-ID: Hi, I suppose you are on IPython 2.0. can you directly try from the command line ? $ ipython nbconvert You should get a more informative message of why this is not working. -- Matthias Le 7 mai 2014 ? 04:25, Stout, Teresa M a ?crit : > Hi there, > > I am using your ipython notebook interface to work on a class project. I need to turn the notebook in by paper form. Therefore I would like to print off the notebook or convert it into a pdf and print it. Currently I am getting the error 500:Internal Server Error when I try to print a preview. Please help. Thank you. > > Kind Regards, > > Teresa Stout > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Wed May 7 04:41:10 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Wed, 7 May 2014 10:41:10 +0200 Subject: [IPython-dev] How to have independent call backs for single widget In-Reply-To: References: Message-ID: Le 6 mai 2014 ? 23:31, Jason Moore a ?crit : > If I have a function that makes a plot, for example: > > def plot_something(parameter=1.0, view=1.0): > axes = expensive_function(plt.gca(), parameter) > less_expensive_function(axes, view) > > And I make it interactive: > > interactive(plot_something, parameter=(0.0, 1.0), view=(0.0, 1.0)) > > As it stands, both the expensive_function and the less_expensive_function run whether I drag the slider for either parameter, even though if I only drag the view parameter I could theoretically only call the less_expensive_function, thus making the widget respond faster. > > What is a good design to have a widget depend on two or more parameters and be able to have internal knowledge in the callback function on what parameter changed? So that you can avoid overhead in computation? I suppose this is possible by doing custom widget and/or using the comm architecture directly. But that would be a **lot** of work. But couldn't you just use classic memoization of the expensive_function so that recalling it becomes less expensive ? -- M From bussonniermatthias at gmail.com Wed May 7 05:56:01 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Wed, 7 May 2014 11:56:01 +0200 Subject: [IPython-dev] Html object graph In-Reply-To: References: Message-ID: <74CB9B8B-35F3-4435-BC1C-D70058DEDD30@gmail.com> Hy, Le 3 mai 2014 ? 18:31, klo uo a ?crit : > Hey guys, > > are you are familiar with LinqPad? Thanks for the link. > If not, just to say it's a lightweight code scratchpad, that can connect to various databases and allow immediate Linq execution. It can also interpret any kind of .Net code (although currently without IronPython/Ruby). > > I thought to ask you about main output result pane - it's a very interesting Html table representation of dumped object(s), that adapts on the object type - allows collapsible nested levels, navigable deep Exception tree, can display images, rawhtml, hyperlinqs - user defined lambda functions that are executed on user click, ? I suppose each of theses features should be discussed independently. Most should Imho be directly implemented by library, like cyrile rossant HandsonTable for panda dataframe. Some other like Traceback could definitively be integrate din the core, have already been discussed, but pushed to a later point by lack of manpower. > Do you think something similar would fit in IPython? > As object inspection magic, or Qtconsole output pane, or else?? The response will depend on the exact feature, but instead of targeting a specific frontend I would suggest to think on how to get this into the object _repr_*_ or in the message spec if it is really impossible to do otherwise. -- M > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Wed May 7 05:59:46 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Wed, 7 May 2014 11:59:46 +0200 Subject: [IPython-dev] Execute python code from the notebook dashboard In-Reply-To: References: Message-ID: <165D1E19-760E-45C0-B33A-BCB69ADE3357@gmail.com> Le 3 mai 2014 ? 17:00, Clyde Fare a ?crit : > Hi, > > I'm trying to create a graphical IPython notebook dashboard that represents a collection of notebooks as a network, where nodes are the notebooks and the links between them are links between notebooks specified in markdown cells. > > I've got something that kind of works (https://github.com/Clyde-fare/ipython_graphdash) but it requires manual execution of some python code in the directory that IPython is launched from. I'd like to get rid of this requirement by having this python code execute when people click the refresh notebook list icon on the dashboard. > > I'm very much a beginner javascript wise but as far as I can tell when we open a notebook a python kernel is launched but at the dashboard there is no kernel active and so in order to execute some python code I would have to first launch a kernel and then pass it the code I want to run. I think I can probably go away and figure out how to do that but I wanted to check whether this was the right idea, or whether there was a simpler way? In IPython 2.0 you can access the list of notebook and kernels using the rest API under /api/* https://localhost:8888/api/notebooks https://localhost:8888/api/kernels ? So you can start notebook-less kernel to do whatever you like, and stop it afterward. You can also get notebook content through this way. So I would suggest building an alternative dashboard the use this API -- M > > Cheers > > Clyde > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From aron at ahmadia.net Wed May 7 09:15:23 2014 From: aron at ahmadia.net (Aron Ahmadia) Date: Wed, 7 May 2014 08:15:23 -0500 Subject: [IPython-dev] Load custom.js file that is not in my ipython profile directory In-Reply-To: References: Message-ID: %% javascript That and the profile are the two most common methods for enabling custom js. The previous method of embedding in Markdown is no longer allowed. A On Wednesday, May 7, 2014, David Ketcheson wrote: > I'd like to load some javascript into the notebook from a .js file that is > not in my ipython profile directory. This would allow me to distribute the > notebook and the .js file together and have users get the benefit of the > .js file in the notebook. > > I know how to do the analogous thing with .css files, based on the content > of the last cell in this notebook: > > > http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/01_Lesson01_sourceSink.ipynb > > How can I do the same for javascript? > > -David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Wed May 7 12:35:55 2014 From: moorepants at gmail.com (Jason Moore) Date: Wed, 7 May 2014 12:35:55 -0400 Subject: [IPython-dev] How to have independent call backs for single widget In-Reply-To: References: Message-ID: What would be classic memoization in this application? Just store axes globally or something? Jason moorepants.info +01 530-601-9791 On Wed, May 7, 2014 at 4:41 AM, Matthias BUSSONNIER < bussonniermatthias at gmail.com> wrote: > > Le 6 mai 2014 ? 23:31, Jason Moore a ?crit : > > > If I have a function that makes a plot, for example: > > > > def plot_something(parameter=1.0, view=1.0): > > axes = expensive_function(plt.gca(), parameter) > > less_expensive_function(axes, view) > > > > And I make it interactive: > > > > interactive(plot_something, parameter=(0.0, 1.0), view=(0.0, 1.0)) > > > > As it stands, both the expensive_function and the > less_expensive_function run whether I drag the slider for either parameter, > even though if I only drag the view parameter I could theoretically only > call the less_expensive_function, thus making the widget respond faster. > > > > What is a good design to have a widget depend on two or more parameters > and be able to have internal knowledge in the callback function on what > parameter changed? So that you can avoid overhead in computation? > > I suppose this is possible by doing custom widget and/or using the comm > architecture directly. > But that would be a **lot** of work. > But couldn't you just use classic memoization of the expensive_function so > that recalling it becomes less expensive ? > > -- > M > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Wed May 7 12:55:12 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 7 May 2014 12:55:12 -0400 Subject: [IPython-dev] How to have independent call backs for single widget In-Reply-To: References: Message-ID: On Wed, May 7, 2014 at 12:35 PM, Jason Moore wrote: > What would be classic memoization in this application? Just store axes > globally or something? > Maybe something like: http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Python/Memoizing%20Fibs.ipynb -Doug > > > Jason > moorepants.info > +01 530-601-9791 > > > On Wed, May 7, 2014 at 4:41 AM, Matthias BUSSONNIER < > bussonniermatthias at gmail.com> wrote: > >> >> Le 6 mai 2014 ? 23:31, Jason Moore a ?crit : >> >> > If I have a function that makes a plot, for example: >> > >> > def plot_something(parameter=1.0, view=1.0): >> > axes = expensive_function(plt.gca(), parameter) >> > less_expensive_function(axes, view) >> > >> > And I make it interactive: >> > >> > interactive(plot_something, parameter=(0.0, 1.0), view=(0.0, 1.0)) >> > >> > As it stands, both the expensive_function and the >> less_expensive_function run whether I drag the slider for either parameter, >> even though if I only drag the view parameter I could theoretically only >> call the less_expensive_function, thus making the widget respond faster. >> > >> > What is a good design to have a widget depend on two or more parameters >> and be able to have internal knowledge in the callback function on what >> parameter changed? So that you can avoid overhead in computation? >> >> I suppose this is possible by doing custom widget and/or using the comm >> architecture directly. >> But that would be a **lot** of work. >> But couldn't you just use classic memoization of the expensive_function >> so that recalling it becomes less expensive ? >> >> -- >> M >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Wed May 7 14:24:13 2014 From: moorepants at gmail.com (Jason Moore) Date: Wed, 7 May 2014 14:24:13 -0400 Subject: [IPython-dev] How to have independent call backs for single widget In-Reply-To: References: Message-ID: Thank's Doug. Perfect simple example. Jason moorepants.info +01 530-601-9791 On Wed, May 7, 2014 at 12:55 PM, Doug Blank wrote: > On Wed, May 7, 2014 at 12:35 PM, Jason Moore wrote: > >> What would be classic memoization in this application? Just store axes >> globally or something? >> > > Maybe something like: > > > http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Python/Memoizing%20Fibs.ipynb > > -Doug > > >> >> >> Jason >> moorepants.info >> +01 530-601-9791 >> >> >> On Wed, May 7, 2014 at 4:41 AM, Matthias BUSSONNIER < >> bussonniermatthias at gmail.com> wrote: >> >>> >>> Le 6 mai 2014 ? 23:31, Jason Moore a ?crit : >>> >>> > If I have a function that makes a plot, for example: >>> > >>> > def plot_something(parameter=1.0, view=1.0): >>> > axes = expensive_function(plt.gca(), parameter) >>> > less_expensive_function(axes, view) >>> > >>> > And I make it interactive: >>> > >>> > interactive(plot_something, parameter=(0.0, 1.0), view=(0.0, 1.0)) >>> > >>> > As it stands, both the expensive_function and the >>> less_expensive_function run whether I drag the slider for either parameter, >>> even though if I only drag the view parameter I could theoretically only >>> call the less_expensive_function, thus making the widget respond faster. >>> > >>> > What is a good design to have a widget depend on two or more >>> parameters and be able to have internal knowledge in the callback function >>> on what parameter changed? So that you can avoid overhead in computation? >>> >>> I suppose this is possible by doing custom widget and/or using the comm >>> architecture directly. >>> But that would be a **lot** of work. >>> But couldn't you just use classic memoization of the expensive_function >>> so that recalling it becomes less expensive ? >>> >>> -- >>> M >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Wed May 7 14:46:32 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 7 May 2014 11:46:32 -0700 Subject: [IPython-dev] IPython 'office hours', 17:00 UTC, Tuesday 13 May Message-ID: Next Tuesday, we'll be running another IPython office hours, a chance for anyone who's interested to chat with the core team about IPython development. Tuesday 13 May, 17:00 UTC (6pm BST, 10am PDT) https://plus.google.com/b/117293602899680632636/events/ckor559veeqg1ioqa38kqr9d2k8 Come and ask us about developing interactive widgets, the message spec changes for the next version of IPython, the new kernel spec system, or anything else about extending or working on IPython. E-mail me with your Google e-mail address if you'd like to join us in the video chat - we'll try to get as many people as possible into the Hangout. If we have a lot of people, or you're on a slow connection, join our development chat room, which we'll be logged into at the same time: http://www.hipchat.com/ghtNzvmfC Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Wed May 7 15:35:06 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 7 May 2014 15:35:06 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: <5367E44D.1040207@third-bit.com> References: <5367E44D.1040207@third-bit.com> Message-ID: On Mon, May 5, 2014 at 3:19 PM, Greg Wilson wrote: > http://github.com/gvwilson/sqlitemagic may also be of interest - it's > what we use to produce the Software Carpentry lesson on SQL. > That is a ridiculously simple and effective 50 lines of code. It isn't a SQLite shell, but it does 80% of what one would want from a SQLite kernel. Thanks for that! -Doug > thx, > G > > > On 2014-05-05 1:55 PM, Martin Gadbois wrote: > > Wow that was there but not found by Google... nice! I will take a close > look, thanks! > > > On Mon, May 5, 2014 at 11:52 AM, Jessica B. Hamrick > wrote: > >> Hi all, >> >> I jut wanted to throw out there a link to the SQL magic, which may be >> relevant: >> >> https://github.com/catherinedevlin/ipython-sql >> >> I know it's not a whole kernel, but may be a good starting place for at >> least seeing what other people have been thinking about along the same >> directions. >> >> Cheers, >> Jess >> >> -- >> UC Berkeley, Department of Psychology >> Computational Cognitive Science Lab >> http://www.jesshamrick.com >> >> >> On Mon, May 5, 2014 at 8:28 AM, Doug Blank wrote: >> >>> On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois wrote: >>> >>>> Hi! >>>> >>>> I would like to develop a SQLite kernel for IPython. >>>> >>>> Keyword, table and column completion would help building queries, and a >>>> dynamic output could resize text columns and have a proper notebook table >>>> output. >>>> >>>> To achieve that, I see two main directions: >>>> 1- Have an external kernel (like >>>> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >>>> coded in Python since there are no 0MQ bindings for SQLite. >>>> 2- Extend IPython itself to support SQLite, since I will need to >>>> write Python code anyway to support SQLite. >>>> >>> >>> I've wanted something like this for a while! I would like to >>> incorporate SQL as a language that could easily be used in a variety of >>> educational settings and other open source projects. But the utility of >>> such a project lies in the details of implementation. >>> >>> There are pros and cons to both approaches. But you could perhaps >>> develop it in a manner that could be used in either situation. What would >>> generally be useful would be to replicate the SQLite shell. It would be >>> great if the parser was written in pure Python, and had an interpreter, >>> also as much written in pure Python as possible. That is, it would be great >>> if the low-level C-based sqlite API was limited, and could be swapped out. >>> >>> That would allow other implementations of Python (Jython, PyPy, >>> IronPython) could use it with their own sqlite wrappers. But also, that >>> might make it useful for interfacing other data storages (for example, CSV >>> files, Django databases, etc.) >>> >>> The SQLite shell is actually a bit hairy. Here is a port of the C code >>> to C# for example: >>> >>> http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell >>> >>> You could also use the simple-kernel [1] as a way of quickly turning a >>> Python program into a kernel. (simple-kernel was just updated by Min, so >>> now it is correct; thanks, Min!) >>> >>> This might also have connections to the ADODB API [2]... they have >>> worked hard to make their connections be Python-implementation agnostic. >>> >>> Looking forward to see what you develop! >>> >>> -Doug >>> >>> [1] https://github.com/dsblank/simple_kernel >>> [2] https://sourceforge.net/projects/adodbapi >>> >>> >>>> >>>> What would this list recommend as an implementation strategy? >>>> Any example of creating an external kernel by reusing a subset of >>>> IPython itself? >>>> >>>> Thanks! >>>> >>>> -- >>>> Martin >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Martin > > > _______________________________________________ > IPython-dev mailing listIPython-dev at scipy.orghttp://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Wed May 7 15:42:02 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 7 May 2014 15:42:02 -0400 Subject: [IPython-dev] SQLite kernel In-Reply-To: References: Message-ID: On Mon, May 5, 2014 at 11:52 AM, Jessica B. Hamrick wrote: > Hi all, > > I jut wanted to throw out there a link to the SQL magic, which may be > relevant: > > https://github.com/catherinedevlin/ipython-sql > > I know it's not a whole kernel, but may be a good starting place for at > least seeing what other people have been thinking about along the same > directions. > That is a nicely integrated set of extensions... make good connections with the IPython python stack (pandas and matplotlib). Thanks for development, and sharing! -Doug > > Cheers, > Jess > > -- > UC Berkeley, Department of Psychology > Computational Cognitive Science Lab > http://www.jesshamrick.com > > > On Mon, May 5, 2014 at 8:28 AM, Doug Blank wrote: > >> On Mon, May 5, 2014 at 11:00 AM, Martin Gadbois wrote: >> >>> Hi! >>> >>> I would like to develop a SQLite kernel for IPython. >>> >>> Keyword, table and column completion would help building queries, and a >>> dynamic output could resize text columns and have a proper notebook table >>> output. >>> >>> To achieve that, I see two main directions: >>> 1- Have an external kernel (like >>> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb) >>> coded in Python since there are no 0MQ bindings for SQLite. >>> 2- Extend IPython itself to support SQLite, since I will need to write >>> Python code anyway to support SQLite. >>> >> >> I've wanted something like this for a while! I would like to incorporate >> SQL as a language that could easily be used in a variety of educational >> settings and other open source projects. But the utility of such a project >> lies in the details of implementation. >> >> There are pros and cons to both approaches. But you could perhaps develop >> it in a manner that could be used in either situation. What would generally >> be useful would be to replicate the SQLite shell. It would be great if the >> parser was written in pure Python, and had an interpreter, also as much >> written in pure Python as possible. That is, it would be great if the >> low-level C-based sqlite API was limited, and could be swapped out. >> >> That would allow other implementations of Python (Jython, PyPy, >> IronPython) could use it with their own sqlite wrappers. But also, that >> might make it useful for interfacing other data storages (for example, CSV >> files, Django databases, etc.) >> >> The SQLite shell is actually a bit hairy. Here is a port of the C code to >> C# for example: >> >> http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell >> >> You could also use the simple-kernel [1] as a way of quickly turning a >> Python program into a kernel. (simple-kernel was just updated by Min, so >> now it is correct; thanks, Min!) >> >> This might also have connections to the ADODB API [2]... they have worked >> hard to make their connections be Python-implementation agnostic. >> >> Looking forward to see what you develop! >> >> -Doug >> >> [1] https://github.com/dsblank/simple_kernel >> [2] https://sourceforge.net/projects/adodbapi >> >> >>> >>> What would this list recommend as an implementation strategy? >>> Any example of creating an external kernel by reusing a subset of >>> IPython itself? >>> >>> Thanks! >>> >>> -- >>> Martin >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tshead at sandia.gov Wed May 7 19:01:20 2014 From: tshead at sandia.gov (Shead, Timothy) Date: Wed, 7 May 2014 23:01:20 +0000 Subject: [IPython-dev] How can tell if code is executing within ipython / ipython notebook? Message-ID: <52EBD146-A6D6-4336-AF3C-3886A3146501@sandia.gov> I have some code that I?d like to execute only when run from within ipython ? is there any way to know? I?m already importing the required ipython modules in a try ? catch block, so my code handles the case where IPython isn?t installed, but that doesn?t address the case where ipython is installed but not in use. Thanks in advance, Tim Timothy M. Shead Sandia National Laboratories 1461, Scalable Analysis and Visualization -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3216 bytes Desc: not available URL: From pi at berkeley.edu Wed May 7 19:25:04 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Wed, 7 May 2014 16:25:04 -0700 Subject: [IPython-dev] How can tell if code is executing within ipython / ipython notebook? In-Reply-To: <52EBD146-A6D6-4336-AF3C-3886A3146501@sandia.gov> References: <52EBD146-A6D6-4336-AF3C-3886A3146501@sandia.gov> Message-ID: <20140507232504.GA5961@HbI-OTOH.berkeley.edu> Shead, Timothy, on 2014-05-07 23:01, wrote: > I have some code that I?d like to execute only when run from > within ipython ? is there any way to know? I?m already > importing the required ipython modules in a try ? catch block, > so my code handles the case where IPython isn?t installed, but > that doesn?t address the case where ipython is installed but > not in use. When running ipython, we expose the function `get_ipython` to get a handle on the current IPython instance. So in an interactive setting, you could just check for that and catch a name error. More generally, you can do this: from IPython import get_ipython Calling get_ipython() will return None if IPython isn't running, otherwise it will return an IPython shell object. best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org From tshead at sandia.gov Wed May 7 23:33:56 2014 From: tshead at sandia.gov (Shead, Timothy) Date: Thu, 8 May 2014 03:33:56 +0000 Subject: [IPython-dev] [EXTERNAL] How can tell if code is executing within ipython / ipython notebook? In-Reply-To: <20140507232504.GA5961@HbI-OTOH.berkeley.edu> References: <52EBD146-A6D6-4336-AF3C-3886A3146501@sandia.gov> <20140507232504.GA5961@HbI-OTOH.berkeley.edu> Message-ID: <98FACE25-FC58-4872-A5A4-81F1719B9A84@sandia.gov> Paul: Works like a charm, many thanks! Cheers, Tim Timothy M. Shead Sandia National Laboratories 1461, Scalable Analysis and Visualization On May 7, 2014, at 5:25 PM, Paul Ivanov > wrote: Shead, Timothy, on 2014-05-07 23:01, wrote: I have some code that I?d like to execute only when run from within ipython ? is there any way to know? I?m already importing the required ipython modules in a try ? catch block, so my code handles the case where IPython isn?t installed, but that doesn?t address the case where ipython is installed but not in use. When running ipython, we expose the function `get_ipython` to get a handle on the current IPython instance. So in an interactive setting, you could just check for that and catch a name error. More generally, you can do this: from IPython import get_ipython Calling get_ipython() will return None if IPython isn't running, otherwise it will return an IPython shell object. best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From klonuo at gmail.com Thu May 8 06:57:12 2014 From: klonuo at gmail.com (klo uo) Date: Thu, 8 May 2014 12:57:12 +0200 Subject: [IPython-dev] Html object graph In-Reply-To: <74CB9B8B-35F3-4435-BC1C-D70058DEDD30@gmail.com> References: <74CB9B8B-35F3-4435-BC1C-D70058DEDD30@gmail.com> Message-ID: Thanks Matthias for your reply. I agree that my mail was too general. I started learning .Net basics and one thing that attracted me most was Linq. Not that it just simplifies SQL by avoiding redundancy and providing shorcuts, but can be used the same way on XML documents, or general .Net objects (that provide IEnumerable(Of T) Interface) or even GUI elements that provide IObservable(T) Interface (RX extensions). Then using this LinqPad application as playground is a joy (compared to other options), similarly as working in IPython, and plus making .Net interpretable as Python is. I thought on how to connect both concepts but wasn't much sure, as I still don't know much about IPython machinery, and less about LinqPad, but that interactive Html table was IMHO worth mentioning, even as general idea. Now that you wrote about Pandas Html tables - maybe that's the right place for providing enhanced interactive object widget - on Pandas dataframe object. Let me mention Linq again, that it is great, but can't be compared to Pandas methods for data slicing for sure, and interfacing Pandas object with rich widget would be really great step. I did search for extensions to Html table dumped in IPython when I first saw it, as although it was interesting to see tabular data presented as such it still looked too basic, but I didn't find any. Cyrille Rossant's project that you wrote about looks interesting as it allows interactive changes to Pandas dataframe, and I hope he'll continue crafting it, by adding other possibilities. And as much as I would like to try to enhance IPython Html table myself, I'm repulsed by JavaScript - it's just something I don't ever want to do, unless I'm forced to. Hopefully that LinqPad table interface can inspire some developer one way or another. Cheers On Wed, May 7, 2014 at 11:56 AM, Matthias BUSSONNIER < bussonniermatthias at gmail.com> wrote: > Hy, > Le 3 mai 2014 ? 18:31, klo uo a ?crit : > > Hey guys, > > are you are familiar with LinqPad? > > > Thanks for the link. > > If not, just to say it's a lightweight code scratchpad, that can connect > to various databases and allow immediate Linq execution. It can also > interpret any kind of .Net code (although currently without > IronPython/Ruby). > > I thought to ask you about main output result pane - it's a very > interesting Html table representation of dumped object(s), that adapts on > the object type - allows collapsible nested levels, navigable deep > Exception tree, can display images, rawhtml, hyperlinqs - user defined > lambda functions that are executed on user click, ? > > > I suppose each of theses features should be discussed independently. Most > should Imho be directly implemented by library, > like cyrile rossant HandsonTable for panda dataframe. > > Some other like Traceback could definitively be integrate din the core, > have already been discussed, but > pushed to a later point by lack of manpower. > > Do you think something similar would fit in IPython? > As object inspection magic, or Qtconsole output pane, or else?? > > > The response will depend on the exact feature, but instead of targeting a > specific frontend I would suggest to think on how to get this into the > object _repr_*_ or > in the message spec if it is really impossible to do otherwise. > > -- > M > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clyde.fare at gmail.com Thu May 8 09:32:00 2014 From: clyde.fare at gmail.com (Clyde Fare) Date: Thu, 8 May 2014 14:32:00 +0100 Subject: [IPython-dev] Execute python code from the notebook dashboard In-Reply-To: <165D1E19-760E-45C0-B33A-BCB69ADE3357@gmail.com> References: <165D1E19-760E-45C0-B33A-BCB69ADE3357@gmail.com> Message-ID: Hi, Thanks for the suggestions. I can see that I can start a new kernel by posting to /api/kernels, but am a little lost at how to pass code to it using javascript. Is there a simple way to use services/kernels/js/kernel.js and hence kernel.execute? Or would I need to explicitly code up connecting to the kernel's ports and passing it the relevant messages as if I were writing a new kernel? Cheers Clyde On 7 May 2014 10:59, Matthias BUSSONNIER wrote: > > Le 3 mai 2014 ? 17:00, Clyde Fare a ?crit : > > Hi, > > I'm trying to create a graphical IPython notebook dashboard that > represents a collection of notebooks as a network, where nodes are the > notebooks and the links between them are links between notebooks specified > in markdown cells. > > I've got something that kind of works ( > https://github.com/Clyde-fare/ipython_graphdash) but it requires manual > execution of some python code in the directory that IPython is launched > from. I'd like to get rid of this requirement by having this python code > execute when people click the refresh notebook list icon on the dashboard. > > I'm very much a beginner javascript wise but as far as I can tell when we > open a notebook a python kernel is launched but at the dashboard there is > no kernel active and so in order to execute some python code I would have > to first launch a kernel and then pass it the code I want to run. I think I > can probably go away and figure out how to do that but I wanted to check > whether this was the right idea, or whether there was a simpler way? > > > In IPython 2.0 you can access the list of notebook and kernels using the > rest API under /api/* > https://localhost:8888/api/notebooks > https://localhost:8888/api/kernels > ? > So you can start notebook-less kernel to do whatever you like, and stop it > afterward. > You can also get notebook content through this way. > > So I would suggest building an alternative dashboard the use this API > > -- > M > > > Cheers > > Clyde > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmx555 at hotmail.com Thu May 8 13:11:09 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Thu, 8 May 2014 19:11:09 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? Message-ID: is it possible to pass parameters to IPython notebook via URL?How to reference/use those parameters in a notebook?e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Thu May 8 13:47:16 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 8 May 2014 10:47:16 -0700 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: Message-ID: You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > is it possible to pass parameters to IPython notebook via URL? > > How to reference/use those parameters in a notebook? > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb*?d1=20140101&d2=20140401* > > > Did not find an answer after searching around. Thanks! > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmx555 at hotmail.com Thu May 8 14:51:33 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Thu, 8 May 2014 20:51:33 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , Message-ID: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output.So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.villeneuve at gmail.com Thu May 8 15:29:26 2014 From: pierre.villeneuve at gmail.com (Pierre Villeneuve) Date: Thu, 8 May 2014 12:29:26 -0700 Subject: [IPython-dev] Notebook back/front data communications Message-ID: I'm working on building an image display custom widget based on the HTML CanvasElement. I want to be able to update image transform properties and to respond to mouse motion and clicks. My first time though I placed most of my JavaScript event handlers inside the widget's update() function. And it noticed I was updating the image data even for a small event like a change in the canvas width. It seemed like there was a lot of unnecessary processing and data transfer going on, so I decided to look into using the custom messages instead. I think my new approach is more efficient, but it does involve writing more code for my event handlers. ? ?Now I am wondering which of these two approaches is 'best', if there even is such a thing? Most of the widgets I see included with the IPython source code involve rather simple data structures, e.g. a single floating point number, or a text string. In my case I plan to work with ?large images. I think I just convinced myself that my second approach is more appropriate since my data is not trivially small. ? *Pierre Villeneuve* pierre.villeneuve at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Thu May 8 19:03:15 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 8 May 2014 16:03:15 -0700 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: Message-ID: On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: > Many thanks for the reply, I see. Indeed I am looking for a way to pass > parameters to the Python code on the kernel, e.g. .NET app calling out a > notebook with parameters and displaying output. > So, essentially the notebook server doesn't support this sort of > interaction at the moment? I assume I could do it by cloning and modifying > .ipynb template file before each request, still hoping there is a better > way than that. > No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK > > ------------------------------ > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 10:47:16 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > You can do this, but I wouldn't recommend it. The parameters will only be > available to the HTML/JS in the notebook page, and not the Python code on > the kernel. Plus, there is a chance that it would conflict with any future > use of url parameters by the notebook server. > > -MinRK > > > On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > > is it possible to pass parameters to IPython notebook via URL? > > How to reference/use those parameters in a notebook? > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb*?d1=20140101&d2=20140401* > > > Did not find an answer after searching around. Thanks! > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Fri May 9 03:36:53 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Fri, 9 May 2014 09:36:53 +0200 Subject: [IPython-dev] Execute python code from the notebook dashboard In-Reply-To: References: <165D1E19-760E-45C0-B33A-BCB69ADE3357@gmail.com> Message-ID: <33E5F7E1-9A05-4561-A8C0-8FA8152C97FE@gmail.com> Le 8 mai 2014 ? 15:32, Clyde Fare a ?crit : > Hi, > > Thanks for the suggestions. I can see that I can start a new kernel by posting to /api/kernels, but am a little lost at how to pass code to it using javascript. Is there a simple way to use services/kernels/js/kernel.js and hence kernel.execute? Or would I need to explicitly code up connecting to the kernel's ports and passing it the relevant messages as if I were writing a new kernel? Kernel.js should be pretty standalone. Once you pass it the information to connect to a kernel you can just use kernel.execute() with call backs. This should help : https://github.com/minrk/singlecell -- M From rmx555 at hotmail.com Fri May 9 16:25:15 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Fri, 9 May 2014 22:25:15 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , Message-ID: OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? do you plan for such an enhancement (passing parameters via URL to notebooks)? or which class would I need to modify to implement support for this? From: benjaminrk at gmail.com Date: Thu, 8 May 2014 16:03:15 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output.So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Fri May 9 16:43:07 2014 From: benjaminrk at gmail.com (MinRK) Date: Fri, 9 May 2014 13:43:07 -0700 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: Message-ID: On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: OK, thanks for clarifying it once again. Javascript API means user needs to > interact with the page once it's already loaded? > Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn?t recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. > do you plan for such an enhancement (passing parameters via URL to > notebooks)? > No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. or which class would I need to modify to implement support for this? > At least a few: - the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. - the KernelManager, which starts the kernel, which would need to be told about these parameters - possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. Depending on how much javascript you customize, there are probably a few combinations of classes to modify. Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. -MinRK ------------------------------ > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 16:03:15 -0700 > > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > > > On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: > > Many thanks for the reply, I see. Indeed I am looking for a way to pass > parameters to the Python code on the kernel, e.g. .NET app calling out a > notebook with parameters and displaying output. > So, essentially the notebook server doesn't support this sort of > interaction at the moment? I assume I could do it by cloning and modifying > .ipynb template file before each request, still hoping there is a better > way than that. > > > No, the server definitely doesn't support URLs affecting the kernel. If > you want to execute code on the Kernel, you would do this via the > Javascript APIs. > > -MinRK > > > > > ------------------------------ > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 10:47:16 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > You can do this, but I wouldn't recommend it. The parameters will only be > available to the HTML/JS in the notebook page, and not the Python code on > the kernel. Plus, there is a chance that it would conflict with any future > use of url parameters by the notebook server. > > -MinRK > > > On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > > is it possible to pass parameters to IPython notebook via URL? > > How to reference/use those parameters in a notebook? > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb*?d1=20140101&d2=20140401* > > > Did not find an answer after searching around. Thanks! > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmckerns at caltech.edu Fri May 9 16:55:53 2014 From: mmckerns at caltech.edu (Michael McKerns) Date: Fri, 9 May 2014 16:55:53 -0400 (EDT) Subject: [IPython-dev] potential extension to ?? magic, etc Message-ID: <50428.67.186.183.87.1399668953.squirrel@webmail.caltech.edu> I've been hacking a new feature in dill that extracts importable source code from python objects. It's still kind of fragile, and some things don't work like I want, but it's starting to come around enough that I thought I'd share. I think it might be useful for ipython's "??" and also for python.parallel if it still sends source in certain cases. I know parallelpython (pp) does, and it augments the heck out of what pp can send across the wire. There's several useful functions in dill.source and dill.detect, but the main one is dill.source.importable. With it, you can do something like this: >>> def foo(f): ... def squared(x): ... return f(x)**2 ... return squared ... >>> @foo ... def bar(x): ... return 2*x ... >>> print dill.source.importable(bar) def foo(f): def squared(x): return f(x)**2 return squared @foo def bar(x): return 2*x There are still some bugs, as this is fairly new. :) --- Mike McKerns California Institute of Technology TEL: (626)395-5773 or (626)590-8470 http://www.its.caltech.edu/~mmckerns mmckerns at caltech.edu From rmx555 at hotmail.com Sun May 11 02:51:14 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Sun, 11 May 2014 08:51:14 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , , , Message-ID: Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. RM From: benjaminrk at gmail.com Date: Fri, 9 May 2014 13:43:07 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn?t recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. do you plan for such an enhancement (passing parameters via URL to notebooks)? No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. or which class would I need to modify to implement support for this? At least a few: the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. the KernelManager, which starts the kernel, which would need to be told about these parameters possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. Depending on how much javascript you customize, there are probably a few combinations of classes to modify. Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. -MinRK From: benjaminrk at gmail.com Date: Thu, 8 May 2014 16:03:15 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output.So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From heathmatlock at gmail.com Sun May 11 17:05:43 2014 From: heathmatlock at gmail.com (heathmatlock) Date: Sun, 11 May 2014 16:05:43 -0500 Subject: [IPython-dev] Assistance request in forming a correct kernel_info_reply Message-ID: https://github.com/heath/ijs/blob/master/kernel.coffee If you uncomment line 48 in the source file linked, it will be easier to see the response sent back by ipython. All the messages I'm receiving back are of type kernel_info_request, even though I'm sending back what I think is the appropriate response. Relevant portion of documentation: http://ipython.org/ipython-doc/dev/development/messaging.html#kernel-info Also, when developing a kernel for a non-Python consumer, do others use a development version of ipython and utilize pdb as well, or have you mostly been utilizing your language's debugging facilities, i.e.: receive a zmq response, inspect the response(in this case, I'm having to print the response to the screen, eek), ctl-c, look at the documentation, build a response, repeat. -- Heath Matlock +1 256 274 4225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Sun May 11 17:19:32 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 11 May 2014 23:19:32 +0200 Subject: [IPython-dev] Assistance request in forming a correct kernel_info_reply In-Reply-To: References: Message-ID: Le 11 mai 2014 ? 23:05, heathmatlock a ?crit : > https://github.com/heath/ijs/blob/master/kernel.coffee > > If you uncomment line 48 in the source file linked, it will be easier to see the response sent back by ipython. All the messages I'm receiving back are of type kernel_info_request, even though I'm sending back what I think is the appropriate response. > > Relevant portion of documentation: > http://ipython.org/ipython-doc/dev/development/messaging.html#kernel-info > > Also, when developing a kernel for a non-Python consumer, do others use a development version of ipython and utilize pdb as well, or have you mostly been utilizing your language's debugging facilities, i.e.: receive a zmq response, inspect the response(in this case, I'm having to print the response to the screen, eek), ctl-c, look at the documentation, build a response, repeat. > Hi, I would suggest starting IPython with --debug flag to see messages going back and forth. Also the messages you send back and forth should not get only content. in the doc, you can get the all structure of messages here : http://ipython.org/ipython-doc/dev/development/messaging.html#python-functional-api and in the case of kernel_info_reply you should fill the content key with what you are doing above. Here is an full kernel_info_reply in my case : {'parent_header': {'date': datetime.datetime(2014, 5, 11, 23, 13, 51, 792276), 'username': 'bussonniermatthias', 'session': 'd3b54a91-ba51-4b53-9393-4bec584075d7', 'msg_id': '1544cb4c-9190-4651-9caf-17330ea382cc', 'msg_type': 'kernel_info_request'}, 'msg_type': 'kernel_info_reply', 'msg_id': 'cd756a25-15ab-4996-87b5-460633f4ea68', 'content': {'protocol_version': [4, 1], 'language_version': [2, 7, 6], 'language': 'python', 'ipython_version': [3, 0, 0, 'dev']}, 'header': {'date': datetime.datetime(2014, 5, 11, 23, 14, 9, 461599), 'username': u'kernel', 'session': u'c32cf515-60af-421b-890a-4b6d82a77ecc', 'msg_id': 'cd756a25-15ab-4996-87b5-460633f4ea68', 'msg_type': 'kernel_info_reply'}, 'tracker': , 'metadata': {}} A list of existing kernels and helpful resources https://github.com/ipython/ipython/wiki/Projects-using-IPython And an old toy js kernel. https://gist.github.com/Carreau/4279371 -- M > -- > Heath Matlock > +1 256 274 4225 > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From mark.voorhies at ucsf.edu Sun May 11 17:27:26 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Sun, 11 May 2014 14:27:26 -0700 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , , , Message-ID: <536FEB3E.3000501@ucsf.edu> On 05/10/2014 11:51 PM, Roman Max. wrote: > Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. > would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. Will the presented notebook result be interactive, or will all user interaction be via your .NET interface? If the latter, is there any disadvantage to just executing numpy/matplotlib/etc. code directly in a CPython or IronPython interpreter? --Mark > RM > > From: benjaminrk at gmail.com > Date: Fri, 9 May 2014 13:43:07 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: > > > > > > > > > OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? > > > > Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn?t recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. > > > > > > > do you plan for such an enhancement (passing parameters via URL to notebooks)? > > > No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. > > > > or which class would I need to modify to implement support for this? > > > At least a few: > > the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. > the KernelManager, which starts the kernel, which would need to be told about these parameters > possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. > > Depending on how much javascript you customize, there are probably a few combinations of classes to modify. > Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. > -MinRK > > > > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 16:03:15 -0700 > To: ipython-dev at scipy.org > > > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > > > > On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: > > > > > > > > Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output.So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. > > > > > > No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. > > > > > -MinRK > > From: benjaminrk at gmail.com > > > > > Date: Thu, 8 May 2014 10:47:16 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > > > > > You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. > > > > > > > -MinRK > > On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > > > > > > > > > > > > is it possible to pass parameters to IPython notebook via URL? > > > > > > How to reference/use those parameters in a notebook? > > > > > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 > > > > > > > > > > > Did not find an answer after searching around. Thanks! > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From zvoros at gmail.com Mon May 12 03:15:00 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Mon, 12 May 2014 09:15:00 +0200 Subject: [IPython-dev] difficulties with embedding svg figures Message-ID: <537074F4.8060208@gmail.com> Hi all, Every then and now (I think this happens, when something changes in the notebook latex templates, but I am not sure), I have difficulties embedding SVG figures. If I run the notebook and set InlineBackend.figure_format = 'png', the figures are included in the latex file. If I set InlineBackend.figure_format = 'svg', the figures are pulled out, converted to pdf, and placed in the support folder, but they are not linked in the latex file, their place is empty like \begin{center} \adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{} \end{center} Could someone point out, where and what I should fix in order to make this work? Many thanks, Zolt?n -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Mon May 12 08:58:38 2014 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 12 May 2014 08:58:38 -0400 Subject: [IPython-dev] Interrupting external kernel on Windows Message-ID: Devs, Attempting to interrupt an executing command on a third-party kernel on Windows. In fact, I went back to the simple_kernel [1], and I couldn't interrupt it either on Windows. Is there some special handling for interrupting a kernel on Windows? Thanks for any hints, -Doug [1] - https://github.com/dsblank/simple_kernel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgill at tokiomillennium.com Mon May 12 09:14:23 2014 From: jgill at tokiomillennium.com (John Gill) Date: Mon, 12 May 2014 13:14:23 +0000 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , , , Message-ID: If you are working with python and .NET you should take a look at pythonnet: https://github.com/pythonnet/pythonnet It allows you to work seamlessly with .NET objects from python. John From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Roman Max. Sent: Sunday, May 11, 2014 3:51 AM To: IPython developers list Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. RM ________________________________ From: benjaminrk at gmail.com Date: Fri, 9 May 2014 13:43:07 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Fri, May 9, 2014 at 1:25 PM, Roman Max. > wrote: OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn't recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. do you plan for such an enhancement (passing parameters via URL to notebooks)? No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. or which class would I need to modify to implement support for this? At least a few: * the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. * the KernelManager, which starts the kernel, which would need to be told about these parameters * possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. Depending on how much javascript you customize, there are probably a few combinations of classes to modify. Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. -MinRK ________________________________ From: benjaminrk at gmail.com Date: Thu, 8 May 2014 16:03:15 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Thu, May 8, 2014 at 11:51 AM, Roman Max. > wrote: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output. So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK ________________________________ From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. > wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ****************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon May 12 13:49:38 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 12 May 2014 10:49:38 -0700 Subject: [IPython-dev] Interrupting external kernel on Windows In-Reply-To: References: Message-ID: On 12 May 2014 05:58, Doug Blank wrote: > Attempting to interrupt an executing command on a third-party kernel on > Windows. In fact, I went back to the simple_kernel [1], and I couldn't > interrupt it either on Windows. Is there some special handling for > interrupting a kernel on Windows? Yes, it appears there is. On Windows, we make a 'Win32 event' [1], which the kernel process listens for using some machinery in pyzmq [2]. It looks like the event number that the child process needs to listen for is currently passed to the kernel as a command line argument, which we can only do when we know we're starting an IPython kernel - we should probably pass it as an environment variable which any kernel can use. [1] https://github.com/ipython/ipython/blob/master/IPython/kernel/launcher.py#L186 [2] https://github.com/ipython/ipython/blob/master/IPython/kernel/zmq/kernelapp.py#L164 Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Mon May 12 14:00:31 2014 From: doug.blank at gmail.com (Doug Blank) Date: Mon, 12 May 2014 14:00:31 -0400 Subject: [IPython-dev] Interrupting external kernel on Windows In-Reply-To: References: Message-ID: On Mon, May 12, 2014 at 1:49 PM, Thomas Kluyver wrote: > On 12 May 2014 05:58, Doug Blank wrote: > >> Attempting to interrupt an executing command on a third-party kernel on >> Windows. In fact, I went back to the simple_kernel [1], and I couldn't >> interrupt it either on Windows. Is there some special handling for >> interrupting a kernel on Windows? > > > Yes, it appears there is. On Windows, we make a 'Win32 event' [1], which > the kernel process listens for using some machinery in pyzmq [2]. It looks > like the event number that the child process needs to listen for is > currently passed to the kernel as a command line argument, which we can > only do when we know we're starting an IPython kernel - we should probably > pass it as an environment variable which any kernel can use. > Thanks for tracking that down! It would be good if the lack of a method of signaling 3rd-party Window's kernels could be considered a bug, so that a solution can be rolled into a IPython 2 update. Not being able to interrupt a kernel is a major issue. Started an item tracker here: https://github.com/ipython/ipython/issues/5840 -Doug > > [1] > https://github.com/ipython/ipython/blob/master/IPython/kernel/launcher.py#L186 > [2] > https://github.com/ipython/ipython/blob/master/IPython/kernel/zmq/kernelapp.py#L164 > > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmx555 at hotmail.com Mon May 12 15:15:22 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Mon, 12 May 2014 21:15:22 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: <536FEB3E.3000501@ucsf.edu> References: , , , , , , , , , , , , <536FEB3E.3000501@ucsf.edu> Message-ID: Hi, Mark, thanks for the suggestions. I have a feeling IPython offers a very sustainable solution in terms of maintainability and python packages updates. I am not sure if IronPython supports all the extra Python libraries i need (e.g. pandas, zipline)?Moreover, yes I would like to have my analytics visualisations being interactive. > Date: Sun, 11 May 2014 14:27:26 -0700 > From: mark.voorhies at ucsf.edu > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > On 05/10/2014 11:51 PM, Roman Max. wrote: > > Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. > > would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. > > Will the presented notebook result be interactive, or will all user interaction be via your .NET interface? > > If the latter, is there any disadvantage to just executing numpy/matplotlib/etc. code directly in a CPython or IronPython interpreter? > > --Mark > > > RM > > > > From: benjaminrk at gmail.com > > Date: Fri, 9 May 2014 13:43:07 -0700 > > To: ipython-dev at scipy.org > > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > > > On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: > > > > > > > > > > > > > > > > > > OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? > > > > > > > > Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn?t recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. > > > > > > > > > > > > > > do you plan for such an enhancement (passing parameters via URL to notebooks)? > > > > > > No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. > > > > > > > > or which class would I need to modify to implement support for this? > > > > > > At least a few: > > > > the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. > > the KernelManager, which starts the kernel, which would need to be told about these parameters > > possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. > > > > Depending on how much javascript you customize, there are probably a few combinations of classes to modify. > > Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. > > -MinRK > > > > > > > > From: benjaminrk at gmail.com > > Date: Thu, 8 May 2014 16:03:15 -0700 > > To: ipython-dev at scipy.org > > > > > > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > > > > > > > > > On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: > > > > > > > > > > > > > > > > Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output.So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. > > > > > > > > > > > > No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. > > > > > > > > > > -MinRK > > > > From: benjaminrk at gmail.com > > > > > > > > > > Date: Thu, 8 May 2014 10:47:16 -0700 > > To: ipython-dev at scipy.org > > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? > > > > > > > > > > > > You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. > > > > > > > > > > > > > > -MinRK > > > > On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > > > > > > > > > > > > > > > > > > > > > > > > is it possible to pass parameters to IPython notebook via URL? > > > > > > > > > > > > How to reference/use those parameters in a notebook? > > > > > > > > > > > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 > > > > > > > > > > > > > > > > > > > > > > Did not find an answer after searching around. Thanks! > > > > _______________________________________________ > > > > IPython-dev mailing list > > > > IPython-dev at scipy.org > > > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > > > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > > > > IPython-dev mailing list > > > > IPython-dev at scipy.org > > > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > > > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > > > > IPython-dev mailing list > > > > IPython-dev at scipy.org > > > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > > > > > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmx555 at hotmail.com Mon May 12 15:17:36 2014 From: rmx555 at hotmail.com (Roman Max.) Date: Mon, 12 May 2014 21:17:36 +0200 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , , , , , , , , , , Message-ID: Hi, John, thanks for the suggestion, will have a look into the project. Although my use case assumes interaction the other way -- from .NET to Python. From: jgill at tokiomillennium.com To: ipython-dev at scipy.org Date: Mon, 12 May 2014 13:14:23 +0000 Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? If you are working with python and .NET you should take a look at pythonnet: https://github.com/pythonnet/pythonnet It allows you to work seamlessly with .NET objects from python. John From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Roman Max. Sent: Sunday, May 11, 2014 3:51 AM To: IPython developers list Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. RM From: benjaminrk at gmail.com Date: Fri, 9 May 2014 13:43:07 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn?t recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. do you plan for such an enhancement (passing parameters via URL to notebooks)? No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. or which class would I need to modify to implement support for this? At least a few: the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. the KernelManager, which starts the kernel, which would need to be told about these parameters possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. Depending on how much javascript you customize, there are probably a few combinations of classes to modify. Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. -MinRK From: benjaminrk at gmail.com Date: Thu, 8 May 2014 16:03:15 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output. So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses.****************************************** _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgill at tokiomillennium.com Mon May 12 16:48:40 2014 From: jgill at tokiomillennium.com (John Gill) Date: Mon, 12 May 2014 20:48:40 +0000 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: , , , , , , , , , , , , Message-ID: You can also use pythonnet to embed python in .NET From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Roman Max. Sent: Monday, May 12, 2014 4:18 PM To: IPython developers list Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? Hi, John, thanks for the suggestion, will have a look into the project. Although my use case assumes interaction the other way -- from .NET to Python. ________________________________ From: jgill at tokiomillennium.com To: ipython-dev at scipy.org Date: Mon, 12 May 2014 13:14:23 +0000 Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? If you are working with python and .NET you should take a look at pythonnet: https://github.com/pythonnet/pythonnet It allows you to work seamlessly with .NET objects from python. John From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Roman Max. Sent: Sunday, May 11, 2014 3:51 AM To: IPython developers list Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? Many thanks for following up on this thread. I would like to use IPython notebook to perform and present some analytics in a .NET application. I've got a CefSharp (chrome) component integrated and can display notebook's output. Now trying to figure out how to pass parameters, so notebook calculates some analytics per selected object. E.g. depending on a selected object .NET prepares a CSV data input file, then the path of this file would need to be passed to an IPython notebook for further processing. After looking at your Singlecell.py code I think I start to understand where you are heading with giving hints with respect to JavaScript. Essentially .NET app could prepare HTML/Javascrpit part each time a new object is selected and pass it then over to IPython kernel for execution? Porbably will work, just doesn't look so clean, since python logic code will be in javascript files. would be still nice to have a way to communicate with the IPython only via URL, as not always client side presentation part(Javascript) can be involved. RM ________________________________ From: benjaminrk at gmail.com Date: Fri, 9 May 2014 13:43:07 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Fri, May 9, 2014 at 1:25 PM, Roman Max. > wrote: OK, thanks for clarifying it once again. Javascript API means user needs to interact with the page once it's already loaded? Yes. Or you can add custom javascript to the page to take action based on the parameters once the page is loaded. But again, I wouldn't recommend doing this, because it may conflict with server changes in the future. If you go this route, I would suggest using # instead of ?, since it would really be client-side only information. do you plan for such an enhancement (passing parameters via URL to notebooks)? No. The HTML/Javascript context of the page and notebook server are strongly decoupled from the Python environment of the Kernel. We have no plan to change this. or which class would I need to modify to implement support for this? At least a few: * the NotebookHandler, which renders the notebook page, which will receive the URL with parameters, but is not the URL that starts the kernel. * the KernelManager, which starts the kernel, which would need to be told about these parameters * possibly the Kernel itself, for taking the actual actions you wish these parameters to imply in the kernel process. Depending on how much javascript you customize, there are probably a few combinations of classes to modify. Can we back up a bit, and ask what you want to accomplish by passing these parameters? There may be a simpler solution than subclassing the entire notebook server. -MinRK ________________________________ From: benjaminrk at gmail.com Date: Thu, 8 May 2014 16:03:15 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? On Thu, May 8, 2014 at 11:51 AM, Roman Max. > wrote: Many thanks for the reply, I see. Indeed I am looking for a way to pass parameters to the Python code on the kernel, e.g. .NET app calling out a notebook with parameters and displaying output. So, essentially the notebook server doesn't support this sort of interaction at the moment? I assume I could do it by cloning and modifying .ipynb template file before each request, still hoping there is a better way than that. No, the server definitely doesn't support URLs affecting the kernel. If you want to execute code on the Kernel, you would do this via the Javascript APIs. -MinRK ________________________________ From: benjaminrk at gmail.com Date: Thu, 8 May 2014 10:47:16 -0700 To: ipython-dev at scipy.org Subject: Re: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? You can do this, but I wouldn't recommend it. The parameters will only be available to the HTML/JS in the notebook page, and not the Python code on the kernel. Plus, there is a chance that it would conflict with any future use of url parameters by the notebook server. -MinRK On Thu, May 8, 2014 at 10:11 AM, Roman Max. > wrote: is it possible to pass parameters to IPython notebook via URL? How to reference/use those parameters in a notebook? e.g. http://xxxyyzz.org:8888/mynotebook.ipynb?d1=20140101&d2=20140401 Did not find an answer after searching around. Thanks! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ****************************************** _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ****************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From clyde.fare at gmail.com Tue May 13 06:39:53 2014 From: clyde.fare at gmail.com (Clyde Fare) Date: Tue, 13 May 2014 11:39:53 +0100 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: Message-ID: "since python logic code will be in javascript files." You can leave the python as a .py file and load it as text before passing it to the kernel: $.get('/static/custom/my_file.py', function(python_code){ ... kernel.execute(python_code, callbacks) } Which can then be passed to the kernel. On 12 May 2014 21:48, John Gill wrote: > You can also use pythonnet to embed python in .NET > > > > *From:* ipython-dev-bounces at scipy.org [mailto: > ipython-dev-bounces at scipy.org] *On Behalf Of *Roman Max. > *Sent:* Monday, May 12, 2014 4:18 PM > > *To:* IPython developers list > *Subject:* Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > > Hi, John, > > > > thanks for the suggestion, will have a look into the project. Although my > use case assumes interaction the other way -- from .NET to Python. > ------------------------------ > > From: jgill at tokiomillennium.com > To: ipython-dev at scipy.org > Date: Mon, 12 May 2014 13:14:23 +0000 > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > If you are working with python and .NET you should take a look at > pythonnet: > > > > https://github.com/pythonnet/pythonnet > > > > It allows you to work seamlessly with .NET objects from python. > > > > John > > > > *From:* ipython-dev-bounces at scipy.org [mailto: > ipython-dev-bounces at scipy.org] *On Behalf Of *Roman Max. > *Sent:* Sunday, May 11, 2014 3:51 AM > *To:* IPython developers list > *Subject:* Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > > Many thanks for following up on this thread. I would like to use IPython > notebook to perform and present some analytics in a .NET application. I've > got a CefSharp (chrome) component integrated and can display notebook's > output. Now trying to figure out how to pass parameters, so notebook > calculates some analytics per selected object. E.g. depending on a selected > object .NET prepares a CSV data input file, then the path of this file > would need to be passed to an IPython notebook for further processing. > > After looking at your Singlecell.py code I think I start to understand > where you are heading with giving hints with respect to JavaScript. > Essentially .NET app could prepare HTML/Javascrpit part each time a new > object is selected and pass it then over to IPython kernel for execution? > Porbably will work, just doesn't look so clean, since python logic code > will be in javascript files. > > > > would be still nice to have a way to communicate with the IPython only via > URL, as not always client side presentation part(Javascript) can be > involved. > > > > RM > > > ------------------------------ > > From: benjaminrk at gmail.com > Date: Fri, 9 May 2014 13:43:07 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: > > > > OK, thanks for clarifying it once again. Javascript API means user needs > to interact with the page once it's already loaded? > > > > Yes. Or you can add custom javascript to the page to take action based on > the parameters once the page is loaded. But again, I wouldn?t recommend > doing this, because it may conflict with server changes in the future. If > you go this route, I would suggest using # instead of ?, since it would > really be client-side only information. > > > > > > do you plan for such an enhancement (passing parameters via URL to > notebooks)? > > > > No. The HTML/Javascript context of the page and notebook server are > strongly decoupled from the Python environment of the Kernel. We have no > plan to change this. > > > > or which class would I need to modify to implement support for this? > > > > At least a few: > > - the NotebookHandler, which renders the notebook page, which will > receive the URL with parameters, but is not the URL that starts the kernel. > - the KernelManager, which starts the kernel, which would need to be > told about these parameters > - possibly the Kernel itself, for taking the actual actions you wish > these parameters to imply in the kernel process. > > Depending on how much javascript you customize, there are probably a few > combinations of classes to modify. > > Can we back up a bit, and ask what you want to accomplish by passing these > parameters? There may be a simpler solution than subclassing the entire > notebook server. > > -MinRK > > > ------------------------------ > > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 16:03:15 -0700 > > > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > > > > On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: > > Many thanks for the reply, I see. Indeed I am looking for a way to pass > parameters to the Python code on the kernel, e.g. .NET app calling out a > notebook with parameters and displaying output. > > So, essentially the notebook server doesn't support this sort of > interaction at the moment? I assume I could do it by cloning and modifying > .ipynb template file before each request, still hoping there is a better > way than that. > > > > No, the server definitely doesn't support URLs affecting the kernel. If > you want to execute code on the Kernel, you would do this via the > Javascript APIs. > > > > -MinRK > > > > > > > ------------------------------ > > From: benjaminrk at gmail.com > Date: Thu, 8 May 2014 10:47:16 -0700 > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] is it possible to pass parameters to IPython > notebook via URL? > > > > You can do this, but I wouldn't recommend it. The parameters will only be > available to the HTML/JS in the notebook page, and not the Python code on > the kernel. Plus, there is a chance that it would conflict with any future > use of url parameters by the notebook server. > > > > -MinRK > > > > On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: > > is it possible to pass parameters to IPython notebook via URL? > > How to reference/use those parameters in a notebook? > > e.g. http://xxxyyzz.org:8888/mynotebook.ipynb*?d1=20140101&d2=20140401* > > > > Did not find an answer after searching around. Thanks! > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > This communication and any attachments contain information which is > confidential and may also be legally privileged. It is for the exclusive > use of the intended recipient(s). If you are not the intended recipient(s) > please note that any form of disclosure, distribution, copying, printing or > use of this communication or the information in it or in any attachments is > strictly prohibited and may be unlawful. If you have received this > communication in error, please return it with the title "received in error" > to postmaster at tokiomillennium.com and then permanently delete the email > and any attachments from your system. > > > > E-mail communications cannot be guaranteed to be secure or error free, as > information could be intercepted, corrupted, amended, lost, destroyed, > arrive late or incomplete, or contain viruses. It is the recipient's > responsibility to ensure that e-mail transmissions and any attachments are > virus free. We do not accept liability for any damages or other > consequences caused by information that is intercepted, corrupted, amended, > lost, destroyed, arrives late or incomplete or contains viruses. > > ****************************************** > > > _______________________________________________ IPython-dev mailing list > IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev > > This communication and any attachments contain information which is > confidential and may also be legally privileged. It is for the exclusive > use of the intended recipient(s). If you are not the intended recipient(s) > please note that any form of disclosure, distribution, copying, printing or > use of this communication or the information in it or in any attachments is > strictly prohibited and may be unlawful. If you have received this > communication in error, please return it with the title "received in error" > to postmaster at tokiomillennium.com and then permanently delete the email > and any attachments from your system. > > > > E-mail communications cannot be guaranteed to be secure or error free, as > information could be intercepted, corrupted, amended, lost, destroyed, > arrive late or incomplete, or contain viruses. It is the recipient's > responsibility to ensure that e-mail transmissions and any attachments are > virus free. We do not accept liability for any damages or other > consequences caused by information that is intercepted, corrupted, amended, > lost, destroyed, arrives late or incomplete or contains viruses. > > ****************************************** > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Tue May 13 14:58:49 2014 From: wes.turner at gmail.com (Wes Turner) Date: Tue, 13 May 2014 13:58:49 -0500 Subject: [IPython-dev] is it possible to pass parameters to IPython notebook via URL? In-Reply-To: References: Message-ID: You could parse JSON from a URL parameter: #parameter={'one':'two','three':'four'} -- Wes Turner On Tue, May 13, 2014 at 5:39 AM, Clyde Fare wrote: > "since python logic code will be in javascript files." > > You can leave the python as a .py file and load it as text before passing > it to the kernel: > > $.get('/static/custom/my_file.py', function(python_code){ > ... > kernel.execute(python_code, callbacks) > } > > > Which can then be passed to the kernel. > > > On 12 May 2014 21:48, John Gill wrote: > >> You can also use pythonnet to embed python in .NET >> >> >> >> *From:* ipython-dev-bounces at scipy.org [mailto: >> ipython-dev-bounces at scipy.org] *On Behalf Of *Roman Max. >> *Sent:* Monday, May 12, 2014 4:18 PM >> >> *To:* IPython developers list >> *Subject:* Re: [IPython-dev] is it possible to pass parameters to >> IPython notebook via URL? >> >> >> >> Hi, John, >> >> >> >> thanks for the suggestion, will have a look into the project. Although my >> use case assumes interaction the other way -- from .NET to Python. >> ------------------------------ >> >> From: jgill at tokiomillennium.com >> To: ipython-dev at scipy.org >> Date: Mon, 12 May 2014 13:14:23 +0000 >> Subject: Re: [IPython-dev] is it possible to pass parameters to IPython >> notebook via URL? >> >> If you are working with python and .NET you should take a look at >> pythonnet: >> >> >> >> https://github.com/pythonnet/pythonnet >> >> >> >> It allows you to work seamlessly with .NET objects from python. >> >> >> >> John >> >> >> >> *From:* ipython-dev-bounces at scipy.org [mailto: >> ipython-dev-bounces at scipy.org] *On Behalf Of *Roman Max. >> *Sent:* Sunday, May 11, 2014 3:51 AM >> *To:* IPython developers list >> *Subject:* Re: [IPython-dev] is it possible to pass parameters to >> IPython notebook via URL? >> >> >> >> Many thanks for following up on this thread. I would like to use IPython >> notebook to perform and present some analytics in a .NET application. I've >> got a CefSharp (chrome) component integrated and can display notebook's >> output. Now trying to figure out how to pass parameters, so notebook >> calculates some analytics per selected object. E.g. depending on a selected >> object .NET prepares a CSV data input file, then the path of this file >> would need to be passed to an IPython notebook for further processing. >> >> After looking at your Singlecell.py code I think I start to understand >> where you are heading with giving hints with respect to JavaScript. >> Essentially .NET app could prepare HTML/Javascrpit part each time a new >> object is selected and pass it then over to IPython kernel for execution? >> Porbably will work, just doesn't look so clean, since python logic code >> will be in javascript files. >> >> >> >> would be still nice to have a way to communicate with the IPython only >> via URL, as not always client side presentation part(Javascript) can be >> involved. >> >> >> >> RM >> >> >> ------------------------------ >> >> From: benjaminrk at gmail.com >> Date: Fri, 9 May 2014 13:43:07 -0700 >> To: ipython-dev at scipy.org >> Subject: Re: [IPython-dev] is it possible to pass parameters to IPython >> notebook via URL? >> >> On Fri, May 9, 2014 at 1:25 PM, Roman Max. wrote: >> >> >> >> OK, thanks for clarifying it once again. Javascript API means user needs >> to interact with the page once it's already loaded? >> >> >> >> Yes. Or you can add custom javascript to the page to take action based on >> the parameters once the page is loaded. But again, I wouldn?t recommend >> doing this, because it may conflict with server changes in the future. If >> you go this route, I would suggest using # instead of ?, since it would >> really be client-side only information. >> >> >> >> >> >> do you plan for such an enhancement (passing parameters via URL to >> notebooks)? >> >> >> >> No. The HTML/Javascript context of the page and notebook server are >> strongly decoupled from the Python environment of the Kernel. We have no >> plan to change this. >> >> >> >> or which class would I need to modify to implement support for this? >> >> >> >> At least a few: >> >> - the NotebookHandler, which renders the notebook page, which will >> receive the URL with parameters, but is not the URL that starts the kernel. >> - the KernelManager, which starts the kernel, which would need to be >> told about these parameters >> - possibly the Kernel itself, for taking the actual actions you wish >> these parameters to imply in the kernel process. >> >> Depending on how much javascript you customize, there are probably a few >> combinations of classes to modify. >> >> Can we back up a bit, and ask what you want to accomplish by passing >> these parameters? There may be a simpler solution than subclassing the >> entire notebook server. >> >> -MinRK >> >> >> ------------------------------ >> >> From: benjaminrk at gmail.com >> Date: Thu, 8 May 2014 16:03:15 -0700 >> >> >> To: ipython-dev at scipy.org >> Subject: Re: [IPython-dev] is it possible to pass parameters to IPython >> notebook via URL? >> >> >> >> >> >> On Thu, May 8, 2014 at 11:51 AM, Roman Max. wrote: >> >> Many thanks for the reply, I see. Indeed I am looking for a way to pass >> parameters to the Python code on the kernel, e.g. .NET app calling out a >> notebook with parameters and displaying output. >> >> So, essentially the notebook server doesn't support this sort of >> interaction at the moment? I assume I could do it by cloning and modifying >> .ipynb template file before each request, still hoping there is a better >> way than that. >> >> >> >> No, the server definitely doesn't support URLs affecting the kernel. If >> you want to execute code on the Kernel, you would do this via the >> Javascript APIs. >> >> >> >> -MinRK >> >> >> >> >> >> >> ------------------------------ >> >> From: benjaminrk at gmail.com >> Date: Thu, 8 May 2014 10:47:16 -0700 >> To: ipython-dev at scipy.org >> Subject: Re: [IPython-dev] is it possible to pass parameters to IPython >> notebook via URL? >> >> >> >> You can do this, but I wouldn't recommend it. The parameters will only be >> available to the HTML/JS in the notebook page, and not the Python code on >> the kernel. Plus, there is a chance that it would conflict with any future >> use of url parameters by the notebook server. >> >> >> >> -MinRK >> >> >> >> On Thu, May 8, 2014 at 10:11 AM, Roman Max. wrote: >> >> is it possible to pass parameters to IPython notebook via URL? >> >> How to reference/use those parameters in a notebook? >> >> e.g. http://xxxyyzz.org:8888/mynotebook.ipynb*?d1=20140101&d2=20140401* >> >> >> >> Did not find an answer after searching around. Thanks! >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> >> >> _______________________________________________ IPython-dev mailing list >> IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> >> >> _______________________________________________ IPython-dev mailing list >> IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> >> >> _______________________________________________ IPython-dev mailing list >> IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> This communication and any attachments contain information which is >> confidential and may also be legally privileged. It is for the exclusive >> use of the intended recipient(s). If you are not the intended recipient(s) >> please note that any form of disclosure, distribution, copying, printing or >> use of this communication or the information in it or in any attachments is >> strictly prohibited and may be unlawful. If you have received this >> communication in error, please return it with the title "received in error" >> to postmaster at tokiomillennium.com and then permanently delete the email >> and any attachments from your system. >> >> >> >> E-mail communications cannot be guaranteed to be secure or error free, as >> information could be intercepted, corrupted, amended, lost, destroyed, >> arrive late or incomplete, or contain viruses. It is the recipient's >> responsibility to ensure that e-mail transmissions and any attachments are >> virus free. We do not accept liability for any damages or other >> consequences caused by information that is intercepted, corrupted, amended, >> lost, destroyed, arrives late or incomplete or contains viruses. >> >> ****************************************** >> >> >> _______________________________________________ IPython-dev mailing list >> IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> This communication and any attachments contain information which is >> confidential and may also be legally privileged. It is for the exclusive >> use of the intended recipient(s). If you are not the intended recipient(s) >> please note that any form of disclosure, distribution, copying, printing or >> use of this communication or the information in it or in any attachments is >> strictly prohibited and may be unlawful. If you have received this >> communication in error, please return it with the title "received in error" >> to postmaster at tokiomillennium.com and then permanently delete the email >> and any attachments from your system. >> >> >> >> E-mail communications cannot be guaranteed to be secure or error free, as >> information could be intercepted, corrupted, amended, lost, destroyed, >> arrive late or incomplete, or contain viruses. It is the recipient's >> responsibility to ensure that e-mail transmissions and any attachments are >> virus free. We do not accept liability for any damages or other >> consequences caused by information that is intercepted, corrupted, amended, >> lost, destroyed, arrives late or incomplete or contains viruses. >> >> ****************************************** >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.fitzpatrick at gmail.com Wed May 14 17:41:49 2014 From: martin.fitzpatrick at gmail.com (Martin Fitzpatrick) Date: Wed, 14 May 2014 22:41:49 +0100 Subject: [IPython-dev] QtIPy: The IPython Notebook-based data automator Message-ID: Hello all I've released a new tool today that I think may be of general interest to the list. "QtIPy" is a small automaton utility that allows trigger-led running of IPython notebooks (using the excellent runipy: https://github.com/paulgb/runipy). You can define multiple "automatons" each of which can run multiple notebooks in sequence. Automatons can be triggered by file/directory modification, timers or manually. So, for example you can watch a folder for new files and automatically run an IPython notebook on the contents when updated (it can wait for >1 file too e.g. "trigger when all 5 files are changed"). Session variables are passed into the running notebook including watched folders, changed files, etc. so the notebook can act on them. The re-processed notebook is output to the destination folder and the notebook can also write figures or other results to the same location. Lists of automatons can be saved and reloaded in future. QtIPy is available for download from PyPi via `pip install QtIPy` then QtIPy to run. Requires PyQt5. Compatible with Python2.7 and 3.4. GPLv3 source available here: https://github.com/mfitzp/qtipy Thanks for reading Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Wed May 14 18:23:37 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 14 May 2014 15:23:37 -0700 Subject: [IPython-dev] QtIPy: The IPython Notebook-based data automator In-Reply-To: References: Message-ID: Hi Martin, On 14 May 2014 14:41, Martin Fitzpatrick wrote: > I've released a new tool today that I think may be of general interest to > the list. > > "QtIPy" is a small automaton utility that allows trigger-led running of > IPython notebooks (using the excellent runipy: > https://github.com/paulgb/runipy). > > You can define multiple "automatons" each of which can run multiple > notebooks in sequence. Automatons can be triggered by file/directory > modification, timers or manually. > Thanks for letting us know about this, it looks really interesting. Can you tell us a bit about the problem you wrote it to solve? I imagine it's something like preparing reports from data that's regularly updated, but it would be good to hear some more detail. Please do add it to the list of projects using IPython: https://github.com/ipython/ipython/wiki/Projects-using-IPython Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From simoncropper at fossworkflowguides.com Thu May 15 01:55:23 2014 From: simoncropper at fossworkflowguides.com (Simon Cropper) Date: Thu, 15 May 2014 15:55:23 +1000 Subject: [IPython-dev] Visual representation of SQL extracted data Message-ID: <537456CB.4030604@fossworkflowguides.com> Hi, New to iPython and the standard set of tools bound to the server (e.g. Pandas, etc). What I was wondering is there a library, or a notebook showing the use of the standard libraries bound to iPython, that allows tabular data to be formatted. Most examples I can find are essentially text dumps to the notebook. In contrast, graphs and images have great formatting ability. Why? I am looking at using iPython to data wrangle or munge large biological datasets (plant names, biological and ecological attributes, locational data). The notebook feature will allow others to visualize and follow steps used to collate, convert, merge, summarize and analyze this data. Is this doable, or am I trying to use the notebook in the wrong way? Any feedback would be appreciated. -- Cheers Simon Simon Cropper - Open Content Creator Free and Open Source Software Workflow Guides ------------------------------------------------------------ Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Python http://www.fossworkflowguides.com/scripting From martin.fitzpatrick at gmail.com Thu May 15 07:11:30 2014 From: martin.fitzpatrick at gmail.com (Martin Fitzpatrick) Date: Thu, 15 May 2014 12:11:30 +0100 Subject: [IPython-dev] QtIPy: The IPython Notebook-based data automator Message-ID: Thanks Thomas On 14 May 2014 17:23, Thomas Kluyver wrote: > Thanks for letting us know about this, it looks really interesting. Can you > tell us a bit about the problem you wrote it to solve? I imagine it's > something like preparing reports from data that's regularly updated, but it > would be good to hear some more detail. Scientific data analysis typically includes a lot of routine steps. For example in metabolomics (what I do) from the raw NMR data you typically phase correct, baseline correct, normalise, bin, and then do some kind of multivariate analysis (PCA or PLS-DA) to see if you've got anything of interest. Most of these steps can be automated as a 'good enough, first look' and so I wanted a way to quickly apply these steps together while getting a record of what was done - preferably by doing nothing more than drag-dropping a file into a specific folder. Doing it in an IPython notebook has the added benefit of inline-documentation of everything - which is incredibly useful when sharing processing approaches. I can now write a processing script, give it to a non-expert to run against data, and they get the processed outputs together with a nicely formatted report of how it happened. I think that's a great educational/transparency tool. I wrote it as an automator, but some additional features (per-automaton variables and configuration, including a manual-run config panel) are planned. > Please do add it to the list of projects using IPython: > https://github.com/ipython/ipython/wiki/Projects-using-IPython Done! Thanks again. Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.voorhies at ucsf.edu Thu May 15 21:11:44 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Thu, 15 May 2014 18:11:44 -0700 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: <537456CB.4030604@fossworkflowguides.com> References: <537456CB.4030604@fossworkflowguides.com> Message-ID: <537565D0.7070600@ucsf.edu> On 05/14/2014 10:55 PM, Simon Cropper wrote: > Hi, > > New to iPython and the standard set of tools bound to the server (e.g. > Pandas, etc). > > What I was wondering is there a library, or a notebook showing the use > of the standard libraries bound to iPython, that allows tabular data to > be formatted. > > Most examples I can find are essentially text dumps to the notebook. In > contrast, graphs and images have great formatting ability. > > Why? I am looking at using iPython to data wrangle or munge large > biological datasets (plant names, biological and ecological attributes, > locational data). The notebook feature will allow others to visualize > and follow steps used to collate, convert, merge, summarize and analyze > this data. > > Is this doable, or am I trying to use the notebook in the wrong way? > > Any feedback would be appreciated. > I think Pandas is good at this, but I haven't played with it. A general strategy is to use HTML from IPython.core.display to render pretty HTML tables. Here's an example for tabular display of protein sequence alignments (with a horizontal scrollbar and green/red coloring of gaps/mutations): def tabformat(seqs, names = None): """Return the given sequence alignment as a pretty HTML table. seqs = list of strings with a common length (one letter amino-acid codes or "-" for gap) names = sequence names as list of strings, same length as seqs """ if(names is None): names = [str(i) for i in xrange(len(seqs))] retval = '
\n' retval += '
\n' for n in names: retval += "\n" % n retval += "
%s
\n" retval += '
\n' for i in seqs: retval += "\n" for (j,k) in zip(i,seqs[0]): if(j != k): if(j == "-"): c = 'style="background-color: green"' else: c = 'style="background-color: red"' else: c = "" retval += '' % (c,j) retval += "\n" retval += "
%s
\n" retval += "
\n" return retval from IPython.core.display import HTML HTML(data = tabformat([i*100 for i in ("SPAM", "SPAM", "SCAM", "SPAM", "SPA-", "SPAM", "SPAN")])) --Mark From takowl at gmail.com Thu May 15 21:30:55 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 15 May 2014 18:30:55 -0700 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: <537565D0.7070600@ucsf.edu> References: <537456CB.4030604@fossworkflowguides.com> <537565D0.7070600@ucsf.edu> Message-ID: There's also a couple of tools to build tables, with unfortunately almost identical names: - IPyTables (my code) - https://gist.github.com/takluyver/5098835 (I mean to rename this and make it a proper repo at some point) - ipy_table - https://github.com/epmoyer/ipy_table Thomas On 15 May 2014 18:11, Mark Voorhies wrote: > On 05/14/2014 10:55 PM, Simon Cropper wrote: > > Hi, > > > > New to iPython and the standard set of tools bound to the server (e.g. > > Pandas, etc). > > > > What I was wondering is there a library, or a notebook showing the use > > of the standard libraries bound to iPython, that allows tabular data to > > be formatted. > > > > Most examples I can find are essentially text dumps to the notebook. In > > contrast, graphs and images have great formatting ability. > > > > Why? I am looking at using iPython to data wrangle or munge large > > biological datasets (plant names, biological and ecological attributes, > > locational data). The notebook feature will allow others to visualize > > and follow steps used to collate, convert, merge, summarize and analyze > > this data. > > > > Is this doable, or am I trying to use the notebook in the wrong way? > > > > Any feedback would be appreciated. > > > > I think Pandas is good at this, but I haven't played with it. > > A general strategy is to use HTML from IPython.core.display to render > pretty HTML tables. > > Here's an example for tabular display of protein sequence alignments (with > a horizontal > scrollbar and green/red coloring of gaps/mutations): > > def tabformat(seqs, names = None): > """Return the given sequence alignment as a pretty HTML table. > seqs = list of strings with a common length (one letter amino-acid > codes or "-" for gap) > names = sequence names as list of strings, same length as seqs > """ > if(names is None): > names = [str(i) for i in xrange(len(seqs))] > retval = '
\n' > retval += '
\n' > for n in names: > retval += "\n" % n > retval += "
%s
\n" > retval += '
\n' > for i in seqs: > retval += "\n" > for (j,k) in zip(i,seqs[0]): > if(j != k): > if(j == "-"): > c = 'style="background-color: green"' > else: > c = 'style="background-color: red"' > else: > c = "" > retval += '' % (c,j) > retval += "\n" > retval += "
%s
\n" > retval += "
\n" > return retval > > from IPython.core.display import HTML > HTML(data = tabformat([i*100 for i in ("SPAM", "SPAM", "SCAM", "SPAM", > "SPA-", "SPAM", "SPAN")])) > > --Mark > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simoncropper at fossworkflowguides.com Thu May 15 21:39:03 2014 From: simoncropper at fossworkflowguides.com (Simon Cropper) Date: Fri, 16 May 2014 11:39:03 +1000 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: <537565D0.7070600@ucsf.edu> References: <537456CB.4030604@fossworkflowguides.com> <537565D0.7070600@ucsf.edu> Message-ID: <53756C37.2050809@fossworkflowguides.com> On 16/05/14 11:11, Mark Voorhies wrote: > On 05/14/2014 10:55 PM, Simon Cropper wrote: >> Hi, >> >> New to iPython and the standard set of tools bound to the server (e.g. >> Pandas, etc). >> >> What I was wondering is there a library, or a notebook showing the use >> of the standard libraries bound to iPython, that allows tabular data to >> be formatted. >> >> Most examples I can find are essentially text dumps to the notebook. In >> contrast, graphs and images have great formatting ability. >> >> Why? I am looking at using iPython to data wrangle or munge large >> biological datasets (plant names, biological and ecological attributes, >> locational data). The notebook feature will allow others to visualize >> and follow steps used to collate, convert, merge, summarize and analyze >> this data. >> >> Is this doable, or am I trying to use the notebook in the wrong way? >> >> Any feedback would be appreciated. >> > > I think Pandas is good at this, but I haven't played with it. > > A general strategy is to use HTML from IPython.core.display to render pretty HTML tables. > > Here's an example for tabular display of protein sequence alignments (with a horizontal > scrollbar and green/red coloring of gaps/mutations): > > def tabformat(seqs, names = None): > """Return the given sequence alignment as a pretty HTML table. > seqs = list of strings with a common length (one letter amino-acid codes or "-" for gap) > names = sequence names as list of strings, same length as seqs > """ > if(names is None): > names = [str(i) for i in xrange(len(seqs))] > retval = '
\n' > retval += '
\n' > for n in names: > retval += "\n" % n > retval += "
%s
\n" > retval += '
\n' > for i in seqs: > retval += "\n" > for (j,k) in zip(i,seqs[0]): > if(j != k): > if(j == "-"): > c = 'style="background-color: green"' > else: > c = 'style="background-color: red"' > else: > c = "" > retval += '' % (c,j) > retval += "\n" > retval += "
%s
\n" > retval += "
\n" > return retval > > from IPython.core.display import HTML > HTML(data = tabformat([i*100 for i in ("SPAM", "SPAM", "SCAM", "SPAM", "SPA-", "SPAM", "SPAN")])) > > --Mark > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > Thanks Mark, I am looking at Pandas at the moment. I tried your script and it works really well. To date I have generally coded my own HTML code like yours, saved it in a file then opened it in a browser. The problem was that the data was static -- that is you could not poke the browser to refresh once you reran the script (at least in Linux; in Windows you would use automation to open an instance then use the refresh method using VBA or something similar but I am looking for cross-platform solutions). What I really like about your example and the iPython Notebook is that I can change the sequence and have the HTML table dynamically update. This allows for errors to be detected quite quickly. Just a follow on question. I note the HTML table rendered within a 'frame'. That is, the horizontal scroll bar appeared. Is this object/frame able to be changed or controlled? -- Cheers Simon Simon Cropper - Open Content Creator Free and Open Source Software Workflow Guides ------------------------------------------------------------ Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Python http://www.fossworkflowguides.com/scripting From simoncropper at fossworkflowguides.com Thu May 15 21:46:43 2014 From: simoncropper at fossworkflowguides.com (Simon Cropper) Date: Fri, 16 May 2014 11:46:43 +1000 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: References: <537456CB.4030604@fossworkflowguides.com> <537565D0.7070600@ucsf.edu> Message-ID: <53756E03.6020504@fossworkflowguides.com> On 16/05/14 11:30, Thomas Kluyver wrote: > There's also a couple of tools to build tables, with unfortunately > almost identical names: > > - IPyTables (my code) - https://gist.github.com/takluyver/5098835 (I > mean to rename this and make it a proper repo at some point) > - ipy_table - https://github.com/epmoyer/ipy_table > > Thomas > > > On 15 May 2014 18:11, Mark Voorhies > wrote: > > On 05/14/2014 10:55 PM, Simon Cropper wrote: > > Hi, > > > > New to iPython and the standard set of tools bound to the server > (e.g. > > Pandas, etc). > > > > What I was wondering is there a library, or a notebook showing > the use > > of the standard libraries bound to iPython, that allows tabular > data to > > be formatted. > > > > Most examples I can find are essentially text dumps to the > notebook. In > > contrast, graphs and images have great formatting ability. > > > > Why? I am looking at using iPython to data wrangle or munge large > > biological datasets (plant names, biological and ecological > attributes, > > locational data). The notebook feature will allow others to visualize > > and follow steps used to collate, convert, merge, summarize and > analyze > > this data. > > > > Is this doable, or am I trying to use the notebook in the wrong way? > > > > Any feedback would be appreciated. > > > > I think Pandas is good at this, but I haven't played with it. > > A general strategy is to use HTML from IPython.core.display to > render pretty HTML tables. > > Here's an example for tabular display of protein sequence alignments > (with a horizontal > scrollbar and green/red coloring of gaps/mutations): > > def tabformat(seqs, names = None): > """Return the given sequence alignment as a pretty HTML table. > seqs = list of strings with a common length (one letter > amino-acid codes or "-" for gap) > names = sequence names as list of strings, same length as seqs > """ > if(names is None): > names = [str(i) for i in xrange(len(seqs))] > retval = '
\n' > retval += '
\n' > for n in names: > retval += "\n" % n > retval += "
%s
\n" > retval += '
\n' > for i in seqs: > retval += "\n" > for (j,k) in zip(i,seqs[0]): > if(j != k): > if(j == "-"): > c = 'style="background-color: green"' > else: > c = 'style="background-color: red"' > else: > c = "" > retval += '' % (c,j) > retval += "\n" > retval += "
%s
\n" > retval += "
\n" > return retval > > from IPython.core.display import HTML > HTML(data = tabformat([i*100 for i in ("SPAM", "SPAM", "SCAM", > "SPAM", "SPA-", "SPAM", "SPAN")])) > > --Mark > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > Thanks Thomas, How do you use your scripts? Can you provide an example. I looked at your GIST but could not find an explanation of how to use it. -- Cheers Simon Simon Cropper - Open Content Creator Free and Open Source Software Workflow Guides ------------------------------------------------------------ Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Python http://www.fossworkflowguides.com/scripting From takowl at gmail.com Thu May 15 21:54:00 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 15 May 2014 18:54:00 -0700 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: <53756E03.6020504@fossworkflowguides.com> References: <537456CB.4030604@fossworkflowguides.com> <537565D0.7070600@ucsf.edu> <53756E03.6020504@fossworkflowguides.com> Message-ID: On 15 May 2014 18:46, Simon Cropper wrote: > How do you use your scripts? Can you provide an example. I looked at > your GIST but could not find an explanation of how to use it. > To create a table in one shot: Table(TableHeaderRow('Planet', 'Orbit in Earth days'), ['Mercury', 88], ['Venus', 584]) To build it up row-by-row: t = Table(TableHeaderRow('Planet', 'Orbit in Earth days')) for planet in solar_system: t.append_row(planet.name, planet.orbit_time) To display it: t # At the end of a cell IPython.display.display(t) # Anywhere in the code Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.voorhies at ucsf.edu Fri May 16 00:42:41 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Thu, 15 May 2014 21:42:41 -0700 Subject: [IPython-dev] Visual representation of SQL extracted data In-Reply-To: <53756C37.2050809@fossworkflowguides.com> References: <537456CB.4030604@fossworkflowguides.com> <537565D0.7070600@ucsf.edu> <53756C37.2050809@fossworkflowguides.com> Message-ID: <53759741.7020302@ucsf.edu> On 05/15/2014 06:39 PM, Simon Cropper wrote: > Just a follow on question. I note the HTML table rendered within a > 'frame'. That is, the horizontal scroll bar appeared. Is this > object/frame able to be changed or controlled? The scroll bar is due to giving the table a CSS "overflow:auto" attribute: C.f. http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping If you change the height/width/overflow attributes, you can vary the behavior. A List Apart (http://alistapart.com/) is a nice source of CSS hacks. --Mark From menyland at gmail.com Fri May 16 11:52:20 2014 From: menyland at gmail.com (Christopher) Date: Fri, 16 May 2014 11:52:20 -0400 Subject: [IPython-dev] Doing some dev Message-ID: <53763434.4030108@gmail.com> Hello, So I still use the IPython command line console a lot especially for debugging purposes. I utilize the Tracer class to set physical break points often but sometimes would like to do conditional breaks instead. Additionally then I have the clutter of the extra import for debugging purpose. So I tried calling the debugger from the command line in the same way you would call the regular Python debugger python -m IPython.core.debugger myscript.py no dice. So I clone the dev branch from git hub and started messing around. I managed to get something that works although it involves monkey patching the IPython Pdb class into the Python pdb module. However I get the desired result with my small test case. So then the question becomes if I want to propose that this be added to the IPython code what do I do? I looked around on the site and couldn't find anything solid so I decided to post here. Additionally keep up the good work. I haven't gotten to play with the notebooks yet my environment at work is fairly restrictive but I hope to soon. Chris Nyland From takowl at gmail.com Fri May 16 12:02:16 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 16 May 2014 09:02:16 -0700 Subject: [IPython-dev] Doing some dev In-Reply-To: <53763434.4030108@gmail.com> References: <53763434.4030108@gmail.com> Message-ID: Hi Chris, On 16 May 2014 08:52, Christopher wrote: > So then the question becomes if I want to propose that this be added to > the IPython code what do I do? I looked around on the site and couldn't > find anything solid so I decided to post here. > In most cases the best way to propose a change is to fork IPython on Github and make a pull request. https://github.com/ipython/ipython If you're not comfortable with git, you can send a patch file, and one of us will create a pull request for you. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From darcamo at gmail.com Fri May 16 13:26:02 2014 From: darcamo at gmail.com (darcamo at gmail.com) Date: Fri, 16 May 2014 14:26:02 -0300 Subject: [IPython-dev] Doing some dev In-Reply-To: References: <53763434.4030108@gmail.com> Message-ID: A very good debugger for Python is pudb (https://pypi.python.org/pypi/pudb). You can start the debugger with just "pudb my-script.py" and when stopped at some point it allows you to run ipython to check the variables, test something, etc.. It can also use conditional breakpoints. -- Darlan Cavalcante Moreira 2014-05-16 13:02 GMT-03:00 Thomas Kluyver : > Hi Chris, > > On 16 May 2014 08:52, Christopher wrote: > >> So then the question becomes if I want to propose that this be added to >> the IPython code what do I do? I looked around on the site and couldn't >> find anything solid so I decided to post here. >> > > In most cases the best way to propose a change is to fork IPython on > Github and make a pull request. > https://github.com/ipython/ipython > > If you're not comfortable with git, you can send a patch file, and one of > us will create a pull request for you. > > Thanks, > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tritemio at gmail.com Fri May 16 15:24:54 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 16 May 2014 12:24:54 -0700 Subject: [IPython-dev] Distributing evaluated notebooks that require big-ish data Message-ID: Hi, I'm working on a software for single-molecule FRET analysis (FRETBursts)[1] that heavily relies on ipython notebook to run the analysis. I provide some evaluated notebooks serving as tutorials in a separate repository (FRETBursts_notebooks). The reference documentation (mostly installation instructions and API) is hosted on ReadTheDocs [3]. I have concerns on the viability of this approach since the notebooks repository can easily grow to hundreds of MB given the high number of images. Maintaining a second repository it is also and additional burden. Ideally I would like to generate the notebooks dynamically from unevaluated notebooks in the original source repository. However the data necessary to reproduce the analysis is ~150MB (hosted on figshare [4]), and I may add more datasets in the future. So I'm asking for suggestions. I like the simple concept of a notebook repository with links to nbviewer, but seems that the solution is not scalable. I don't think RTD can handle downloading and data processing that requires several minutes to execute on modern desktops. So, what's left? Anybody has a similar issue? Best, Antonio [1] FRETBursts: https://github.com/tritemio/FRETBursts [2] FRETBursts_notebooks: https://github.com/tritemio/FRETBursts_notebooks [3] FRETBursts documentation: http://fretbursts.readthedocs.org/index.html [4] FRETBursts datatsets: http://dx.doi.org/10.6084/m9.figshare.1019906 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fordas at uw.edu Fri May 16 16:01:33 2014 From: fordas at uw.edu (Alex Ford) Date: Fri, 16 May 2014 13:01:33 -0700 Subject: [IPython-dev] Doing some dev In-Reply-To: References: <53763434.4030108@gmail.com> Message-ID: The ipdb module (https://pypi.python.org/pypi/ipdb) handles this admirably. ----- Alex Ford Baker Group, Biomolecular Structure and Design University of Washington fordas at uw.edu 206.659.6559 On Fri, May 16, 2014 at 10:26 AM, darcamo at gmail.com wrote: > A very good debugger for Python is pudb (https://pypi.python.org/pypi/pudb > ). > You can start the debugger with just > "pudb my-script.py" > and when stopped at some point it allows you to run ipython to check the > variables, test something, etc.. > > It can also use conditional breakpoints. > > -- > Darlan Cavalcante Moreira > > > > 2014-05-16 13:02 GMT-03:00 Thomas Kluyver : > >> Hi Chris, >> >> On 16 May 2014 08:52, Christopher wrote: >> >>> So then the question becomes if I want to propose that this be added to >>> the IPython code what do I do? I looked around on the site and couldn't >>> find anything solid so I decided to post here. >>> >> >> In most cases the best way to propose a change is to fork IPython on >> Github and make a pull request. >> https://github.com/ipython/ipython >> >> If you're not comfortable with git, you can send a patch file, and one of >> us will create a pull request for you. >> >> Thanks, >> Thomas >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijay.desai at gmail.com Fri May 16 21:29:08 2014 From: vijay.desai at gmail.com (Vijay Desai) Date: Fri, 16 May 2014 21:29:08 -0400 Subject: [IPython-dev] Scrollbar issue in IPython 2.0 Message-ID: Hi all, I am having a scrollbar issue in IPython notebook. Sometime when I am displaying a big pandas dataframe, the scrollbar is displayed but it does not move. Attached is a screenshot of my desktop. This occurs maybe 30% of the times. Has anyone else faced similar issue? Regards, Vijay -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2014-05-16 21:26:48.png Type: image/png Size: 150350 bytes Desc: not available URL: From andrew.gibiansky at gmail.com Sat May 17 02:37:32 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Fri, 16 May 2014 23:37:32 -0700 Subject: [IPython-dev] Javascript Ordering Semantics Issue in Notebook with Widget Registration Message-ID: Hey guys, I'm running into a little bit of a Javascript code execution issue, and am unsure whether I am doing something wrong in my architecture, or if perhaps IPython should somehow mitigate the bugs I'm getting. Basically, here's the setup: for IHaskell, extension authors who want to be able to display their data as widgets must create a way to register those widgets. The first time those widgets are created, they must also be registered in the JS on the notebook frontend. However, this is done in the same series of messages as the comm_open. So here's the crux: The way that the widgets are registered is by adding a In Notebook 1.x, the local code executes but throws an error about undefined variables, suggesting that the external javascript file was not loaded. Is this expected? In Notebook 2.0, so far as I can tell, none of it executes at all. Am I right in thinking that embedding Javascript into a markdown cell has been deprecated? Do I need to put it into custom.js instead? And, will I be able to source the remote file from there, or will I need to make that library local as well? Sorry if this is a naive question, a lot of aspects of this are new to me. I'm just looking for the most straightforward and lightweight approach so I can experiment with my code. Thanks in advance, Clare -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.gibiansky at gmail.com Sat May 31 12:41:23 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Sat, 31 May 2014 12:41:23 -0400 Subject: [IPython-dev] Sourcing a javascript file from a notebook, and writing local javascript In-Reply-To: References: Message-ID: I'm not an IPython dev, but I *believe* that embedding JS into a Markdown cell has indeed been deprecated, for security reasons. I now experiment by putting things in custom.js. Code in custom.js I think has all the privileges that normal Javascript has, so you should be free to load external files and scripts. You can include your own JS files using require.js: require(['/static/custom/my_file.js']); In a similar way you should be able to load foreign JS files, I think; I don't know require.js very well though. You could probably also just append a > > > In Notebook 1.x, the local code executes but throws an error about > undefined variables, suggesting that the external javascript file was not > loaded. Is this expected? > > In Notebook 2.0, so far as I can tell, none of it executes at all. > > Am I right in thinking that embedding Javascript into a markdown cell has > been deprecated? Do I need to put it into custom.js instead? And, will I be > able to source the remote file from there, or will I need to make that > library local as well? > > Sorry if this is a naive question, a lot of aspects of this are new to me. > I'm just looking for the most straightforward and lightweight approach so I > can experiment with my code. > > Thanks in advance, > Clare > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: