How to add new Launcher...

Sep 18, 2012 at 2:47 AM

Hi,

I knew, there are only 3 launchers - "IronPython (.NET)", "Django", "Standard Python". (I don't care Interpreters.)

Are there any method to add user-defined launcher?

Coordinator
Sep 18, 2012 at 4:00 AM

Yes, you just need to implement an IPythonLauncherProvider which creates the IProjectLauncher which will do the actual launching.  The IPythonLauncherProvider is exported via MEF.  You can see the implementation of the default launcher provider here: https://pytools.codeplex.com/SourceControl/changeset/view/309b32130ec5#Release%2fProduct%2fPython%2fPythonTools%2fPythonTools%2fProject%2fDefaultLauncherProvider.cs

To get this loaded you just need to create a new VS extension which references the PTVS binaries and then make sure that it's source.extension.vsixmanifest file registers the assembly as an MefComponent (like the |%CurrentProject%| registration here: https://pytools.codeplex.com/SourceControl/changeset/view/309b32130ec5#Release%2fProduct%2fPython%2fPythonTools%2fsource.extension.vsixmanifest)

From there it should be loaded into the list and be called when configured as the launcher for a project.