Python on Ruby and angry Ruby on Python

I found it

python | RubyGems.org | your community gem host

$ gem install python
$ gem specification python
--- !ruby/object:Gem::Specification
name: python
version: !ruby/object:Gem::Version
  version: 0.0.1
platform: ruby
authors:
- Kensuke Sawada
~
executables:
- python.rb
~

I think I can do something

Interpreter execution

$ python.rb
python.rb> 1+1
2

moved

Normal execution operation experiment

$ echo "print(1+1)" > test.py
$ python.rb test.py #moved
2

interesting

sawaken/python.rb: Python in Ruby

Isn't it the other way around?

$ pip search ruby
~
pyruby (1.0.0)                           - Some Ruby for your Python
~

There seems to be!

$ pip install pyruby
$ pip show pyruby
---
Metadata-Version: 1.1
Name: pyruby
Version: 1.0.0
Summary: Some Ruby for your Python
Home-page: http://github.com/danielfm/pyruby
Author: Daniel Fernandes Martins
Author-email: [email protected]
License: BSD
Location: /Users/him0/Desktop/venv/lib/python3.5/site-packages
Requires: 
Classifiers:
  Development Status :: 5 - Production/Stable
  Intended Audience :: Developers
  License :: OSI Approved :: BSD License
  Operating System :: OS Independent
  Programming Language :: Python :: 3
  Programming Language :: Ruby
  Topic :: Software Development :: Interpreters

danielfm/pyruby: Some Ruby for your Python!

$ echo '''import ruby
> puts "Hello!"'''>app.p
$ python app.py 
  File "app.py", line 2
    puts "Hello!"
                ^
SyntaxError: invalid syntax

that?

$ echo '''import ruby
print("Hello!")'''>app.py
$ python app.py

venv_—Terminal—-bash—_157×47.png

...。

What i learned

I don't know what kind of library is registered for a library like pip

This time, I'm glad it's outright, but I learned that it's okay to have a library that's doing bad things out of sight, so you should not only use it blindly, but read the source code properly.

2016-05-10 Addendum English was the opposite

Recommended Posts

Python on Ruby and angry Ruby on Python
Ruby, Python and map
Python and Ruby split
Python and ruby slice memo
Ruby and Python syntax ~ branch ~
Difference between Ruby and Python split
Notes on Python and dictionary types
Scraping with Node, Ruby and Python
Integrate Modelica and Python on Windows
Python and Bash on Cisco Catalyst IOS-XE
Differences between Ruby and Python in scope
Python on Windows
twitter on python3
Build Python3 and OpenCV environment on Ubuntu 18.04
Python virtual environment and packages on Ubuntu
Eating and comparing programming languages: Python and Ruby
A memo with Python2.7 and Python3 on CentOS
Notes on building Python and pyenv on Mac
python on mac
See file and folder information on python
Encrypt with Ruby (Rails) and decrypt with Python
Python on Windbg
Understand python lists, dictionaries, and so on.
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
Easy web scraping with Python and Ruby
Differences between Ruby and Python (basic syntax)
Install and run Python3.5 + NumPy + SciPy on Windows 10
Instant method grammar for Python and Ruby (studying)
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Notes on installing Python3 and using pip on Windows7
Specifying the range of ruby and python arrays
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
PHP and Python integration from scratch on Laravel
[Note] Installing Python 3.6 + α on Windows and RHEL
About shallow and deep copies of Python / Ruby
Try importing MLB data on Mac and Python
Install MongoDB on Ubuntu 16.04 and operate via python
Install Python and libraries for Python on MacOS Catalina
Comparison of Python and Ruby (Environment / Grammar / Literal)
Install ZIP version Python and pip on Windows 10
[python] Compress and decompress
Install python on WSL
Python and numpy tips
[Python] pip and wheel
PyOpenGL setup on Python 3
Install Python on Pidora.
Install Scrapy on python3
Batch design and python
Python iterators and generators
Python packages and modules
Vue-Cli and Python integration
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Installing pandas on python2.6
python input and output
python basic on windows ②
Install python on windows
Install Python 2.7.3 on CentOS 5.4
build Python on Ubuntu
Install Python 3.3 on Ubuntu 12.04