klo uo | 1 Feb 06:13
Picon
Gravatar

Notebook: console is not defined

I tried to run IPython notebook in Prism 1.04 (which is abandoned
project, but works fine for various other things), and I get main
window but can't open notebook page or reuse existing notebooks (they
are not listed, although exist in default folder)

I opened error console and get error about 'console not defined'
pointing to "notebook.js" which I attached as screenshot

There are also warnings, like 'reference to undefined property' and
'unknown pseudoclass or pseudo element' for "jquery-1.6.2.js", but I
guess those warning are not so important
I tried '--no-mathjax' also, but get same error

So I'm wondering if I could dedicate IPython Notebook to Prism web app

Thanks
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Brian Granger | 1 Feb 06:20
Picon
Gravatar

Re: Notebook: console is not defined

The IPython notebook assumes a pretty traditional, but extremely
modern web browser and I am guessing that Prism doesn't quite meet
that standard.  We use lots of cutting edge things like WebSockets and
the flexible box model.

On Tue, Jan 31, 2012 at 9:13 PM, klo uo <klonuo <at> gmail.com> wrote:
> I tried to run IPython notebook in Prism 1.04 (which is abandoned
> project, but works fine for various other things), and I get main
> window but can't open notebook page or reuse existing notebooks (they
> are not listed, although exist in default folder)
>
> I opened error console and get error about 'console not defined'
> pointing to "notebook.js" which I attached as screenshot

The console variable is present on all modern browsers and prints
messages to the Javascript debugging console.  I don't foresee that we
would remove all calls to console.log anytime soon.

> There are also warnings, like 'reference to undefined property' and
> 'unknown pseudoclass or pseudo element' for "jquery-1.6.2.js", but I
> guess those warning are not so important
> I tried '--no-mathjax' also, but get same error

I am guessing you are running into other issues where Prism is not a
regular web browser.

> So I'm wondering if I could dedicate IPython Notebook to Prism web app

You could surely investigate, but I don't think we want to support
Prism, especially if it is not maintained any longer.
(Continue reading)

klo uo | 1 Feb 06:38
Picon
Gravatar

Re: Notebook: console is not defined

OK, thanks for your reply
I hope others jumps in and provides some tip, I could try

The thing is, I didn't yet noticed "web service" that doesn't work
with Prism, so I was a bit surprised/disappointed
js giant services as any Google services i.e. work without issues. MS
Live too... just can't think others to mention using advanced js
technologies

Sure I don't know what those js scripts does and perhaps my
expectations were too high

Cheers
klo uo | 1 Feb 14:33
Picon
Gravatar

Re: Notebook: console is not defined

Thanks for explanation. I had no idea about what websockets is, so I
googled and get rough picture

I commented "console" lines in notebook.js and managed to open saved
IPython notebook, but then dialog popped about missing websockets :D

I also tried https://github.com/mozilla/chromeless (Python wrapped)
with xulrunner 9, and when I opened IPython notebook and selected
saved notebook, I didn't get dialog about missing websockets, but just
blank page. From what I've read in the meantime seems like websockets
is included since Firefox 4, so xulrunner 9 most definitely should
have this feature, but I'm not sure if I'm talking apples and oranges.
I'll try later today again to see if I can get notebook running with
chromeless

My problem is old PC - 2GB, 3GHz P4 (which I can't upgrade soon) and
when I run notebook with pylab I get famous "heartbeat stopped -
kernel died" or similar message on startup (usually) and I looked for
other way to use this feature.
Adam Davis | 1 Feb 15:55

Re: No response to client from ipcontroller

Further to my previous message, I can now get a working ad hoc cluster from separately started ipcontroller and ipengine instances (including across hosts on my network). However I can only do so when I invoke the ipcontroller from a python interpeter, eg:

python IPython\parallel\apps\ipcontrollerapp.py --profile==test_profile

The controller does not seem to distribute tasks to the engines when invoked through the ipcontroller executable in the Scripts directory of my python installation. Can anyone suggest why this might be?

Thanks.

-Adam

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Alan Bromborsky | 1 Feb 17:21
Picon

Interactive ipython_config.py

Is there a way of making ipython_config.py interactive so that one could 
interactively load different startup profiles from a menu.  I tried the 
following -

import sys

GAbasic = """from sympy import *
from sympy.galgebra.GA import *
import sympy.galgebra.latex_ex as tex
print 'Basic mode'
%load_ext GAprinting"""

GA_2D = """from sympy import *
from sympy.galgebra.GA import *
import sympy.galgebra.latex_ex as tex
(x,y) = make_symbols('x y')
(ex,ey) = MV.setup('e_x e_y',metric='[1,1]',coords=(x,y))
tex.Format(redir=False)
print '2D mode'
%load_ext GAprinting
"""

GA_3D = """from sympy import *
from sympy.galgebra.GA import *
import sympy.galgebra.latex_ex as tex
(x,y,z) = make_symbols('x y z')
(ex,ey,ez) = MV.setup('e_x e_y e_z',metric='[1,1,1]',coords=(x,y,z))
tex.Format(redir=False)
print '3D mode'
%load_ext GAprinting
"""

GA_ST = """from sympy import *
from sympy.galgebra.GA import *
import sympy.galgebra.latex_ex as tex
(t,x,y,z) = make_symbols('t x y z')
(et,ex,ey,ez) = MV.setup('e_t e_x e_y 
e_z',metric='[1,-1,-1,-1]',coords=(t,x,y,z))
tex.Format(redir=False)
print 'Spacetime mode'
%load_ext GAprinting
"""

LINES = [0,GAbasic,GA_2D,GA_3D,GA_ST]

prompt = """
Available Extension Modes
     0 - Sympy
     1 - Basic GA
     2 - 2D Euclidian GA
     3 - 3D Euclidian GA
     4 - 4D Spacetime GA
Enter Mode: """

MODE = 2

try:
     MODE= raw_input(prompt)
except EOFError:
     print 'Keep going'

print 'mode =',int(MODE)

lines = LINES[int(MODE)]

c = get_config()
app = c.InteractiveShellApp
c.InteractiveShell.editor = 'geany'

# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
load_subconfig('ipython_config.py', profile='default')

print lines

# You have to make sure that attributes that are containers already
# exist before using them.  Simple assigning a new list will override
# all previous values.

if hasattr(app, 'exec_lines'):
     app.exec_lines.append(lines)
else:
     app.exec_lines = [lines]

I keep getting a read EOF error and the profile is never loaded.
Thomas Kluyver | 1 Feb 17:32
Picon
Gravatar

Re: Interactive ipython_config.py

There's already a profile system in IPython: you can start it with e.g. "ipython --profile sympy" (for the sympy profile). You can see your profiles with "ipython profile list". If you want to make a wrapper to pick between different profiles, that's probably the way to start.

Thomas

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Ricardo Amézquita | 1 Feb 18:57
Picon

Multiprocessing question

I have some code that uses multiprocessing to parallelize some calculation. I know that previous versions of Ipython had some issues with multiprocessing. Yesterday, I ran some long time (3 h) calculation using my parallel code and Ipython. In the standard console the code ran without problems, but in the web notebook, and the qtconsole, the program never finished. The code didn't break, so there was no error message, it just simply sat there.
So my questions are:
- are there still issues between multiprocessing and Ipython?
- My software will be greatly benefited if you could run it  from the Ipython qtconsole, or web notebook. If I want to keep the parallel processing would you say it is better to use Ipython's parallel infrastructure instead multiprocessing (or others)?

Thanks
Ricardo Amézquita Orozco

ramezquitao <at> cihologramas.com
ramezquitao <at> unal.edu.co
ramezquitao <at> gmail.com

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
MinRK | 1 Feb 19:05
Picon
Gravatar

Re: Multiprocessing question



2012/2/1 Ricardo Amézquita <ramezquitao <at> gmail.com>
I have some code that uses multiprocessing to parallelize some calculation. I know that previous versions of Ipython had some issues with multiprocessing. Yesterday, I ran some long time (3 h) calculation using my parallel code and Ipython. In the standard console the code ran without problems, but in the web notebook, and the qtconsole, the program never finished. The code didn't break, so there was no error message, it just simply sat there.
So my questions are:
- are there still issues between multiprocessing and Ipython?

The issue was most directly with pickling of interactively defined classes/objects, which multiprocessing uses.  We believe this to be fixed, but it may not be in all cases.
 
- My software will be greatly benefited if you could run it  from the Ipython qtconsole, or web notebook. If I want to keep the parallel processing would you say it is better to use Ipython's parallel infrastructure instead multiprocessing (or others)?

It's fine to use multiprocessing if that's what you are already using.  Can you provide some more information, and ideally actual code samples that fail in IPython and not in regular Python?

-MinRK
 

Thanks
Ricardo Amézquita Orozco

ramezquitao <at> cihologramas.com
ramezquitao <at> unal.edu.co
ramezquitao <at> gmail.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
Fernando Perez | 1 Feb 21:32
Picon
Gravatar

Re: Notebook: console is not defined

On Tue, Jan 31, 2012 at 9:38 PM, klo uo <klonuo <at> gmail.com> wrote:
> The thing is, I didn't yet noticed "web service" that doesn't work
> with Prism, so I was a bit surprised/disappointed
> js giant services as any Google services i.e. work without issues. MS
> Live too... just can't think others to mention using advanced js
> technologies
>
> Sure I don't know what those js scripts does and perhaps my
> expectations were too high

The issue is that such tools are developed by large companies with
enormous development teams, that have the resources to build multiple
layers of complex fallbacks.  So even when they use modern features,
they have fallback solutions to work with older browsers.

We simply don't have the resources for that, and made the conscious,
explicit decision to target very new technologies that allow us to
develop what we need with our small team.  The price to pay is that
only very modern browsers are supported.

It was a deliberate but in our opinion reasonable tradeoff given our
circumstances.  Given that both Firefox and Chrome, which are freely
available on Linux, OSX and Windows work fine, this decision doesn't
really leave any significant population without an option for using
the notebook.

Best,

f

Gmane