[IronPython] Run a script without a console to pop up?
Jim.Hugunin at microsoft.com
Wed Jan 11 17:35:16 PST 2006
The current beta 1 release of IronPython always pops up a console. One of our pre-1.0 workitems is to add a way to launch IronPython applications without popping up a console, but we don't have that yet. The idea is that anyone who's willing to work with a 1st beta should be willing to deal with a console popping up - but we'll fix this pretty soon.
I agree that the start-up time is annoying. We have some optimization work left to do here. If you run a static compiler on your Python code you can bring the start-up time from about 2 seconds to well under 1 second for simple programs today. Unfortunately, right now the only ways to use it are via the alpha preview VSIP integration or by writing your own front-end that uses IronPython.Hosting.PythonCompiler directly (see example at end of this message)
Code completion today only works from the interactive console. Tab will do an excellent job in that environment of providing you with options. Doing code completion for a dynamic language in a static IDE is challenging and we're unsure what our timeframe is for support there.
Thanks - Jim
FYI - Here's the simple program I used to compile a test hello world program to confirm that this does offer a major reduction in start-up time. Feel free to experiment with this for yourself.
from IronPython.Hosting import PythonCompiler
from System.Collections.Generic import *
sources = List[str]()
ipc = PythonCompiler(sources, 'hello.exe')
ipc.MainFile = 'hello.py'
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of stax0711-dev at yahoo.de
Sent: Sunday, January 08, 2006 12:53 PM
To: users at lists.ironpython.com
Subject: [IronPython] Run a script without a console to pop up?
I'm not much the console type of guy, I try to learn and try to like the
console, I even played with monad and watched videos about it but most
of the time it seems I do good without a console. Is there a way to run
a script without a console to pop up?
My other problem is there is a huge startup overhead, if I run a script
like the one below it takes 2-3 seconds, it's the same slowness as monad
startup, I really wish it would be < 1 second.
My last question is what things can be expected regarding code
completion for scripting?
from System.Windows.Forms import *
More information about the users