Hi all,<br><br>I am in delay with my project, this is due to the fact that I am used to code in python in procedural way and now I am facing the object oriented, or better, the &quot;event oriented&quot; way. I am studying the Wxpython reference book and I am learning a lot. I am not giving up at all!! <br>
<br>I also need a little help from you devs to solve some issues.<br><br>In the Layer Manager I have added &quot;Network Modeling&quot; under Raster -&gt; Hydrologic Modeling. This command should raise the GUI of wx.stream. When user has filled every box dialogs, he/she should select a point on Map Display and click a button in wx.stream called &quot;update preview&quot;, in order to see the preview over a small region. If user doesn&#39;t select any point and clicks the button, raises a warning message like &quot;please select a point on the map display&quot;. When the point is selected, ad the parameters are correctly inserted, the wx.preview GUI raises (this should be a second independent module). It shows an image browser and a bigger image display. User can click over an image in the image browser and the image is displayed in the bigger frame. User can change the parameters in wx.stream GUI and then clicking the same button &quot;update preview&quot; a new image is generated in the preview image browser and can be selected to be displayed.<br>
<br>Preview widget, as Hamish suggested, should be as general as possible, so it can be used by all commands instead of just r.stream. Preview widget IMHO should generate png images stored in a temp folder. And here are my issues.<br>
<br>1) First problem is that input of preview widget are passed by r.stream GUI (as a command line, so actually a string), and by Map Display (as a point, actually a tuple). String can be processed by preview GUI using os.system(cmd), BUT in order to convert the output of the command in a png file and to export it in the temporary folder, it is necessary to know the name of the output map that has to be exported. Output has a name given by user and passed as string (actually parsing a command line is not big deal, but problem is how to recognize output name, because every command has different name for output, it&#39;s not always output = something, but can be acc = something for instance). And also:<br>
<br>2) How to convert the output of the command in a png file and how to export it in the temporary folder in G7? In grass 6.5 I simply would do:<br><br>    grass.run_command( &#39;d.mon&#39;, start = &#39;x0&#39; )<br>    grass.run_command( &#39;d.rast&#39;, map = &#39;sc_elev&#39; )<br>
    grass.run_command( &#39;d.out.file&#39;, output = os.path.join(fpath, prefix + &#39;_elevation&#39;), format = &#39;png&#39;, resolution = 2, flags = &#39;t&#39; )<br><br>Thanks for any suggestion..<br><br>madi<br clear="all">
<br>-- <br><span style="color: rgb(102, 102, 102);">Eng. Margherita Di Leo</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Ph.D. Candidate</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Methods and Technologies for Environmental Monitoring</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Department of Environmental Engineering and Physics (DIFA)</span><br style="color: rgb(102, 102, 102);">
<br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">University of Basilicata </span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Campus Macchia Romana</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">85100 - Potenza </span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">Italy</span><br style="color: rgb(102, 102, 102);"><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Office: +39-0971205360</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);"></span><br><br><br>