OpenLayers tutorial using Brython

67 views
Skip to first unread message

Kiko

unread,
Apr 6, 2014, 5:26:41 PM4/6/14
to bry...@googlegroups.com
Hi all,

In case someone  is interested I added an OpenLayers(2) tutorial to the brythonmagic repo (see the notebooks folder):

https://github.com/kikocorreoso/brythonmagic

Feedback, corrections, suggestions, bugs,..., are welcome!!!!

Kind regards.

polack christian

unread,
Apr 8, 2014, 3:12:36 AM4/8/14
to bry...@googlegroups.com
it´s working fine, nice tutorial by the way, thanks for sharing it

polack christian

unread,
Apr 10, 2014, 1:17:02 PM4/10/14
to bry...@googlegroups.com
did not work with ipython 2.0 , i put the issue on github

Kiko

unread,
Apr 10, 2014, 1:23:43 PM4/10/14
to bry...@googlegroups.com
Strange, it works for me...

Let me review that.


--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/09f4dda5-f150-4eb0-a875-896a44ef8cd1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

polack christian

unread,
Apr 10, 2014, 1:30:04 PM4/10/14
to bry...@googlegroups.com
sorry it  only fail for me using -c option , the openlayer notebook is not affected.  

polack christian

unread,
Apr 10, 2014, 1:32:25 PM4/10/14
to bry...@googlegroups.com
i just used the first example provided by the help page (  %%brython?  )

Kiko

unread,
Apr 10, 2014, 1:32:43 PM4/10/14
to bry...@googlegroups.com
2014-04-10 19:30 GMT+02:00 polack christian <baob...@gmail.com>:
sorry it  only fail for me using -c option , the openlayer notebook is not affected.  


I don't understand 'it  only fail for me using -c option'.

I installed ipython3 v2.0.0 in a virtualenv just now and I ran the notebook 'Brython usage in the IPython notebook' without any issues and it uses all the brythonmagic options.


 

polack christian

unread,
Apr 10, 2014, 1:38:24 PM4/10/14
to bry...@googlegroups.com
i did open an issue on github, for example, this is not working for me

%%brython -c 'output_123'
from browser import doc, html
doc['output_123'] <= html.P('Hello World!!')

Javascript error adding output!
Error: output_123
See your browser Javascript console for more details.

Kiko

unread,
Apr 10, 2014, 1:40:21 PM4/10/14
to bry...@googlegroups.com
You don't have to use " ' "


polack christian

unread,
Apr 10, 2014, 1:44:40 PM4/10/14
to bry...@googlegroups.com
i am lazy , i just copy paste the example from the help :)

it work without the " ' " , by every time i use the %%brython magic , all brython cells are re-executed

Kiko

unread,
Apr 10, 2014, 1:59:13 PM4/10/14
to bry...@googlegroups.com
2014-04-10 19:44 GMT+02:00 polack christian <baob...@gmail.com>:
i am lazy , i just copy paste the example from the help :)

it work without the " ' " , by every time i use the %%brython magic , all brython cells are re-executed


It only runs the actual brython cell and all the cells you pass to -S option:
https://github.com/kikocorreoso/brythonmagic#usage

polack christian

unread,
Apr 10, 2014, 2:25:58 PM4/10/14
to bry...@googlegroups.com
i did not use the -S option,but previous brython cell are still re-executed

Kiko

unread,
Apr 10, 2014, 2:27:57 PM4/10/14
to bry...@googlegroups.com
2014-04-10 20:25 GMT+02:00 polack christian <baob...@gmail.com>:
i did not use the -S option,but previous brython cell are still re-executed


Could you explain me what are you doing to reproduce the behaviour.

Thanks.
 

polack christian

unread,
Apr 10, 2014, 2:38:27 PM4/10/14
to bry...@googlegroups.com
i post it on github

polack christian

unread,
Apr 10, 2014, 4:12:37 PM4/10/14
to bry...@googlegroups.com
ok my mistake, i did use the previous javascript files

Kiko

unread,
Apr 10, 2014, 4:17:46 PM4/10/14
to bry...@googlegroups.com
2014-04-10 22:12 GMT+02:00 polack christian <baob...@gmail.com>:
ok my mistake, i did use the previous javascript files


Some changes were incorporated to core brython.js so now you can use the original brython files with the latest improvements (generators and other cool stuff) in the IPython notebook via the brythonmagic.

Anyway, if you find new issues or have new ideas, please, let me know to discuss about it.

Kind regards.
 
Reply all
Reply to author
Forward
0 new messages