How to replace a string with a variable inside a pgsql2shp command in Python?
command = "pgsql2shp -f /test.shp -h localhost -u postgres -P postgres gis_exercise \"SELECT d.latitude, d.longitude, d.geom FROM country AS c, daily AS d WHERE ST_CONTAINS(c.geom,d.geom) AND c.iso3= 'BRA'\""
What I need is to replace the test (name of shapefile) with the variable row and also the string BRA with the variable row.
I have tried to use + in order to concatenate the strings but it doesn't work.