示例#1
0
    def _download_data(self, name, synid):
        filename = self.directory + os.sep + name
        if os.path.exists(filename) is False:
            # must download the data now
            print("File %s not found. Downloading from Synapse. You must have a login." % filename)
            d = Downloader(self.alias)
            d.download(synid)

        return filename
示例#2
0
    def _download_data(self, name, synid):
        filename = self.directory + os.sep + name
        if os.path.exists(filename) is False:
            # must download the data now
            print(
                "File %s not found. Downloading from Synapse. You must have a login."
                % filename)
            d = Downloader(self.alias)
            d.download(synid)

        return filename
示例#3
0
    def _download_data(self, name, synid):
        # name is not strictly required but if already found,
        # it will not be downloaded again
        from dreamtools.core.downloader import  Downloader

        filename = self.directory + os.sep + name
        if os.path.exists(filename) is False:
            # must download the data now
            print("File %s not found. Downloading from Synapse." % filename)
            d = Downloader(self.alias, self.client)
            d.download(synid)
            # save the login if needed again, it will be faster
            self.client = d.client

        return filename
示例#4
0
    def _download_data(self, name, synid):
        # name is not strictly required but if already found,
        # it will not be downloaded again
        from dreamtools.core.downloader import Downloader

        filename = self.directory + os.sep + name
        if os.path.exists(filename) is False:
            # must download the data now
            shortfilename = os.path.split(filename)[1]
            if self.verbose:
                print(
                    "Note that file %s not found. Downloading from www.synapse.org."
                    % shortfilename)
            d = Downloader(self.alias, self.client)
            d.download(synid)
            # save the login if needed again, it will be faster
            self.client = d.client

        return filename