Commit 1bec1b7c by peastman Committed by GitHub

Merge pull request #135 from peastman/py2

Fixed error with Python 2
parents d829626f 8c8a1737
......@@ -48,10 +48,10 @@ import math
from pkg_resources import resource_filename
try:
if sys.version_info >= (3,0):
from urllib.request import urlopen
from io import StringIO
except:
else:
from urllib2 import urlopen
from cStringIO import StringIO
......
......@@ -3,6 +3,7 @@ from __future__ import absolute_import
import webbrowser
import os.path
import time
import sys
from math import sqrt
import simtk.openmm.app as app
......@@ -12,9 +13,9 @@ from simtk.openmm.vec3 import Vec3
from .pdbfixer import PDBFixer, proteinResidues, dnaResidues, rnaResidues, _guessFileFormat
from . import uiserver
try:
if sys.version_info >= (3,0):
from io import StringIO
except:
else:
from cStringIO import StringIO
def loadHtmlFile(name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment