-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi,
Dynamo version
DynamoSanbox 3.4.1
IronPython version
2.7
DynamoIronPython2 Package version
3.2.1
Operating system
Win 10
What did you expect to see?
IronPython.StdLib is not loaded by default
code to reproduce
import sys
import clr
try:
import functools
except Exception as e:
OUT = e, sys.version, sys.path
workaround adding the correct StdLib path in sys.path
import sys
import clr
import System
clr.AddReference("System.Core")
clr.ImportExtensions(System.Linq)
#
ipy2_assembly = System.AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(lambda a : a.GetName().Name == 'IronPython.Modules')
assembly_ipy2_Directory = System.IO.Path.GetDirectoryName( ipy2_assembly.Location )
parent_ipy2_Directory = System.IO.Directory.GetParent(assembly_ipy2_Directory).FullName
#
if System.IO.Directory.Exists(parent_ipy2_Directory + "\\lib"):
sys.path.append(parent_ipy3_Directory + "\\lib")
if System.IO.Directory.Exists(parent_ipy2_Directory + "\\extra\\lib"):
sys.path.append(parent_ipy2_Directory + "\\extra\\lib")
if System.IO.Directory.Exists(parent_ipy2_Directory + "\\extra"):
sys.path.append(parent_ipy2_Directory + "\\extra")
import functools
import io
Metadata
Metadata
Assignees
Labels
No labels
