0

Running "%PSOURCE func" opens up a pane below that displays the source. Is there a way to change the behavior so that the source is directed to the corresponding output cell?

1 Answer 1

0

I asked a very similar question here (after yours - I should have checked in more detail). There is a quick hack there that works but should probably be improved, and a useful answer on its limitations.

Note that the point of my question was about displaying a single function from a file, appropriately highlighted: if you actually want to run it (as eg the %load magic would give you for the full file), you'll probably want to just use the inpect.getmembers functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.