mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
16 lines
272 B
Python
16 lines
272 B
Python
#-*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
|
|
def main(args):
|
|
if len(args) < 2:
|
|
print("Insufficient arguments")
|
|
sys.exit()
|
|
|
|
encoded_domain = args[1].encode('idna').decode("utf-8")
|
|
|
|
print(encoded_domain)
|
|
|
|
if __name__ == "__main__":
|
|
main(sys.argv)
|