File: lang.py

package info (click to toggle)
sagemath 8.6-6
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 113,052 kB
  • sloc: python: 996,064; cpp: 6,208; sh: 3,252; ansic: 3,226; objc: 1,407; makefile: 1,087; lisp: 5
file content (5 lines) | stat: -rwxr-xr-x 197 bytes parent folder | download | duplicates (3)
1
2
3
4
5
#!/usr/bin/python
import json
import sys
x = json.load(open("/usr/share/iso-codes/json/iso_639-2.json"))
print([l for l in x["639-2"] if "alpha_2" in l and l["alpha_2"] == sys.argv[1]][0]["name"])