Pārlūkot izejas kodu

init: PEP8 the example

In case we are trying to set good example for the beginners by the modern print() in https://trac.osgeo.org/grass/changeset/70020,
let's set good example also by using PEP8 (W293, E251 and potential E211).

But the whole change may not be that friendly to beginners because
G does not support Python 3 yet and print() here is still not a function,
so using it as the Python 3 one fails.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70027 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 8 gadi atpakaļ
vecāks
revīzija
6be1db557c
1 mainītis faili ar 7 papildinājumiem un 7 dzēšanām
  1. 7 7
      lib/init/grass7.html

+ 7 - 7
lib/init/grass7.html

@@ -349,15 +349,15 @@ import grass.script as gscript
 import grass.script.setup as gsetup
 
 gscript.message('Current GRASS GIS 7 environment:')
-print (gscript.gisenv())
- 
+print(gscript.gisenv())
+
 gscript.message('Available raster maps:')
-for raster in gscript.list_strings(type = 'raster'):
-    print (raster)
- 
+for raster in gscript.list_strings(type='raster'):
+    print(raster)
+
 gscript.message('Available vector maps:')
-for vector in gscript.list_strings(type = 'vector'):
-    print (vector)
+for vector in gscript.list_strings(type='vector'):
+    print(vector)
 </pre></div>
 
 <h4>Troubleshooting</h4>