I know that Tkinter is not so modern, not so cool and maybe better to use PyQt or etc. But it is interesting for me can Tkinter look not so ugly in Ubuntu (Linux). Looks that brew version (in OS X) of python’s Tkinter compiled with built-in theme and looks good: But Ubuntu’s Tkinter makes me cry: …
Tag: linux
How to make a return from a child function cause a return to the parent function?
I have a parent function and child function: How to make the return 1 (of the child) cause a return in the parent and then avoid the execute the remaining child calls? without adding a check of the returned value after each child call like this Answer There is a solution other than set -e and || return ItR…
How to check the installation date of a kernel in Linux? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Closed 7 years ago. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-top…
Programmatically monitor process state using C++
I have to develop an application in C++ to monitor the state of processes in my Linux system and also need to know if a new process is created or an existing process is terminated. Is there an API available for this? Also it will be helpful if someone could tell me how to start it with. Answer inotify works
Remove Files older than 3 years
I need to remove any file in the directory that is older than 2 years old. It is very important that I keep the newest files and delete the old files. I have searched and found this. Can I just multiply the number? Is there a way to add a switch that will print the file name to the screen
How to Install Composer globally on Cloudlinux
I can’t seem to install Composer globally on Cloudlinux. I have managed to install packages like git etc but these are actual packages unlike composer. I made Git globally available using the cagefsctl e.g.: But this doesn’t seem to work for Composer (which makes sense). How do I do this for non p…
How to run python 3 on Synology NAS
I’m a little new to linux and I’m having trouble running Python scripts on Synology NAS running on DSM 5.1 I installed a Python 3 module, but when I call I get How can I run python 3 ? Thanks Answer As suggested by Geotob the solution is simply calling python3
Make directory structure from forward slashes
Im pulling an html document from a windows machine onto my linux box and the issue is the directory structure is not maintained between the two. This is how it looks in linux Im thinking of using a bash script that will change the “” into a “/” essentially making a folder. Im guessing …
String usage with {} in bash
I have a kind of the following strings and I wan to call: in order to get “aaa.bbb.” for str1 and “aaa.” for str2 what should I use as expression inside {} Answer Use it like this:
Communicate with a subprocess using pipes on other than stdout/stderr
This is how I fork/exec a subprocess and communicated with it (pseudocode): My question is: I don’t really want to read the stdout of my subprocess, I would like the subprocess to write on a file descriptor other than stdout. And, I’d like the above code to read from that file descriptor. The subp…