Niko Föhr

Results 171 comments of Niko Föhr
trafficstars

## Is the wakelock released if the main process crashes? There are two ways to crash a python process (1) With Exceptions, where normal context manager clean up takes place...

### License check The PyGObject (gi) is licensed under [LGPLv2.1+](https://gitlab.gnome.org/GNOME/pygobject/-/blob/main/COPYING). The LGPL permits linking (and importing) LGPL licensed code to code with any license, so there's no problem. In fact,...

## Unix sockets vs other alternatives The alternatives for communicating between the main process (current env python) and sub-process (system python) are: **subprocess.PIPE**: - Means: Use standard input/output - Should...

#### About availability of gtk_application_inhibit() - It has been available since Gtk 3.4 (mentioned in the [docs](https://docs.gtk.org/gtk3/method.Application.inhibit.html)). It's [also available](https://docs.gtk.org/gtk4/method.Application.inhibit.html) in gtk4.

#### Minimal working example Here is a minimal working example which uses the `gtk_application_inhibit()`, made available through the method `inhibit` of the `Gtk.Application`: ```python import time import gi gi.require_version("Gtk", "3.0")...

#### Running this in a separate process One difficulty in using this within a virtual environment where `gi` is not installed is that the `sys.path` and `sys.modules` are *shared between...

Update: I have some sort of implementation which successfully inhibits idle (#407). It has two parts (1) server, which is intended to be started with the system python interpreter, like...

There's a cross-platform python solution for this: [wakepy](https://github.com/fohrloop/wakepy) (I'm the author of the package). It actually uses the suggested caffeinate on OS X. On Windows it uses [SetThreadExecutionState](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate) and on...

I was also surprised when `logger.debug()` messages did not show up from code that is triggered by a callback. I think that changing logger level from `logging.DEBUG` to `logging.INFO` is...

Just tested if it's just the extra `'` which makes difference. On command line this did work though: ``` PS C:\cases\wakepy> git branch -D 'dev' Deleted branch dev (was 9646615)....