Created
September 26, 2013 14:40
-
-
Save jseabold/6715147 to your computer and use it in GitHub Desktop.
pysal gal reader monkey-patched to open urls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MonkeyOpen(pysal.IOHandlers.gal.GalIO): | |
| FORMATS = ['gal'] | |
| MODES = ['r', 'w'] | |
| def __init__(self, *args, **kwargs): | |
| self._typ = str | |
| pysal.core.FileIO.FileIO.__init__(self, *args, **kwargs) | |
| self.file = urlopen(self.dataPath) | |
| @staticmethod | |
| def getType(*args, **kwargs): | |
| return "gal" | |
| fin = MonkeyOpen(url, "r") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment