Skip to content

Commit

Permalink
Py3: no __builtin__ module available
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jun 17, 2019
1 parent b80d000 commit d2f0c4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Mod/Idf/Idf.py
Expand Up @@ -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 #
##########################################################
Expand Down Expand Up @@ -54,8 +58,6 @@
# 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]
Expand Down

0 comments on commit d2f0c4f

Please sign in to comment.