All Questions
70 questions
4
votes
3
answers
256
views
Calculation of consumed resources by subprocess
I've created a script that executes arbitrary user code in Python, written in a .py file, and returns execution result (contents of stdout, stderr, exec code) + ...
2
votes
0
answers
68
views
a C/Python X server interface extension package
The project is named winlin; it's a portmanteau of the words window and Linux.
I'm working on a CPython extension to interact with the X server and manipulate windows. I don't have a ton of ...
5
votes
1
answer
184
views
declarative package manager for Arch Linux
pacdef is my declarative package manager for Arch Linux. I have written it since I often found myself discovering a new tool at one of my PCs, using it there for a ...
4
votes
1
answer
134
views
Mount point API for Linux systems
I have a use case where I need to check, whether / is mounted read-only.
Here's the module where I implemented this check:
...
2
votes
2
answers
99
views
A Python script to install a number of useful programs and packages on a fresh Linux-based device
I work with Linux-based devices, and, both at work and in my personal life, it's necessary to wipe these devices every so often - sometimes as frequently as multiple times per week. In this context, ...
2
votes
1
answer
1k
views
Python script to automate the creation of Linux LXC containers
Like the title suggests, I wrote a script in Python that uses the python3-lxc library to automate the creation of Linux LXC containers. I realised that containers ...
3
votes
1
answer
92
views
remote file follow using python
I've created an on-demand class that can be initiated to collected any new data written to file from start_recording call until ...
1
vote
2
answers
379
views
Persist keyboard backlight color on Linux laptop
System76 sells laptops that come preloaded with their Ubuntu spinoff Pop_OS. The laptop keyboards have backlights that can change color and brightness, but so far I haven't found any way to keep the ...
2
votes
1
answer
70
views
List files based on changes
I am new to programming and need input on how I could've written something better. Not coding on daily basis. The task was to write a script in python, bash or anything. So I mixed python with bash ...
9
votes
3
answers
2k
views
File Automation Using Python On Linux
A project to automate file organization in Linux using Python. I've always wanted to do this project way before I know how to code. Now that I did, I want to improve it even more.
Used Language: ...
6
votes
1
answer
145
views
A Backup Script for my Linux Server/NAS
This is my script. I want it to run on a weekly basis on my linux server on a Raspberry Pi 4, to back up all files that may have changed. On the GPIO are just LEDs. It requires a program called ...
2
votes
1
answer
55
views
Log the diff of a Apache httpd config file and reload the service with Python and systemd
Using systemd's .path unit to run a Python script whenever a httpd config file is changed. The Python script creates a backup of ...
9
votes
2
answers
3k
views
Linux Commands in Python
I've decided to write some Linux commands in Python. Below is a list, along with some constraints (if you're unfamiliar with Linux, the top of the program along has a description about each command ...
1
vote
3
answers
90
views
Python startswith and then look a word in a conditional block
I have below working code which works fine, but just looking way around if there is an another elegant way of doing this, because here i'm using else condition to print the last line or dataBlock to ...
2
votes
0
answers
69
views