Giter Club home page Giter Club logo

Comments (8)

cool-RR avatar cool-RR commented on May 19, 2024 2

I implemented IPython support! Now just Jupyter support left.

from pysnooper.

chaoyue729 avatar chaoyue729 commented on May 19, 2024

same issue

from pysnooper.

cool-RR avatar cool-RR commented on May 19, 2024

If someone were to write a test case for this and add it to the test suite, I might be tempted to try implementing a solution.

from pysnooper.

cool-RR avatar cool-RR commented on May 19, 2024

Everyone: If you want this to be fixed, I need you to find how to get the code from an iPython shell or a Jupyter notebook. If it's possible, send me the code and I could add that it to PySnooper.

Also, adding a test case to the test suite would be helpful.

from pysnooper.

YubinXie avatar YubinXie commented on May 19, 2024

I'd like to help but I do not really understand what do you mean by the code from iPython shell? The input code for PySnooper is same as the example you provided. As for what is actually going on in iPython, any suggestion to get it out?

from pysnooper.

cool-RR avatar cool-RR commented on May 19, 2024

@YubinXie The function get_source_from_frame attempts to extract the source from the frame object. This is easy with source that resides in files, but more difficult with interactive shells such as IPython and Jupyter because the frame wouldn't have a file name. You need to talk to the IPython and Jupyter and ask whether the source can be extracted from the shell.

from pysnooper.

cool-RR avatar cool-RR commented on May 19, 2024

I just pushed a fix that'll at least make PySnooper fail gracefully when it can't show the source. Now the task remains to get the code out of IPython or Jupyter.

from pysnooper.

cool-RR avatar cool-RR commented on May 19, 2024

Oh awesome, looks like that fixed Jupyter as well :)

I made a separate task #43 to add testing for this feature. Any takers?

from pysnooper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.