3 ms·
Hi hi! Nice work :) Thinking over some of the other conversation here, about the difficulties in the devx what with the templates being invalid python - Could
by RangerScience 3y ago
Hi hi! Nice work :)
Thinking over some of the other conversation here, about the difficulties in the devx what with the templates being invalid python -
Could you pull some shenanigans with https://docs.python.org/2/library/inspect.html#inspect.getsourcelines https://docs.python.org/2/library/inspect.html#inspect.getso... and siblings?
I'm thinking - at least in some places - you might be able to have lists of functions/modules/etc to get copied, rather than lists of templates to get rendered. Might even be able to do some code-as-strings manipulation during the copy.
The entire point would be so that the code from Pegasus that ends up in the generated project is valid Python code from the get-go, rather than only one it's rendered.
- czue 3y agoInteresting idea. I could see that being a viable option, though not necessarily any easier to maintain than the current situation.