Vladan Divljak | 14 Sep 05:41 2014
Picon

Feature request: Redirect history in side panel

Hi guys,

I was just thinking why %history action bloats my qt console terminal, instead printing the output  in side panel?

So, yeah.
Just think to call %history twice in a session and welcome to the jungle.


Cheers

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
desp | 12 Sep 04:05 2014

Notebook: How to search for function/method with non-prefix string

Say I'm in iPython notebook, and have done: import pandas [as pd]

Now I want to find a function that deals with CSV. Is there a way to do
something like:

*csv* /[auto-complete-like key]/

or 

*pd.csv* /[auto-complete-like key]/

and see all the function or method names that contain "csv" anywhere in
their name?

Thanks!

--
View this message in context: http://python.6.x6.nabble.com/Notebook-How-to-search-for-function-method-with-non-prefix-string-tp5071387.html
Sent from the IPython - User mailing list archive at Nabble.com.
Karl Traunmüller | 10 Sep 21:57 2014

"IPython for iPad" app Computable updated to version 1.1

Dear all,

"IPython for iPad" app Computable has been updated to version 1.1.

New in version 1.1 are Python code completions, inline documentation, a Welcome Tour for new users, and some minor fixes and improvements.

The upcoming version 1.2 will bring faster Markdown and TeX/LaTeX math mode rendering by replacing the previous HTML/MathJax-based solution with a native LaTeX typesetting engine.

- Product page: http://computableapp.com
- Price: free to try, with $9.99 in-app purchase to unlock all features
- Author: Karl Traunmueller, indie Mac & iOS developer, Linz, Austria

regards,
Karl Traunmüller
<at> computableapp

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Richard Stanton | 7 Sep 09:08 2014
Picon

"Error connecting to server" with IPython notebook in one particular directory

I’ve been using IPython notebook with the Anaconda distribution on both OS X and Windows for quite some while. Mostly, everything runs without a hitch on both systems. If I type “ipython notebook”, my browser pops up with a list of ipynb files in the current directory, and off I go.

 

However, there’s one of my project directories where this doesn’t work. It’s fine on my Mac, but on the Windows machine, in this one directory (it works fine in other directories), the browser window shows no files (even though there are a number of notebook files there). Instead, it shows just the root (“/”), and on the line after this is the text “Error connecting to server”. In the command shell running the server, this is what I see:

 

2014-09-07 00:00:33.328 [NotebookApp] Serving notebooks from local directory: C:

\projects\ESOest

2014-09-07 00:00:33.328 [NotebookApp] 0 active kernels

2014-09-07 00:00:33.328 [NotebookApp] The IPython Notebook is running at: http:/

/localhost:8888/

2014-09-07 00:00:33.329 [NotebookApp] Use Control-C to stop this server and shut

down all kernels (twice to skip confirmation).

2014-09-07 00:00:33.875 [NotebookApp] ERROR | Unhandled error in API request

Traceback (most recent call last):

  File "C:\anaconda\lib\site-packages\IPython\html\base\handlers.py", line 332,

in wrapper

    result = method(self, *args, **kwargs)

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\handlers.p

y", line 78, in get

    for nb in nbm.list_notebooks(path):

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 235, in list_notebooks

    for name in notebook_names if self.should_list(name)]

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 262, in get_notebook

    created = tz.utcfromtimestamp(info.st_ctime)

  File "C:\anaconda\lib\site-packages\IPython\utils\tz.py", line 41, in utc_meth

od

 

    dt = unaware(*args, **kwargs)

ValueError: timestamp out of range for platform localtime()/gmtime() function

ERROR:tornado.access:{

  "Accept-Language": "en-US,en;q=0.8",

  "Accept-Encoding": "gzip,deflate,sdch",

  "Connection": "keep-alive",

  "Accept": "application/json, text/javascript, */*; q=0.01",

  "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,

like Gecko) Chrome/36.0.1985.143 Safari/537.36",

  "Dnt": "1",

  "Host": "localhost:8888",

  "X-Requested-With": "XMLHttpRequest",

  "Referer": "http://localhost:8888/tree"

}

 

ERROR:tornado.access:500 GET /api/notebooks?_=1410073425115 (::1) 19.00ms refere

r=http://localhost:8888/tree

 

Any idea what’s going wrong? By the way, I’m currently using anaconda 2.0.1 with IPython 2.2.0 (the latest versions installed by anaconda), but I’ve seen this problem for a while, so I don’t think it’s just this version of IPython that’s the problem.

 

Again, “ipython notebook” runs fine in every other directory I’ve tried on the same machine.

 

Thanks for any suggestions.

 

Richard Stanton

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Katie Surrence | 3 Sep 19:07 2014
Picon

Re: can't RESOLVED: make header cell in ipython notebook editor, editor in general seems different from online examples

Dear Matthias and the ipython list,

I'm cc'ing the dev list as you suggest so that everything will be in one place, but my problem is fixed!

I wasn't sure what it meant to use the --user flag to install not in systems locations or how to use venv, but taking what you said about not mixing pip and apt not being good to mix, I used pip to upgrade tornado

pip install --upgrade tornado

and then I had tornado 4.something.

Then I had some kind of infinite loop error when I tried to start ipython notebook, but I found the error here:

http://stackoverflow.com/questions/24795239/starting-the-ipython-notebook

and used those suggestions, and now the notebook editor works! 

Thanks again for your help.

Best,
Katie

On Wed, Sep 3, 2014 at 11:20 AM, Matthias Bussonnier <bussonniermatthias <at> gmail.com> wrote:
Hi Katie, 

Le 3 sept. 2014 à 07:41, Katie Surrence <katiesurrence <at> gmail.com> a écrit :

Dear Matthias,

Thanks for your response.

I'm not sure I remember now, but likely

pip install ipython 

since that's in the instructions on the site. It can't have been very long ago, because I set up this computer this year.  I just tried

pip install --upgrade ipython[all]

and

pip install --upgrade ipython[notebook]

Now

ipython notebook

gets:

/usr/bin/ipython: No such file or directory

but

ipython2 notebook

gets

...
  File "/usr/local/lib/python2.7/dist-packages/IPython/html/notebookapp.py", line 60, in <module>
    raise ImportError(msg + ", but you have %s" % tornado.version)
ImportError: The IPython Notebook requires tornado >= 3.1.0, but you have 2.1


but when I do

sudo apt-get install python-tornado

I get

python-tornado is already the newest version

When I do a find from the root directory for *tornado* I see, among other things:

/usr/lib/python2.7/dist-packages/tornado-2.1.egg-info

but no >=3.1 eggs. 



Hum, it does not seem to be a good ira to mix apt-* and pip install python packages. 
I would suggest installing in a venv, or using th —user flag of pip to install ipython and 
dependencies not in systems location. 



So I'm confused now about how I can get the latest tornado.  I'm on Ubuntu 12.04.  Is that a problem somehow?  Do I need to switch to a newer Ubuntu?

I suppose apt-* packae do not have more recent tornato version as 12.4 is already more than 2 years old, 
but I think that pip install --user  should do the trick. 

You might also want to try Continuum anaconda, or Enthought Canopy that are full featured python distrib.   

You should still mail IPython-dev instead of user as we try to keep one list for everything.

Cheers, 
-- 
Matthias


Thanks very  much again for any help you or the list has to offer.

Best,
Katie







On Tue, Sep 2, 2014 at 3:40 PM, Matthias Bussonnier <bussonniermatthias <at> gmail.com> wrote:
HI,

I suggest you write to IPython-dev <at> scipy.org, we are deprecating IPython-User.

To respond to your question, you have a 3 year old version, how did you install ?

M

Le 2 sept. 2014 à 12:30, ksurrence <katiesurrence <at> gmail.com> a écrit :

> Dear all,
>
> I am new to iPython notebook, and recently created my first one. For some
> reason, my notebook editor does not look like editor in the tutorials
> online, and has less functionality. I would like to make heading cells in my
> notebook, but I don't seem to have the option to make headings and the
> keyboard shortcuts for headings don't work either. For instance, ctrl-m c
> and ctrl-m m work as expected to toggle between code and markdown formats,
> but ctrl-m 5 just types a 5.
>
> I am attaching a screenshot of what my notebook editor looks like.
> <http://python.6.x6.nabble.com/file/n5070023/ipythonscreenshot.png>
>
> Here
> <http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/table_of_contents_ipython.ipynb>
> is an example of editor screenshots online that look different from my
> editor.
>
> Can you help me figure out how to make header cells/restore any other
> missing functionality to my notebook editor?
>
> Thanks!
>
>
>
> --
> View this message in context: http://python.6.x6.nabble.com/can-t-make-header-cell-in-ipython-notebook-editor-editor-in-general-seems-different-from-online-exams-tp5070023.html
> Sent from the IPython - User mailing list archive at Nabble.com.
> _______________________________________________
> IPython-User mailing list
> IPython-User <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

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



--
Katie Surrence, M.S.
Research Coordinator
Social Cognition Laboratory
New York State Psychiatric Institute




--
Katie Surrence, M.S.
Research Coordinator
Social Cognition Laboratory
New York State Psychiatric Institute
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
ksurrence | 2 Sep 21:30 2014
Picon

can't make header cell in ipython notebook editor, editor in general seems different from online examples

Dear all,

I am new to iPython notebook, and recently created my first one. For some
reason, my notebook editor does not look like editor in the tutorials
online, and has less functionality. I would like to make heading cells in my
notebook, but I don't seem to have the option to make headings and the
keyboard shortcuts for headings don't work either. For instance, ctrl-m c
and ctrl-m m work as expected to toggle between code and markdown formats,
but ctrl-m 5 just types a 5. 

I am attaching a screenshot of what my notebook editor looks like.  
<http://python.6.x6.nabble.com/file/n5070023/ipythonscreenshot.png>

Here
<http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/table_of_contents_ipython.ipynb> 
is an example of editor screenshots online that look different from my
editor.

Can you help me figure out how to make header cells/restore any other
missing functionality to my notebook editor?

Thanks!

--
View this message in context: http://python.6.x6.nabble.com/can-t-make-header-cell-in-ipython-notebook-editor-editor-in-general-seems-different-from-online-exams-tp5070023.html
Sent from the IPython - User mailing list archive at Nabble.com.
Jean Bigboute | 29 Aug 06:51 2014
Picon

Cell scrolling quirks in Notebook

I use Notebook chiefly with Firefox on Mac, Windows, and Linux installations
and occasionally with Safari.

If I have a long output in a cell, activating the scroll feature has an odd
effect:

If I compress when the input line is off the screen, I wind up in a
different part of the Notebook, usually farther down, and the active cell
now on some different cell.  It's as if the cursor stays in one location and
everything moves up.  I usually lose lock on where I was and  wind up
activating cells out of sequence.

If the input line is on the screen, there is no problem.  The cell
compresses but the active cell remains highlighted.

I looked into custom.css per

http://www.damian.oquanta.info/posts/48-themes-for-your-ipython-notebook.html

and related links to see if there was a pertinent setting that addressed
this.  Couldn't find one there nor can I create a color scheme where I can
identify that this has happened definitively.

There's this issue that has been discussed but
a) I see this in Safari as well as FF
b) I'm unsure whether it is the same problem I'm having or if I'm getting terminology confused

https://github.com/ipython/ipython/issues/2041

Advice appreciated.

JBB

[Please excuse any duplicates - I've been having some problems posting]
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Gustavo Goretkin | 28 Aug 19:25 2014
Picon

IPython inputhook, higher rate?

I'm using IPython.lib.inputhook to run steps in a simulation (Box2D and pygame). When I run this step in my own loop, I can get many hundred of Hertz. When I use set_inputhook, I can only get 8 Hz. When IPython is integrated with GUI backends (like any of the matplotlib interactive backends), it's very responsive. Is there a setting I'm missing?

Thank you!
Gustavo



    def run_from_ipython():
        try:
            __IPYTHON__
            return True
        except NameError:
            return False

    if not run_from_ipython():
        while domain.running:
            domain.run_step()
    else:
        from IPython.lib import inputhook

        def step():
            domain.run_step()
            return domain.running

        inputhook.set_inputhook(step)



_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
klo uo | 28 Aug 03:26 2014
Picon

Launching IPython from external "embedded" Python distribution

I use VisIt (https://wci.llnl.gov/simulation/computer-codes/visit) which includes own Python distribution, that is same version as my system Python - 2.7.5 64-bit. It also exposes it's API through own Python module, and includes PySide and vtk as additional modules.

The program includes regular Python console, which is uncomfortable compared to IPython, so I thought to look for clues. One easy way seemed using `visitrc` Python script which loads at program startup and is empty by default. I put this code inside:

========================================
import sys
sys.path = sys.path + ['C:\Python27\DLLs', 'C:\Python27\lib\site-packages']

import IPython
IPython.start_ipython(argv=[])
========================================

and I was happy to see IPython prompt when I run the program.

I tried further to load qtconsole instead terminal console:

    IPython.start_ipython(argv=['qtconsole'])

but that raised error, same as trying to pass any argument to start_ipython() function.

Not knowing what's the problem, I thought to ask for advise if there is something else I could try.

Here is output that's printed if I try to launch qtconsole as explained:

========================================
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\IPython\qt\console\qtconsoleapp.py", line
53, in gui_excepthook
    old_excepthook(exctype, value, tb)
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "C:\Users\klo\Documents\VisIt\visitrc", line 6, in <module>
    IPython.start_ipython(argv=['qtconsole'])
  File "C:\Python27\lib\site-packages\IPython\__init__.py", line 120, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 563, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 92, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Python27\lib\site-packages\IPython\terminal\ipapp.py", line 321, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 92, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Python27\lib\site-packages\IPython\core\application.py", line 381, in initialize
    self.parse_command_line(argv)
  File "C:\Python27\lib\site-packages\IPython\terminal\ipapp.py", line 316, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 92, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 475, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 92, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Python27\lib\site-packages\IPython\config\application.py", line 406, in initialize_subcommand
    subapp = import_item(subapp)
  File "C:\Python27\lib\site-packages\IPython\utils\importstring.py", line 42, in import_item
    module = __import__(package, fromlist=[obj])
  File "C:\Python27\lib\site-packages\IPython\qt\console\qtconsoleapp.py", line 67, in <module>
    from IPython.qt.client import QtKernelClient
  File "C:\Python27\lib\site-packages\IPython\qt\client.py", line 6, in <module>
    from IPython.kernel.channels import (
  File "C:\Python27\lib\site-packages\IPython\kernel\__init__.py", line 4, in <module>
    from . import zmq
  File "C:\Python27\lib\site-packages\IPython\kernel\zmq\__init__.py", line 14, in <module>
    check_for_zmq('2.1.11', 'IPython.kernel.zmq')
  File "C:\Python27\lib\site-packages\IPython\utils\zmqrelated.py", line 35, in check_for_zmq
    import zmq
  File "C:\Python27\lib\site-packages\zmq\__init__.py", line 30, in <module>
    _libzmq = ctypes.cdll.LoadLibrary(bundled[0])
  File "C:\Programs\LLNL\VisIt 2.7.3\lib\Python\lib\ctypes\__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "C:\Programs\LLNL\VisIt 2.7.3\lib\Python\lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

========================================
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Hugo Ahlenius | 27 Aug 12:47 2014
Picon

Re: ipython + international characters

Hugo Ahlenius wrote on 2014-05-05:
> I don't remember this being an issue in ipython previously, but I
> recently upgrade my python 2.7.5 installation to ipython 2.0.0 (Windows
> 7 Ultimate).
> The keyboard seems to work fine with special characters, but I can't seem
> to enter any Swedish characters in the interactive prompt (åäöÅÄÖ) - I
> can't even paste them into the prompt!
> Any tips on how to solve this? Is this a pyreadline issue?

I haven't had time to troubleshoot this more until now, but I have now
identified it as an issue with pyreadline: if vi-mode is set, those
characters stop working.

I'll file this as an issue in the pyreadline tracker on github.

Regards,
Hugo
Adrien Gaidon | 23 Aug 11:17 2014
Picon

Problem using ipython-parallel in conjunction with custom zmq cache server

Hello,

tl;dr: Is there a caveat to using zmq and ipython-parallel in the same code that would explain weird blocking behaviour when doing `dview.map`?

I am using ipython-parallel to do `dview.map(func, tasks)` on our SGE-managed cluster to distribute an embarassingly parallel set of tasks (image and video processing), with something like (in pseudo-code):

def func(task):
    preprocessed_task = heavy_preprocessing(task)
    some_small_result = compute(preprocessed_task)
    return some_small_result

Everything works like a charm, even faster than MPI! (Thanks to the non-copying numpy array sends I guess?)

However, things get much slower when I use a "cached" version of `func` like:

def func_with_cache(task):
    preprocessed_task = read_preprocessing_from_cache(task)
    some_small_result = compute(preprocessed_task)
    return some_small_result

where `read_preprocessing_from_cache` hits an in-house zmq-based cache server (simple REQ-REP architecture over tcp on port 5555 of the same machine as the ipython-parallel client).

Using `func_with_cache` sequentially (built-in `map`) or using `multiprocessing.Pool.map` works perfectly (no blocking, fast as expected), but using it with `dview.map` makes things block for a looong time on every "packet" of tasks like so:
- each engine hits the cache and processes one task in the "normal" amount of time,
- all engines are idle for several dozens of seconds (as shown by top on an engine's host),
- the client is just waiting (not polling or anything, just time.sleep),
- after a while, each engine proceeds to its next task.

I also tried replacing `dview.map` with a "scatter-execute-gather" pattern and a load-balanced view map, but this did not change anything.

I don't know how to track down what is causing this, as profiling the code where the client and dview are just shows that almost all the time is spent in `time.sleep` (as expected), and I'm struggling to log what is happening on the engines (any hint on that appreciated btw).

I know this is a very specific problem, and there is not much one can do without seeing the actual code, but I hope that someone can at least "teach me how to fish" ;-)

FWIW, my vague intuition would be that there is some global internal state of zmq that is changed either by my `read_preprocessing_from_cache` code or by ipython-parallel (like a default timeout or something), but this is a shot in the dark made by a blind man with a toy gun so...

FYI, I am on Fedora Core 20 with Anaconda using:
python 2.7.8
pyzmq 14.3.1
ipython 2.1.0 (with default profile and options)

Any help on this would be very much appreciated!

By the way, thanks for all the hard work on ipython :-)

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

Gmane