Git Product home page Git Product logo

Comments (1)

alanjds avatar alanjds commented on June 30, 2024 1

It occurs automatically.

I suggest you to create a sample module tree and run on CPython (python script.py). It will create a folder __pycache__ containing one file ended with PYC for every imported PY file: ./X/File.py will generate a ./X/__pycache__/File.cpython-27.pyc, for example. This is the standard CPython behavior after Python 3.2. The Python 2.7 gets this behavior when you install the importlib2 module.

Alright. Now you run the same main script with Grumpy (grumpy script.py). It will create a folder __pycache__ containing one FOLDER ended with PYC for every imported PY file: ./X/File.py will generate a ./X/__pycache__/File.grumpy-XYZ.pyc, for example.

Inside this folder will be the whole Golang source tree needed. You can go on every folder generated along the original .PY files and collect the transpiled versions.

If you want to see more internals, including every single folder generated, you can run Grumpy in debug mode: grumpy -v debug script.py

Some of this information is explained better on this link: https://labs.getninjas.com.br/released-grumpy-runtime-v0-3-0-a05f1cf8e111

from grumpy.

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.