sbonaime / seedlink_plotter

Seedlink_plotter A python script to plot real time seismic data from a seedlink server
GNU Lesser General Public License v3.0
36 stars 18 forks source link

converted to py3 using 2to3 #28

Closed rsignell-usgs closed 6 years ago

rsignell-usgs commented 6 years ago

fixes #26

All I did was:

2to3 -w seedlink_plotter
megies commented 6 years ago

..but then it's not Py2 compatible any more, I guess?

rsignell-usgs commented 6 years ago

Good point. Yes, that's true.

Could look at this as tough love: folks really shouldn't be using py2 anyway these days -- it's too embarrassing! :smile_cat:

megies commented 6 years ago

Well, it's only so few instances, would be easy to accommodate with a couple of if/else/import-as at the top..

rsignell-usgs commented 6 years ago

maybe import six would handle most of these.

megies commented 6 years ago

I haven't used six a lot, but we have our experiences with future (and they are painful in the long run). These conenience modules just always might introduce obscure magic that can bite you when you least expect it.

In general, if it's only a couple of instances like here, just doing a conditional import at the top with renaming some imported items is by far the simplest solution. KISS.