Skip to content

Commit

Permalink
Drop Python 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 12, 2024
1 parent 9239abc commit a6b9496
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions rnapolii/modeling/.template.deposition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,9 @@
"outputs": [],
"source": [
"try:\n",
" import urllib.request as urllib2 # python3\n",
"except ImportError:\n",
" import urllib2 # python2\n",
"import urllib.request\n",
"\n",
"fh = urllib2.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"fh = urllib.request.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"s, = ihm.reader.read(fh)\n",
"print(s.title, s.restraints, s.ensembles, s.state_groups)"
]
Expand Down
6 changes: 2 additions & 4 deletions rnapolii/modeling/deposition-colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,9 @@
"outputs": [],
"source": [
"try:\n",
" import urllib.request as urllib2 # python3\n",
"except ImportError:\n",
" import urllib2 # python2\n",
"import urllib.request\n",
"\n",
"fh = urllib2.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"fh = urllib.request.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"s, = ihm.reader.read(fh)\n",
"print(s.title, s.restraints, s.ensembles, s.state_groups)"
]
Expand Down
6 changes: 2 additions & 4 deletions rnapolii/modeling/deposition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1060,11 +1060,9 @@
"outputs": [],
"source": [
"try:\n",
" import urllib.request as urllib2 # python3\n",
"except ImportError:\n",
" import urllib2 # python2\n",
"import urllib.request\n",
"\n",
"fh = urllib2.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"fh = urllib.request.urlopen('https://pdb-ihm.org/cif/8zze.cif')\n",
"s, = ihm.reader.read(fh)\n",
"print(s.title, s.restraints, s.ensembles, s.state_groups)"
]
Expand Down
6 changes: 2 additions & 4 deletions rnapolii/modeling/deposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,8 @@
print(s.title, s.restraints, s.ensembles, s.state_groups)

try:
import urllib.request as urllib2 # python3
except ImportError:
import urllib2 # python2
import urllib.request

fh = urllib2.urlopen('https://pdb-ihm.org/cif/8zze.cif')
fh = urllib.request.urlopen('https://pdb-ihm.org/cif/8zze.cif')
s, = ihm.reader.read(fh)
print(s.title, s.restraints, s.ensembles, s.state_groups)

0 comments on commit a6b9496

Please sign in to comment.