Re:Writing a Polyglot Script
by SeekingMeaning on Saturday January 25, 2020 @01:32PM
(#22147753)
Slightly modified so that it runs either a Ruby file or a Python one:
Granted, this doesn’t close the Python file, which is delayed until garbage collection or program termination.
[ Parent
| on HN ]
Re:Writing a Polyglot Script
by coolreader18 on Sunday January 26, 2020 @12:20AM
(#22150522)
You could also do `__import__("/abs/path/to/python.py")` (I think, I'm not completely sure on the rules for passing paths to `__import__`)