Skip to content

Commit

Permalink
remove legacy __future__ imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-dev committed Aug 26, 2021
1 parent ec6ed34 commit 4435aac
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 38 deletions.
2 changes: 0 additions & 2 deletions docs/src/html-latex-images
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env linuxcnc-python
# vim: sts=4 sw=4 et

from __future__ import absolute_import
from __future__ import print_function
import os, shutil, sys, subprocess
import tempfile, hashlib
import lxml.etree as ET
Expand Down
2 changes: 0 additions & 2 deletions docs/src/image-wildcard
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env linuxcnc-python

from __future__ import absolute_import
from __future__ import print_function
import os, sys, glob

def relpath(path, start):
Expand Down
2 changes: 0 additions & 2 deletions docs/src/links.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env linuxcnc-python
# vim: sts=4 sw=4 et

from __future__ import absolute_import
from __future__ import print_function
import os, sys

try:
Expand Down
1 change: 0 additions & 1 deletion docs/src/links_db_gen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env linuxcnc-python
from __future__ import print_function
import os, sys

d = {}
Expand Down
2 changes: 0 additions & 2 deletions docs/src/mkpre.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
License: GPL V2
"""

from __future__ import absolute_import
from __future__ import print_function
def substall(s, r):
for a, b in r: s = s.replace(a, b)
return s
Expand Down
1 change: 0 additions & 1 deletion lib/python/gladevcp/tooledit_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

from __future__ import print_function
import sys, os, linuxcnc, hashlib
datadir = os.path.abspath(os.path.dirname(__file__))
KEYWORDS = ['S','T', 'P', 'X', 'Y', 'Z', 'A', 'B', 'C', 'U', 'V', 'W', 'D', 'I', 'J', 'Q', ';']
Expand Down
1 change: 0 additions & 1 deletion lib/python/pyvcp_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
of HAL pin compname.my-led
"""

from __future__ import print_function
import sys
import tkinter as Tkinter
from tkinter import *
Expand Down
12 changes: 4 additions & 8 deletions lib/python/rs274/OpenGLTk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@

from minigl import *
import math
import os,sys
import os
import _togl
import glnav

import sys
if sys.version_info[0] == 3:
from tkinter import _default_root
from tkinter import *
else:
from Tkinter import _default_root
from Tkinter import *
from tkinter import _default_root
from tkinter import *

# Keith Junius <[email protected]> provided many changes to Togl
TOGL_NORMAL = 1
TOGL_OVERLAY = 2
Expand Down
11 changes: 4 additions & 7 deletions src/emc/ini/update_ini.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

THIS_VERSION = "1.1"

Expand All @@ -8,12 +8,9 @@
import linuxcnc
import re
import datetime
if sys.version_info[0] == 3:
import tkinter
from tkinter import messagebox
else:
import Tkinter as tkinter
import tkMessageBox as messagebox

import tkinter
from tkinter import messagebox

def copysection(block):
#Just makes a straight copy of blocks that don't need any work
Expand Down
2 changes: 0 additions & 2 deletions src/emc/usr_intf/axis/scripts/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@


# import pdb

from __future__ import print_function
import sys, os
import string
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
Expand Down
6 changes: 1 addition & 5 deletions src/emc/usr_intf/axis/scripts/image-to-gcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
## image-to-gcode.py is Copyright (C) 2006 Jeff Epler
## [email protected]

from __future__ import print_function
import sys, os
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
sys.path.insert(0, os.path.join(BASE, "lib", "python"))
Expand Down Expand Up @@ -497,10 +496,7 @@ def __call__(self, conv, i0, j0, points):
conv.g.set_feed(conv.feed)

def ui(im, nim, im_name):
if sys.version_info[0] == 3:
import tkinter
else:
import Tkinter as tkinter
import tkinter

try:
from PIL import ImageTk
Expand Down
1 change: 0 additions & 1 deletion src/emc/usr_intf/gscreen/gscreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# this would probably be most useful for user's custom status widgets.
# you would need to calibrate your touchscreen to just work on a single screen
"""
from __future__ import print_function
import sys,os,subprocess
def _print_help():
print(""" Gscreen a customizable operator screen for linuxcnc based on pyGTK / GLADE.\n
Expand Down
1 change: 0 additions & 1 deletion src/hal/drivers/rbf2h.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import sys, getopt

GPL=0
Expand Down
1 change: 0 additions & 1 deletion src/hal/user_comps/gladevcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
-g option allows setting of the initial position of the panel
"""

from __future__ import print_function
import sys, os, subprocess
import traceback
import warnings
Expand Down
1 change: 0 additions & 1 deletion src/hal/user_comps/hal_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from __future__ import print_function
import linux_event
import sys
import os
Expand Down
1 change: 0 additions & 1 deletion src/hal/user_comps/pyvcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
-g option allows setting of the initial size and/or position of the panel
"""

from __future__ import print_function
import sys, os
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
sys.path.insert(0, os.path.join(BASE, "lib", "python"))
Expand Down

0 comments on commit 4435aac

Please sign in to comment.