using terminal command into python code -


i have file named myosm.osm. if run command

 $ ogrinfo myosm.osm 

then following output:

had open data source read-only. info: open of `myosm.osm'       using driver `osm' successful. 1: points (point) 2: lines (line string) 3: multilinestrings (multi line string) 4: multipolygons (multi polygon) 5: other_relations (geometry collection) 

i want implement command python code , want output in variable further use.

using plumbum:

from plumbum.cmd import ogrinfo output = ogrinfo('myosm.osm') 

(to install: pip install plumbum)


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -