Aaron Watters | 27 Aug 15:05 2015

IPython widget Dict not syncing

I’m playing around with I-Python interactive widgets — very cool!

I’m having trouble passing dictionaries from the Python side to the JS side.
For some reason I can get a List to sync from the python side to the javascript side like so:

Py:    commands = List([], sync=True)

Js:  var commands = this.model.get("commands”);

But the same doesn’t seem to work with Dict

Py:      style = Dict({}, sync=True)

I’m pretty sure I’m using JSON compatible values and I’m changing the top level reference to get traitlets to notice that the value has changed.  I wouldn’t rule out that I’m doing something else dumb, however.

For fun I just changed the code to pass a dictionary wrapped in a list and it worked.  Any idea what is wrong?  Thanks!
  — Aaron Watters

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Reckoner | 24 Aug 22:30 2015
Picon

Connect to remote kernel on AWS using local qtconsole?

Hi,

 By following the instructions listed here:

Running a notebook server — IPython 1.2.1: An Afternoon Hack documentation - https://ipython.org/ipython-doc/rel-1.1.0/interactive/public_server.html

I have been able to connect to a remote notebook server on Amazon AWS via the browser. Can I get to this kernel using   a local qtconsole?  In other words, can I do something like this on the local client:

% ipython qtconsole --kernel <something>

My concern is that the instructions listed above refer to a password and certificate that is required by the browser to connect to the remote server. How would this work with the desired qtconsole? Maybe some kind of tunnel is required to handle this case?

Thanks in advance.


_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Akim Demaille | 24 Aug 15:05 2015
Picon
Picon
Picon

Compressed notebooks

Hi Guys,

First of all, congrats on the release!

However, it's hard to get information about this release.  The website is a little terse, and even
http://ipython.org/news.html stops at 3.2.

Is there some plans to add support for compressed notebooks?  I don't particularly thinks this is needed,
however, my package features documentation as notebooks installed in /usr/share/doc.  And debian tools
_love_ to compress about everything that is in /usr/share/doc. So I have to struggle with these tools to be
able to get readable documentation.

However, it is not particularly stupid either to compress these files, and I expect more packages will face
the same problem as I did.  So you might want to consider support for such notebooks?

Thanks!

FWIW, from https://www.debian.org/doc/debian-policy/ch-docs.html

> 12.3 Additional documentation
> 
> Any additional documentation that comes with the package may be installed at the discretion of the
package maintainer. Plain text documentation should be installed in the directory
/usr/share/doc/package, where package is the name of the package, and compressed with gzip -9 unless it
is small.
Viktor Ransmayr | 23 Aug 22:35 2015
Picon

Fwd: IPython 4.0 on Python 3.4 & Windows 10 - Status Update #3

Please ignore this posting for the moment. - Thomas has helped me to resolve a major issue I had in my setup. - See http://mail.scipy.org/pipermail/ipython-user/2015-August/014008.html.

I'm planning to start with a 'clean/ fresh' installation, based on the current IPython 4.0/ JUpyter 1.0 documentation & report back to this list.

Thanks for all the support that you provided to me!

With kind regards,

Viktor

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Viktor Ransmayr | 21 Aug 22:57 2015
Picon

IPython 4.0 on Python 3.4 & Windows 10 - Status Update #2

Here's a follow-up to my earlier mail. - Usage of 'ipython qtconsole' and 'ipython --gui=qt5' do not work as advertized:

<Log-#2>

PS C:\Users\Viktor> ipython --help
=========
 IPython
=========

Tools for Interactive Computing in Python
=========================================

    A Python shell with automatic history (input and output), dynamic object
    introspection, easier configuration, command completion, access to the
    system shell and more.  IPython can also be embedded in running programs.

Usage

    ipython [subcommand] [options] [-c cmd | -m mod | file] [--] [arg] ...

[Snip]

--gui=<CaselessStrEnum> (InteractiveShellApp.gui)
    Default: None
    Choices: ('glut', 'gtk', 'gtk3', 'osx', 'pyglet', 'qt', 'qt5', 'tk', 'wx')
    Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'osx',
    'pyglet', 'qt', 'qt5', 'tk', 'wx').

[Snip]

--profile-dir=<Unicode> (ProfileDir.location)
    Default: ''
    Set the profile location directly. This overrides the logic used by the
    `profile` option.

To see all available configurables, use `--help-all`

Examples
--------

[Snip]

    ipython qtconsole          # start the qtconsole GUI application
    ipython help qtconsole     # show the help for the qtconsole subcmd

[Snip]

    ipython nbconvert           # convert notebooks to/from other formats

PS C:\Users\Viktor> ipython qtconsole
Traceback (most recent call last):
  File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python34\Scripts\ipython.exe\__main__.py", line 9, in <module>
  File "c:\python34\lib\site-packages\IPython\__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 591, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python34\lib\site-packages\IPython\terminal\ipapp.py", line 305, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python34\lib\site-packages\IPython\core\application.py", line 386, in initialize
    self.parse_command_line(argv)
  File "c:\python34\lib\site-packages\IPython\terminal\ipapp.py", line 300, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 487, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python34\lib\site-packages\traitlets\config\application.py", line 418, in initialize_subcommand
    subapp = import_item(subapp)
  File "c:\python34\lib\site-packages\ipython_genutils\importstring.py", line 31, in import_item
    module = __import__(package, fromlist=[obj])
ImportError: No module named 'qtconsole'
PS C:\Users\Viktor> ipython --gui=qt5
WARNING: Readline services not available or not loaded.
WARNING: Proper color support under MS Windows requires the pyreadline library.
You can find it at:
http://ipython.org/pyreadline.html

Defaulting color scheme to 'NoColor'
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed. Is matplotlib installed?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
c:\python34\lib\site-packages\IPython\terminal\interactiveshell.py in enable_gui(gui, app)
    305         from IPython.lib.inputhook import enable_gui as real_enable_gui
    306         try:
--> 307             return real_enable_gui(gui, app)
    308         except ValueError as e:
    309             raise UsageError("%s" % e)

c:\python34\lib\site-packages\IPython\lib\inputhook.py in enable_gui(self, gui, app)
    248         self._current_gui = gui
    249
--> 250         app = gui_hook.enable(app)
    251         if app is not None:
    252             app._in_event_loop = True

c:\python34\lib\site-packages\IPython\lib\inputhook.py in enable(self, app)
    387     def enable(self, app=None):
    388         os.environ['QT_API'] = 'pyqt5'
--> 389         return Qt4InputHook.enable(self, app)
    390
    391

c:\python34\lib\site-packages\IPython\lib\inputhook.py in enable(self, app)
    364             app = QtGui.QApplication(sys.argv)
    365         """
--> 366         from IPython.lib.inputhookqt4 import create_inputhook_qt4
    367         app, inputhook_qt4 = create_inputhook_qt4(self.manager, app)
    368         self.manager.set_inputhook(inputhook_qt4)

c:\python34\lib\site-packages\IPython\lib\inputhookqt4.py in <module>()
     22
     23 from IPython.core.interactiveshell import InteractiveShell
---> 24 from IPython.external.qt_for_kernel import QtCore, QtGui
     25 from IPython.lib.inputhook import allow_CTRL_C, ignore_CTRL_C, stdin_ready
     26

c:\python34\lib\site-packages\IPython\external\qt_for_kernel.py in <module>()
     81
     82 else: # use ETS variable
---> 83     from IPython.external.qt import QtCore, QtGui, QtSvg, QT_API

ImportError: No module named 'IPython.external.qt'

In [1]: quit()
PS C:\Users\Viktor>

</Log#2>

Any feedback or ideas?

With kind regards,

Viktor

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Aaron Watters | 21 Aug 22:42 2015

Newbie question about nbextensions

Hi folks!

When I install javascript into nbextensions is that javascript executed for every notebook in that environment?

Or is there some mechanism that only loads the javascript when needed and if so how does it work?

Point me to references if appropriate please.

Thanks!  — Aaron Watters

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Viktor Ransmayr | 21 Aug 22:42 2015
Picon

IPython 4.0 on Python 3.4 & Windows 10

As stated in my earlier mail, I'll report my findings. As a very first step here's the result of installing IPython & pyreadline via pip:

<Log>

Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\Users\Viktor> pip list
alabaster (0.7.6)
Babel (2.0)
colorama (0.3.3)
docutils (0.12)
Jinja2 (2.8)
MarkupSafe (0.23)
pip (7.1.1)
Pygments (2.0.2)
pytz (2015.4)
setuptools (18.2)
six (1.9.0)
snowballstemmer (1.2.0)
Sphinx (1.3.1)
sphinx-rtd-theme (0.1.8)
PS C:\Users\Viktor> pip install ipython
Collecting ipython
  Using cached ipython-4.0.0-py3-none-any.whl
Collecting decorator (from ipython)
  Using cached decorator-4.0.2-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython)
  Using cached simplegeneric-0.8.1.zip
Collecting traitlets (from ipython)
  Using cached traitlets-4.0.0-py2.py3-none-any.whl
Collecting pickleshare (from ipython)
  Using cached pickleshare-0.5.tar.gz
Collecting ipython-genutils (from traitlets->ipython)
  Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting path.py (from pickleshare->ipython)
  Using cached path.py-7.6.1-py2.py3-none-any.whl
Installing collected packages: decorator, simplegeneric, ipython-genutils, traitlets, path.py, pickleshare, ipython
  Running setup.py install for simplegeneric
  Running setup.py install for pickleshare
Successfully installed decorator-4.0.2 ipython-4.0.0 ipython-genutils-0.1.0 path.py-7.6.1 pickleshare-0.5 simplegeneric-
0.8.1 traitlets-4.0.0
PS C:\Users\Viktor> pip install pyreadline
Collecting pyreadline
  Using cached pyreadline-2.0.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "C:\Users\Viktor\AppData\Local\Temp\pip-build-vcqznn9j\pyreadline\setup.py", line 25, in <module>
        from sphinx.setup_command import BuildDoc
      File "C:\Python34\lib\site-packages\sphinx\setup_command.py", line 23, in <module>
        from sphinx.application import Sphinx
      File "C:\Python34\lib\site-packages\sphinx\application.py", line 37, in <module>
        from sphinx.builders import BUILTIN_BUILDERS
      File "C:\Python34\lib\site-packages\sphinx\builders\__init__.py", line 23, in <module>
        from sphinx.util import i18n, path_stabilize
      File "C:\Python34\lib\site-packages\sphinx\util\i18n.py", line 15, in <module>
        from babel.messages.pofile import read_po
      File "C:\Python34\lib\site-packages\babel\messages\__init__.py", line 12, in <module>
        from babel.messages.catalog import *
      File "C:\Python34\lib\site-packages\babel\messages\catalog.py", line 23, in <module>
        from babel.dates import format_datetime
      File "C:\Python34\lib\site-packages\babel\dates.py", line 28, in <module>
        from babel.util import UTC, LOCALTZ
      File "C:\Python34\lib\site-packages\babel\util.py", line 278, in <module>
        from babel import localtime
      File "C:\Python34\lib\site-packages\babel\localtime\__init__.py", line 21, in <module>
        from babel.localtime._win32 import _get_localzone
      File "C:\Python34\lib\site-packages\babel\localtime\_win32.py", line 18, in <module>
        tz_names = get_global('windows_zone_mapping')
      File "C:\Python34\lib\site-packages\babel\core.py", line 58, in get_global
        _global_data = pickle.load(fileobj)
    TypeError: an integer is required (got type str)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Viktor\AppData\Local\Temp\pip-build-vcqznn9j\pyr
eadline
PS C:\Users\Viktor> ipython
WARNING: Readline services not available or not loaded.
WARNING: Proper color support under MS Windows requires the pyreadline library.
You can find it at:
http://ipython.org/pyreadline.html

Defaulting color scheme to 'NoColor'
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: quit()
PS C:\Users\Viktor> pip list
alabaster (0.7.6)
Babel (2.0)
colorama (0.3.3)
decorator (4.0.2)
docutils (0.12)
ipython (4.0.0)
ipython-genutils (0.1.0)
Jinja2 (2.8)
MarkupSafe (0.23)
path.py (7.6.1)
pickleshare (0.5)
pip (7.1.1)
Pygments (2.0.2)
pytz (2015.4)
setuptools (18.2)
simplegeneric (0.8.1)
six (1.9.0)
snowballstemmer (1.2.0)
Sphinx (1.3.1)
sphinx-rtd-theme (0.1.8)
traitlets (4.0.0)
PS C:\Users\Viktor>

</Log>

Any feedback or ideas about the traceback when installing 'pyreadline'?

With kind regards,

Viktor

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Viktor Ransmayr | 21 Aug 21:44 2015
Picon

Status of IPython 4.0 & Jupyter 1.0 on Windows 10?

Hello everyone,

I have quickly scanned the archives - but - have not found an answer to my question:

Has the combination of "Windows 10" & "Python3.4" a realistic chance to work - or - should I better try IPython & Jupyter in a Linux environment?

With kind regards,

Viktor

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
robert_dodier | 5 Aug 21:20 2015
Picon

How to combine outputs from two kernels in one notebook

Hi, 

I'm interested in having a notebook which contains outputs from two kernels.
(The kernels would be for different languages but I guess that doesn't
really change the situation.) So the basic idea would be to have some cells
that are evaluated by one kernel and some that are evaluated by another. Is
there a way to mark cells like that? Thanks for any light you can shed on
this.

best,

Robert Dodier

--
View this message in context: http://python.6.x6.nabble.com/How-to-combine-outputs-from-two-kernels-in-one-notebook-tp5168619.html
Sent from the IPython - User mailing list archive at Nabble.com.
Francesc Alted | 16 Jul 20:22 2015
Picon

Way to retrieve the value of %time?

Hi,

I am trying to come up with a way of accessing the time measured by the magic %time.  That is, in:

In [149]: %time sum(i for i in xrange(1000000))
CPU times: user 118 ms, sys: 27.4 ms, total: 145 ms
Wall time: 121 ms
Out[149]: 499999500000

is there a way to get the 121 ms value of the 'Wall time' above and put that in a variable?  I know I can use something like:

In [150]: from time import time

In [151]: t0 = time(); sum(i for i in xrange(1000000)); mytime = time() - t0

In [152]: mytime
Out[152]: 0.10076594352722168

but %time is so much convenient, specially for tutorials, that I would rather prefer using it.

Thanks!

--
Francesc Alted
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Kudeki, Erhan | 13 Jul 23:36 2015

jupyter Text File editor language feature

Please make the Text File editor of ipython notebook or jupyter recognize *.ipy files
for automatic python language formatting as it does for *.py files.

Thanks,

Erhan 
___________________________________________________
Erhan Kudeki                   Tel: 217 265 0128     erhan <at> illinois.edu
Professor and Associate Head for Undergraduate Affairs
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign
2080 ECEB, 306 N. Wright St., Urbana, IL 61801               

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

Gmane