Created
January 27, 2017 06:50
-
-
Save ErvalhouS/6992113eaa0106cde3faa9c482f4a9cd to your computer and use it in GitHub Desktop.
Getting SINESP Python API to work with Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sinesp_client import SinespClient | |
import sys | |
sc = SinespClient() | |
result = sc.search(sys.argv[1]) | |
print result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plate = "mxz6429" | |
result = system 'python', *["sinesp.py", plate] | |
result.sub("{", "").sub("}", "").split(", ").each {|pair| hash[pair.split(": ").first.gsub("'", "").to_sym] = pair.split(": ").last.gsub("'","") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment