Py3: no __builtin__ module available
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user