-
I'm trying to subbmit codes generated by hy2py to some onlinejudge websites that only supports python. Since hy have dependencies on its std, I want to know if there is a way to strip away these symbols, and generate a self-contained python file, so that I can submit. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm not sure what |
Beta Was this translation helpful? Give feedback.
-
BTW, Hissp was designed to compile to standalone code; it does not have any dependencies on its compiled Python output. However, because it only compiles to expressions, the output is completely unpythonic, unlike hy2py which produces passable Python, or at least a good starting point for manual cleanup. |
Beta Was this translation helpful? Give feedback.
I'm not sure what
hy2c
is, but you can try starting with the output ofhy2py
and then manually removing imports (or copy function defs out of Hy's standard lib if you're allowed to do that).Unfortunately, the current version of Hy can't automatically generate pure standalone python code.