Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import argparse
- parser = argparse.ArgumentParser()
- parser.add_argument("-u", "--url", help="URL to an online JPG or PNG file", default="http://www.haemmern.de/live/bild.jpg")
- parser.add_argument("-iw", "--width", help="Image width", default="640")
- parser.add_argument("-ih", "--height", help="Image height", default="480")
- parser.add_argument("-x", "--posx", help="Horizontal position of the image on desktop in pixel", default="20")
- parser.add_argument("-y", "--posy", help="Vertical position of the image on desktop in pixel", default="20")
- parser.add_argument("-t", "--time", help="Refresh duration in seconds", default="60")
- args = parser.parse_args()
- if args.url:
- print("URL "+args.url)
- if args.width:
- print("Breite "+args.width)
- if args.height:
- print("Hoehe "+args.height)
- if args.posx:
- print("Position X "+args.posx)
- if args.posy:
- print("Position Y "+args.posy)
- if args.time:
- print("Duration "+args.time)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement