Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !157

erp5 jupyter kernel: print capturing using AST processor to modify print calls

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Douglas requested to merge Camata/erp5:feature/print_redirection into master Aug 18, 2016
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

This is a duplicate of !150 (closed), because by unknown reasons it's showing problem to merge.

Before, we we're redirecting sys.stdout and this doesn't play nice with the distribute architecture of ERP5 and our Jupyter kernel needs to be adjusted for this.

So, we're now using an AST processor to fix print calls. It will modify the print and make it write to a different file-like object. All the writes are collected after code execution and sent to Jupyter.

It's still necesasry though to fix print inside other libraries. But for this deeper investigation is necessary because we cannot replace print as a statement inside exec contetx, it needs to be used as a function. Code can be compiled to run with print as a function, but then external libraries calls will be broken.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/print_redirection
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7