import sys
if 'gds_key' in sys.modules:
    print >> sys.stderr, "Cannot load IPKISS when GDS_KEY is already loaded"
    assert False

from . import settings
from .primitives.library import gds_library
from .io.output_gdsii import gds_output_gdsii
from .primitives.layer import gds_layerlist


Default_Library = gds_library("GK_Default", 1E-6, 5E-9)
settings.set_current_library(Default_Library)

## PL: On windows with py2exe gds_output_gdsii cannot handle Blackhole objects
try:
  Default_Output = gds_output_gdsii()
  settings.set_current_output(Default_Output)
except:
  Default_Output = None

settings.set_current_layerlist( gds_layerlist())

#print >> sys.stderr, "IPKISS 1.4"
