Changeset 9826f82 in sasmodels for sasmodels/model_test.py


Ignore:
Timestamp:
Aug 7, 2017 7:26:04 AM (7 years ago)
Author:
lewis
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
f0e09d6
Message:

Fix import on Python 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    rf2cbeb7 r9826f82  
    4747import sys 
    4848import unittest 
    49 from StringIO import StringIO 
     49 
     50try: 
     51    from StringIO import StringIO 
     52except ImportError: # StringIO.StringIO renamed to io.StringIO in Python 3 
     53    from io import StringIO 
    5054 
    5155import numpy as np  # type: ignore 
Note: See TracChangeset for help on using the changeset viewer.