Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it possible to bind blackcellmagic[1] to run automatically everytime a cell is ran in a Jupyter notebook?

[1] https://github.com/csurfer/blackcellmagic



You can explore putting something like :

    require([
      "base/js/namespace",
      "base/js/events"
    ], 
      function(Jupyter, events){
 
        events.on('finished_execute.CodeCell', function(){
          // execute black here
        });
    });
In ~/.jupyter/custom/custom.js.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: