Explore >> Select a destination


You are here

claudio.uk
| | pythontest.com
19.5 parsecs away

Travel
| | I was asked recently about how to test the argument parsing bit of an application that used argparse. argparse is a built in Python library for dealing with parsing command line arguments for command line interfaces, CLI's. You know, like git clone . git is the application. is a command line argument. clone is a sub-command. Well, that might be a bad example, as I'm not going to use subcommands in my example, but lots of this still applies, even if you are using subcommands.
| | www.trickster.dev
18.8 parsecs away

Travel
| | Code level discussion of web scraping, gray hat automation, growth hacking and bounty hunting
| | willhaley.com
19.1 parsecs away

Travel
| | See here an example of a custom Linux mount script, written in Python, that can be used to mount disks with /etc/fstab. The mount script is installed at /usr/bin/mount.my-command and is executable. #!/usr/bin/env python3 import sys import subprocess device = sys.argv[1] mount_point = sys.argv[2] options = sys.argv[4] # Any customization could be done here to the `mount` command that is run. mount_command = ['mount', '-o', options, device, mount_point] output = subprocess.run( mount_command, capture_output=True ) if output.returncode != 0: print("error mounting") print(output.stderr.decode('UTF-8')) sys.exit(output.returncode) See here how the custom script can then be used in /etc/fstab like any "normal" mount.
| | claudiobernasconi.ch
219.9 parsecs away

Travel
| Visual Studio improves developers' lives and boosts productivity. I show 13 tips and tricks to improve your developer experience.