quarto-dev / quarto-dev/quarto-cli

ipython magic command working/not working depending on the command (`timeit` / `pinfo`)

Open
#7,644 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug engines-jupyter
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Hi,

I have been struggling with using ipython magic command when having python code in my .qmd file.
For some reasons the following code works just fine in a {python} cell:

%timeit [1]*10

while the following would produce a blank space when rendering (say with Quarto preview):

a = [1]*10
%pinfo a 

Any idea why?
Executing the cells in VSCode would produce the expected behavior though...

Thanks for your feedback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior from the issue's .qmd Python cells using Quarto preview or rendering, comparing %timeit with %pinfo after assigning a. Trace the Python-cell execution and output handling, then confirm that %pinfo a produces the expected rendered output rather than a blank space.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.