import sys, getopt
from parse_json_from_path import parse_JSON_from_path
import json

# parse_JSON_from_path('./input.txt', 3)


def print_intruction():
    print('Valid argument are --path=str(X) and --count=int(Y) or ')
    print('Example: py main.py --path=./TestCase/input.txt --count=3')

def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k:v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


if __name__ == "__main__":
    main(sys.argv[1:])
4c1e436d550a430312b049a5f7d77b2728997a2d
<mask token>


def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k: v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


<mask token>

<mask token>


def print_intruction():
    print('Valid argument are --path=str(X) and --count=int(Y) or ')
    print('Example: py main.py --path=./TestCase/input.txt --count=3')


def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k: v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


<mask token>

<mask token>


def print_intruction():
    print('Valid argument are --path=str(X) and --count=int(Y) or ')
    print('Example: py main.py --path=./TestCase/input.txt --count=3')


def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k: v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


if __name__ == '__main__':
    main(sys.argv[1:])

import sys, getopt
from parse_json_from_path import parse_JSON_from_path
import json


def print_intruction():
    print('Valid argument are --path=str(X) and --count=int(Y) or ')
    print('Example: py main.py --path=./TestCase/input.txt --count=3')


def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k: v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


if __name__ == '__main__':
    main(sys.argv[1:])

import sys, getopt
from parse_json_from_path import parse_JSON_from_path
import json

# parse_JSON_from_path('./input.txt', 3)


def print_intruction():
    print('Valid argument are --path=str(X) and --count=int(Y) or ')
    print('Example: py main.py --path=./TestCase/input.txt --count=3')

def main(args):
    try:
        opts, args = getopt.getopt(args, 'p:c:', ['path=', 'count='])
    except getopt.error as err:
        print(str(err))
        sys.exit(2)
    info = {k:v for k, v in opts}
    if '--path' not in info or '--count' not in info:
        print_intruction()
        sys.exit(2)
    json_content = parse_JSON_from_path(info['--path'], int(info['--count']))
    print(json.dumps(json_content))
    return json_content


if __name__ == "__main__":
    main(sys.argv[1:])