News for hackers. Stuff that matters.
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:

  (0 and eval(IO.read("ruby.rb"))) or eval(compile(open("python.py").read(), "", "exec"))
Granted, this doesn’t close the Python file, which is delayed until garbage collection or program termination.
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__`)