milk-org / milk

Modular Image processing Library toolKit (milk) :telescope:
https://milk-org.github.io/milk/
6 stars 10 forks source link

Mysterious "...." with CacaoProcessTools #29

Closed jcranney closed 3 months ago

jcranney commented 3 months ago

When exiting a python script that imports CacaoProcessTools, a myserious set of dots appears in stdout.

E.g.,:

$ 
$ python -c "print('hello one')"
hello one
$ python -c "import CacaoProcessTools; print('hello two')"
hello two
....$ python -c "print('hello three')"
hello three
$ 
jcranney commented 3 months ago

Oh I found it - it is easily resolved by setting MILK_QUIET=1.

The perpetrator is here: https://github.com/milk-org/milk/blob/f0e6d4b01c66ebe08f4807587bf30e7ac1ecad8b/src/CommandLineInterface/CLIcore/CLIcore_modules.c#L333-L344 which also reveals how to fix it:

sh-5.2$ python -c "print('hello one')"
hello one
sh-5.2$ MILK_QUIET=1 python -c "import CacaoProcessTools; print('hello two')"
hello two
sh-5.2$ python -c "print('hello three')"
hello three