zhikrullah / pyshp

Automatically exported from code.google.com/p/pyshp
MIT License
0 stars 0 forks source link

load / save file like object support in 1 line #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Support was added to save to file like objs recently.

This is good, but I need to load not save from file like objs (they are 
compressed, but could also come from network - no file).

It would be nice to have load / save consistent and be simple 1 line.

Suggested solution in attached patch along with doctests for them.

Original issue reported on code.google.com by memedo...@gmail.com on 18 Sep 2011 at 7:06

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by geospati...@gmail.com on 18 Sep 2011 at 3:25

GoogleCodeExporter commented 8 years ago
I implemented this idea with one difference - I did not use the keyword 
"shapefile=".  If you pass in a string pyshp assumes that is a file name. You 
can optionally use the keyword arguments "shp=", "shx=", "dbf=" pointing to 
file-like objects.  Saving still works the same for now but will be changed to 
a similar structure.

Original comment by jlawh...@geospatialpython.com on 27 Sep 2011 at 2:15