Py3: no __builtin__ module available

This commit is contained in:
wmayer
2019-06-17 16:25:25 +02:00
parent bd1670fd76
commit 002a1bbc15

View File

@@ -22,11 +22,15 @@
#* Milos Koutny 2010 *
#***************************************************************************/
import FreeCAD, Part, os, FreeCADGui, __builtin__
import FreeCAD, Part, os, FreeCADGui
from FreeCAD import Base
from math import *
import ImportGui
# to distinguish python built-in open function from the one declared here
if open.__module__ in ['__builtin__','io']:
pythonopen = open
##########################################################
# Script version dated 19-Jan-2012 #
##########################################################
@@ -54,8 +58,6 @@ IDF_diag_path="/tmp" # path for output of footprint.lst and missing_models.lst
# End config section do not touch code below #
########################################################################################
pythonopen = __builtin__.open # to distinguish python built-in open function from the one declared here
def open(filename):
"""called when freecad opens an Emn file"""
docname = os.path.splitext(os.path.basename(filename))[0]