Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 139
    • Merge requests 139
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !157

Merged
Created Aug 18, 2016 by Douglas@CamataContributor

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

  • Overview 0
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feature/print_redirection
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7