def fetch_from_PDB(self):
    "\n        Connects to PDB FTP server, downloads a .gz file of interest,\n        decompresses the .gz file into .ent and then dumps a copy of\n        the pdb{code}.ent file into cwd.\n\n        Parameters\n        ----------\n        None\n\n        Examples\n        --------\n        \n        >>> inst = PDBFile('1rcy')\n        >>> path_to_file = inst.fetch_from_PDB()\n        >>> print(path_to_file)\n        \n        "
    subdir = self.code[1:3]
    infile = 'pdb{}.ent.gz'.format(self.code)
    decompressed = infile.strip('.gz')
    fullpath = ROOT.format(subdir, infile)
    try:
        urlcleanup()
        urlretrieve(fullpath, infile)
    except Exception:
        return 'URLError'
    else:
        with gzip.open(infile, 'rb') as gz:
            with open(decompressed, 'wb') as out:
                out.writelines(gz)
        remove(infile)
        return path.join(getcwd(), decompressed)
Connects to PDB FTP server, downloads a .gz file of interest,
decompresses the .gz file into .ent and then dumps a copy of
the pdb{code}.ent file into cwd.

Parameters
----------
None

Examples
--------

>>> inst = PDBFile('1rcy')
>>> path_to_file = inst.fetch_from_PDB()
>>> print(path_to_file)
def fetch_from_PDB(self):
    "\n        Connects to PDB FTP server, downloads a .gz file of interest,\n        decompresses the .gz file into .ent and then dumps a copy of\n        the pdb{code}.ent file into cwd.\n\n        Parameters\n        ----------\n        None\n\n        Examples\n        --------\n        \n        >>> inst = PDBFile('1rcy')\n        >>> path_to_file = inst.fetch_from_PDB()\n        >>> print(path_to_file)\n        \n        "
    subdir = self.code[1:3]
    infile = 'pdb{}.ent.gz'.format(self.code)
    decompressed = infile.strip('.gz')
    fullpath = ROOT.format(subdir, infile)
    try:
        urlcleanup()
        urlretrieve(fullpath, infile)
    except Exception:
        return 'URLError'
    else:
        with gzip.open(infile, 'rb') as gz:
            with open(decompressed, 'wb') as out:
                out.writelines(gz)
        remove(infile)
        return path.join(getcwd(), decompressed)