<html><body><div>Hi Sören and Markus,</div><div><br></div><div>many thanks for big help. If I understand it correctly, the key, which will solve my issue, is the multiprocessing  module, which allows to define region just in this process without affecting the others (as it is in the modules). Thanks to that it will be possible to use raster library in the backend and get rid of files produced by r.out.bin.</div><div><br></div><blockquote><br>I would avoid to use ctypes in the same process as wxGUI. The grass<br>libraries call exit() in case a fatal error occurs. This will also<br>crash the GUI in this case. I would strongly suggest to use<br>multiprocessing Python module to spawn new processes that make use of<br>ctypes. However, what is the reason that you use ctypes directly<br>instead of PyGRASS that was designed to provide an abstract layer<br>above several grass libraries? Maybe you can add an OO layer in<br>PyGRASS providing access to your backend?</blockquote><p><br></p><p>Extending PyGRASS to provide access to the backend <span style="line-height: 1.3;"> is good idea. I will do so.</span></p><p><br></p><p>Best</p><p>Stepan<br></p></body></html>