|
You are here |
techtldr.com | ||
| | | | |
bluebones.net
|
|
| | | | | ||
| | | | |
willhaley.com
|
|
| | | | | 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. | |
| | | | |
www.henryleach.com
|
|
| | | | | I'm leaving a note here as I've had this problem occur a couple of times, and each time it confuses me. When I try and launch a Vagrant box with an Ansible provisioning step, or otherwise try to run an Ansible playbook I get the error: ImportError: cannot import name 'initialize_locale'. Even a simple ansible --version will trigger this error. | |
| | | | |
www.rasulkireev.com
|
|
| | | Poetry is relatively new packaging and dependency manager. It makes it very easy to upload libraries to PyPI, manage dependencies visually, and has a couple of handy features. Today, I'm not going to do a deep dive into how Poetry works and all its features. Today I just want to focus on how to configure it for a Django project. | ||