[IronPython] IronPython hungs when creating Excel.Application

Snaury snaury at gmail.com
Wed Mar 1 02:40:22 PST 2006


The following code hungs when creating Excel.Application, by the CPU
usage I can guess it is doing something, but I never had enough
patience to wait if it ever unhungs. Is this supposed behaviour, or am
I doing something wrong?

import System
# Workaround for MS Excel bug
print "Setting en-US culture..."
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo("en-US")
# Now try to create Excel Application
print "Getting Excel.Application typeref"
typeref = System.Type.GetTypeFromProgID("Excel.Application")
print "Creating Excel.Application object"
xlApp = System.Activator.CreateInstance(typeref)
xlApp.Visible = true
xlApp.UserControl = true


More information about the users mailing list