Comments (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)
- Unvendorize python-parser
- Wrong exception AttributeError on `from foo import wrongmember`
- Could not compile on 16.04.5 LTS Xenial Xerus (Was: How to transcompile python code that have logging or psutil libraries imported.) HOT 12
- Update README with new install instructions HOT 3
- Fix the CI: `.../golang/lint/golint expects import "golang.org/x/lint/golint"` HOT 1
- Check stability of `sorted()` code HOT 1
- Include __future__ information on Code, allowing `division` future to be implemented
- Cannot import module `struct`: Is a Golang reserved word
- Need a tutorial for running and transpiling youtube-dl HOT 5
- Python 3 support HOT 7
- I cannot run the binary built from the Go code generated by Grumpc HOT 1
- pip installation "grumpy compile" is not working HOT 3
- 0.3.0 release on pypi HOT 4
- Rebuild tool for automated refactoring HOT 3
- grumpy not found after installed (on Arch Linux) HOT 1
- how to use externs or interop for go code? HOT 5
- not all go modules works HOT 10
- Support installing grumpy-runtime in editable mode
- Rename grumpy-tools to grumpy-cli
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grumpy.