Skip to content

Commit

Permalink
remove python 2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcroquette committed Nov 14, 2024
1 parent 7220e49 commit 7ef0c58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
14 changes: 4 additions & 10 deletions pyrpl/pyrpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,10 @@
from . import user_config_dir
from ._version import __version__

# input is the wrong function in python 2
try:
raw_input
except NameError: # Python 3
raw_input = input

try:
basestring # in python 2
except:
basestring = (str, bytes)

raw_input = input

basestring = (str, bytes)


default_pyrpl_config = {'name': 'default_pyrpl_instance',
Expand Down
6 changes: 2 additions & 4 deletions pyrpl/widgets/spinbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import logging

import sys
if sys.version_info < (3,):
integer_types = (int, long)
else:
integer_types = (int,)

integer_types = (int,)


class NumberSpinBox(QtWidgets.QWidget):
Expand Down

0 comments on commit 7ef0c58

Please sign in to comment.