[Monodevelop-patches-list] r1926 - in trunk/MonoDevelop: . Extras Extras/PythonBinding Extras/PythonBinding/Gui Extras/PythonBinding/Project Extras/PythonBinding/templates

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Aug 9 13:30:08 EDT 2004


Author: jluke
Date: 2004-08-09 13:30:08 -0400 (Mon, 09 Aug 2004)
New Revision: 1926

Added:
   trunk/MonoDevelop/Extras/
   trunk/MonoDevelop/Extras/PythonBinding/
   trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs
   trunk/MonoDevelop/Extras/PythonBinding/Gui/
   trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs
   trunk/MonoDevelop/Extras/PythonBinding/Makefile
   trunk/MonoDevelop/Extras/PythonBinding/Project/
   trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs
   trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs
   trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs
   trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml
   trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs
   trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs
   trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs
   trunk/MonoDevelop/Extras/PythonBinding/README
   trunk/MonoDevelop/Extras/PythonBinding/TODO
   trunk/MonoDevelop/Extras/PythonBinding/templates/
   trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml
   trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml
Log:
add an initial binding for IronPython
* some assembly required


Added: trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/AssemblyInfo.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,14 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("PythonBinding")]
+[assembly: AssemblyDescription("Python binding for MonoDevelop")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("(c) 2004 John Luke")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]

Added: trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/Gui/CompilerParametersPanel.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,78 @@
+using System;
+using System.IO;
+using Gtk;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.ExternalTool;
+using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.Properties;
+using MonoDevelop.Core.AddIns.Codons;
+using MonoDevelop.Services;
+
+namespace PythonBinding
+{
+	public class CompilerParametersPanel : AbstractOptionPanel
+	{
+		PythonCompilerParameters compilerParameters = null;
+		Entry outputPath = new Entry ();
+		Entry assemblyName = new Entry ();
+		RadioButton exeTarget = new RadioButton ("exe");
+		RadioButton dllTarget;
+		CheckButton debug = new CheckButton (GettextCatalog.GetString ("Include debug information"));
+		
+		public override void LoadPanelContents()
+		{
+			this.compilerParameters = (PythonCompilerParameters)((IProperties)CustomizationObject).GetProperty("Config");
+			
+			dllTarget = new RadioButton (exeTarget, "dll");
+			SetupUI ();
+			RestoreValues ();
+			this.ShowAll ();
+		}
+		
+		public override bool StorePanelContents()
+		{
+			compilerParameters.AssemblyName = assemblyName.Text;
+			compilerParameters.OutputPath = outputPath.Text;
+			compilerParameters.IncludeDebugInformation = debug.Active;
+			if (exeTarget.Active)
+				compilerParameters.CompilationTarget = CompilationTarget.Exe;
+			else
+				compilerParameters.CompilationTarget = CompilationTarget.Dll;
+				
+			return true;
+		}
+
+		void SetupUI ()
+		{
+			VBox vbox = new VBox (false, 6);
+			Label outputLabel = new Label ();
+			outputLabel.Markup = String.Format ("<b>{0}</b>", GettextCatalog.GetString ("Output path"));
+			vbox.PackStart (outputLabel, false, true, 0);
+			vbox.PackStart (outputPath, false, true, 0);
+			Label assemblyLabel = new Label ();
+			assemblyLabel.Markup = String.Format ("<b>{0}</b>", GettextCatalog.GetString ("Assembly name"));
+			vbox.PackStart (assemblyLabel, false, true, 0);
+			vbox.PackStart (assemblyName, false, true, 0);
+			Label targetLabel = new Label ();
+			targetLabel.Markup = String.Format ("<b>{0}</b>", GettextCatalog.GetString ("Target options"));
+			vbox.PackStart (targetLabel, false, true, 0);
+			vbox.PackStart (exeTarget, false, true, 0);
+			vbox.PackStart (dllTarget, false, true, 0);
+			vbox.PackStart (debug, false, true, 0);
+			this.Add (vbox);
+		}
+
+		void RestoreValues ()
+		{
+			assemblyName.Text = compilerParameters.AssemblyName;
+			outputPath.Text = compilerParameters.OutputPath;
+			if (compilerParameters.CompilationTarget == CompilationTarget.Exe)
+				exeTarget.Active = true;
+			else
+				dllTarget.Active = true;
+			debug.Active = compilerParameters.IncludeDebugInformation;
+		}
+	}
+}

Added: trunk/MonoDevelop/Extras/PythonBinding/Makefile
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/Makefile	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/Makefile	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,45 @@
+
+CSC = mcs /debug
+ASSEMBLY = PythonBinding.dll
+ADDIN = PythonBinding.addin.xml
+
+TEMPLATE1 = templates/PythonConsoleProject.xpt.xml
+TEMPLATE2 = templates/PythonGtkProject.xpt.xml
+
+DLLS = /r:../../Core/build/bin/MonoDevelop.Core.dll \
+	/r:../../Core/build/bin/MonoDevelop.Base.dll \
+	/r:../../Core/build/bin/MonoDevelop.SourceEditor.dll \
+	/r:../../Core/build/bin/MonoDevelop.Gui.Widgets.dll \
+	-pkg:gtk-sharp
+
+#	$(BASE_DEPENDENCIES_LIBS)
+
+FILES = \
+./Gui/CompilerParametersPanel.cs \
+./Project/CompilationTarget.cs \
+./Project/PythonProject.cs \
+./Project/PythonCompilerParameters.cs \
+./PythonCompilerManager.cs \
+./AssemblyInfo.cs \
+./PythonLanguageBinding.cs \
+./PythonExecutionManager.cs
+
+#build_sources = $(addprefix $(srcdir)/, $(FILES))
+
+#assemblydir = $(libdir)/monodevelop/AddIns/AddIns/BackendBindings
+#assembly_DATA = $(ASSEMBLY)
+
+all: $(ASSEMBLY)
+
+$(ASSEMBLY): $(FILES)
+	$(CSC) $(FILES) $(DLLS) /out:$(ASSEMBLY) /target:library \
+	&& cp $(ASSEMBLY) ../../Core/build/AddIns/AddIns/BackendBindings/. \
+	&& cp $(ADDIN) ../../Core/build/AddIns/AddIns/BackendBindings/. \
+	&& cp $(TEMPLATE1) ../../Core/build/AddIns/AddIns/BackendBindings/templates/. \
+	&& cp $(TEMPLATE2) ../../Core/build/AddIns/AddIns/BackendBindings/templates/.
+
+#CLEANFILES = $(ASSEMBLY)
+#EXTRA_DIST = $(FILES)
+
+clean:
+	rm -f $(ASSEMBLY)

Added: trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/Project/CompilationTarget.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,11 @@
+using System;
+
+namespace PythonBinding
+{
+	public enum CompilationTarget
+	{
+		Exe, 
+		Dll,
+	}
+}
+

Added: trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/Project/PythonCompilerParameters.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,107 @@
+using System;
+using System.ComponentModel;
+using System.IO;
+using System.Text;
+using System.Xml;
+
+using MonoDevelop.Gui.Components;
+using MonoDevelop.Internal.Project;
+
+namespace PythonBinding
+{
+	/// <summary>
+	/// This class handles project specific compiler parameters
+	/// </summary>
+	public class PythonCompilerParameters : AbstractProjectConfiguration
+	{
+		CompilerOptions compilerOptions = new CompilerOptions ();
+		
+		public CompilerOptions CurrentCompilerOptions {
+			get {
+				return compilerOptions;
+			}
+		}
+		
+		[LocalizedProperty("Output path", Description = "The path where the assembly is created.")]
+		public string OutputPath {
+			get {
+				return OutputDirectory;
+			}
+			set {
+				OutputDirectory = value;
+			}
+		}
+		
+		[LocalizedProperty("Output assembly", Description = "The assembly name.")]
+		public string AssemblyName {
+			get {
+				return OutputAssembly;
+			}
+			set {
+				OutputAssembly = value;
+			}
+		}
+		
+		[DefaultValue(CompilationTarget.Exe)]
+		[LocalizedProperty("Compilation Target", Description = "The compilation target of the source code. (/dll, /exe)")]
+		public CompilationTarget CompilationTarget {
+			get {
+				return compilerOptions.compilationTarget;
+			}
+			set {
+				compilerOptions.compilationTarget = value;
+			}
+		}
+		
+		[DefaultValue(false)]
+		[LocalizedProperty("Include debug information", Description = "Specifies if debug information should be omited. (/DEBUG)")]
+		public bool IncludeDebugInformation {
+			get {
+				return compilerOptions.includeDebugInformation;
+			}
+			set {
+				compilerOptions.includeDebugInformation = value;
+			}
+		}
+		
+		public PythonCompilerParameters ()
+		{
+		}
+		
+		public PythonCompilerParameters (string name)
+		{
+			this.name = name;
+		}
+		
+		[XmlNodeName("CompilerOptions")]
+		public class CompilerOptions
+		{
+			[XmlAttribute("compilationTarget")]
+			public CompilationTarget compilationTarget = CompilationTarget.Exe;
+			
+			[XmlAttribute("includeDebugInformation")]
+			internal bool includeDebugInformation = false;
+			
+			public string GenerateOptions ()
+			{
+				StringBuilder options = new StringBuilder ();
+				switch (compilationTarget) {
+					case PythonBinding.CompilationTarget.Dll:
+						options.Append ("/dll ");
+						break;
+					case PythonBinding.CompilationTarget.Exe:
+						options.Append ("/exe ");
+						break;
+					default:
+						throw new System.NotSupportedException ("Unsupported compilation target : " + compilationTarget);
+				}
+				
+				if (includeDebugInformation) {
+					options.Append ("/DEBUG ");
+				}
+				
+				return options.ToString ();
+			}
+		}
+	}
+}

Added: trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/Project/PythonProject.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,42 @@
+using System;
+using System.IO;
+using System.Collections;
+using System.Xml;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+
+namespace PythonBinding
+{
+	public class PythonProject : AbstractProject
+	{
+		public override string ProjectType {
+			get {
+				return PythonLanguageBinding.LanguageName;
+			}
+		}
+		
+		public override IConfiguration CreateConfiguration ()
+		{
+			return new PythonCompilerParameters ();
+		}
+		
+		public PythonProject ()
+		{
+		}
+		
+		public PythonProject (ProjectCreateInformation info, XmlElement projectOptions)
+		{
+			if (info != null) {
+				Name = info.ProjectName;
+				Configurations.Add (CreateConfiguration ("Debug"));
+				Configurations.Add (CreateConfiguration ("Release"));
+				foreach (PythonCompilerParameters parameter in Configurations) {
+					parameter.OutputDirectory = Path.Combine (info.BinPath, parameter.Name);
+					parameter.OutputAssembly  = Name;
+				}
+			}
+		}
+	}
+}
+

Added: trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/PythonBinding.addin.xml	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,33 @@
+<AddIn name        = "Python Language Binding"
+       author      = "John Luke"
+       copyright   = "GPL"
+       url         = "http://www.monodevelop.com"
+       description = "Python Language Binding"
+       version     = "0.6">
+
+  <Runtime>
+    <Import assembly = "PythonBinding.dll"/>
+  </Runtime>
+
+  <Extension path = "/MonoDevelop/ProjectTemplates">
+    <ProjectTemplate id = "PythonConsoleProject"
+                     location = "templates/PythonConsoleProject.xpt.xml"/>
+    <ProjectTemplate id = "PythonGtkProject"
+                     location = "templates/PythonGtkProject.xpt.xml"/>
+  </Extension>
+
+  <Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
+    <Conditional activeproject = "Python">
+      <DialogPanel id = "PythonCompilerParametersPanel"
+                   _label = "Compiler"
+                   class = "PythonBinding.CompilerParametersPanel"/>
+    </Conditional>
+  </Extension>
+
+  <Extension path = "/SharpDevelop/Workbench/LanguageBindings">
+    <LanguageBinding id = "Python"
+                     supportedextensions = ".py"
+                     class = "PythonBinding.PythonLanguageBinding"/>
+  </Extension>
+
+</AddIn>

Added: trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/PythonCompilerManager.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,69 @@
+using System;
+using System.IO;
+using System.CodeDom.Compiler;
+using Gtk;
+
+using MonoDevelop.Gui.Components;
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+
+namespace PythonBinding
+{
+	public class PythonCompilerManager
+	{
+		FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
+		
+		public string GetCompiledOutputName (string fileName)
+		{
+			return Path.ChangeExtension (fileName, ".exe");
+		}
+		
+		public string GetCompiledOutputName (IProject project)
+		{
+			PythonProject p = (PythonProject) project;
+			PythonCompilerParameters compilerparameters = (PythonCompilerParameters) p.ActiveConfiguration;
+			string exe  = fileUtilityService.GetDirectoryNameWithSeparator (compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + ".exe";
+			return exe;
+		}
+		
+		public bool CanCompile (string fileName)
+		{
+			return Path.GetExtension (fileName).ToLower () == ".py";
+		}
+		
+		ICompilerResult Compile (PythonCompilerParameters compilerparameters, string[] fileNames)
+		{
+			// just pretend we compiled
+			// and leave it to the runtime for now
+			return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), "");
+		}
+
+		public ICompilerResult CompileFile (string fileName, PythonCompilerParameters compilerparameters)
+		{
+			// just pretend we compiled
+			// and leave it to the runtime for now
+			return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), "");
+		}
+		
+		public ICompilerResult CompileProject (IProject project)
+		{
+			// just pretend we compiled
+			// and leave it to the runtime for now
+			return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), "");
+		}
+		
+		string GetCompilerName ()
+		{
+			return "IronPythonConsole";
+		}
+		
+		ICompilerResult ParseOutput (TempFileCollection tf, StreamReader sr)
+		{
+			// just pretend we compiled
+			// and leave it to the runtime for now
+			return new DefaultCompilerResult (new CompilerResults (new TempFileCollection ()), "");
+		}
+	}
+}

Added: trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/PythonExecutionManager.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,52 @@
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections;
+using System.Reflection;
+using System.Xml;
+using System.CodeDom.Compiler;
+using Gtk;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Gui;
+using MonoDevelop.Services;
+using MonoDevelop.Core.Services;
+
+namespace PythonBinding
+{
+	public class PythonExecutionManager
+	{
+		public void Execute (string filename, bool debug)
+		{
+			ProcessStartInfo psi = new ProcessStartInfo ("IronPythonConsole", filename);
+			psi.WorkingDirectory = Path.GetDirectoryName (filename);
+			psi.UseShellExecute = false;
+		}
+		
+		public void Execute(IProject project, bool debug)
+		{
+			//PythonCompilerParameters parameters = (PythonCompilerParameters) project.ActiveConfiguration;
+			//FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
+	
+			string files = "";
+
+			foreach (ProjectFile finfo in project.ProjectFiles) {
+				if (finfo.Subtype != Subtype.Directory) {
+					switch (finfo.BuildAction) {
+						case BuildAction.Compile:
+							files += String.Format ("{0} ", finfo.Name);
+							break;
+					}
+				}
+			}
+			Console.WriteLine (files);
+
+			string fullCommand = String.Format ("-e \"IronPythonConsole {0};read -p 'press any key to continue...' -n1\"", files);
+			ProcessStartInfo psi = new ProcessStartInfo ("xterm", fullCommand);
+			//psi.WorkingDirectory = Path.GetDirectoryName (exe);
+			psi.UseShellExecute  = false;
+			Process p = Process.Start (psi);
+			p.WaitForExit ();
+		}
+	}
+}

Added: trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/PythonLanguageBinding.cs	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,113 @@
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krueger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.IO;
+using System.Diagnostics;
+using System.Collections;
+using System.Reflection;
+using System.Resources;
+using System.Xml;
+using System.CodeDom.Compiler;
+using System.Threading;
+using Gtk;
+
+using MonoDevelop.Internal.Project;
+using MonoDevelop.Internal.Templates;
+using MonoDevelop.Gui;
+
+namespace PythonBinding
+{
+	public class PythonLanguageBinding : ILanguageBinding
+	{
+		public const string LanguageName = "Python";
+		
+		PythonExecutionManager executionManager = new PythonExecutionManager();
+		PythonCompilerManager  compilerManager  = new PythonCompilerManager();
+		
+		public string Language {
+			get {
+				return LanguageName;
+			}
+		}
+		
+		public void Execute(string filename)
+		{
+			Execute (filename, false);
+		}
+	
+		public void Execute(string filename, bool debug)
+		{
+			Debug.Assert(executionManager != null);
+			executionManager.Execute(filename, debug);
+		}
+		
+		public void Execute (IProject project)
+		{
+			Execute (project, false);
+		}
+
+		public void DebugProject (IProject project)
+		{
+			Execute (project, true);
+		}
+
+		public void Execute(IProject project, bool debug)
+		{
+			Debug.Assert(executionManager != null);
+			executionManager.Execute(project, debug);
+		}
+		
+		public string GetCompiledOutputName(string fileName)
+		{
+			Debug.Assert(compilerManager != null);
+			return compilerManager.GetCompiledOutputName(fileName);
+		}
+		
+		public string GetCompiledOutputName(IProject project)
+		{
+			Debug.Assert(compilerManager != null);
+			return compilerManager.GetCompiledOutputName(project);
+		}
+		
+		public bool CanCompile(string fileName)
+		{
+			Debug.Assert(compilerManager != null);
+			return compilerManager.CanCompile(fileName);
+		}
+		
+		public ICompilerResult CompileFile(string fileName)
+		{
+			Debug.Assert(compilerManager != null);
+			PythonCompilerParameters param = new PythonCompilerParameters();
+			param.OutputAssembly = Path.ChangeExtension(fileName, ".exe");
+			return compilerManager.CompileFile(fileName, param);
+		}
+		
+		public ICompilerResult CompileProject(IProject project)
+		{
+			Debug.Assert(compilerManager != null);
+			return compilerManager.CompileProject(project);
+		}
+		
+		public ICompilerResult RecompileProject(IProject project)
+		{
+			return CompileProject(project);
+		}
+		
+		public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
+		{
+			return new PythonProject(info, projectOptions);
+		}
+
+		public void GenerateMakefile (IProject project, Combine parentCombine)
+		{
+			throw new NotImplementedException ();
+		}
+		
+	}
+}

Added: trunk/MonoDevelop/Extras/PythonBinding/README
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/README	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/README	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,7 @@
+
+This is a binding for IronPython and MonoDevelop.
+See http://ironpython.com
+
+You will need to have IronPythonConsole an executable in
+your path that executes the interpreter correctly.
+

Added: trunk/MonoDevelop/Extras/PythonBinding/TODO
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/TODO	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/TODO	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,3 @@
+
+- allow compile & run instead of fake compile & run
+- options and stuff

Added: trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/templates/PythonConsoleProject.xpt.xml	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<Template originator   = "John Luke"
+          created      = "04/25/2004"
+          lastModified = "04/25/2004">
+	
+	<!-- Template Header -->
+	<TemplateConfiguration>
+		<_Name>Python Console Project</_Name>
+		<Category>Python</Category>
+		<Icon>C#.Project.DOSProject</Icon>
+		<LanguageName>Python</LanguageName>
+		<_Description>Python Console Project</_Description>
+	</TemplateConfiguration>
+	
+	<!-- Actions -->
+	<Actions>
+		<Open filename = "main.py"/>
+	</Actions>
+	
+	<!-- Template Content -->
+	<Combine name = "${ProjectName}" directory = ".">
+		<Options>
+			<StartupProject>${ProjectName}</StartupProject>
+		</Options>
+		
+		<Project name = "${ProjectName}" directory = ".">
+			<Options/>
+			<Files>
+				<File name="main.py"><![CDATA[print "hello"]]></File>
+			</Files>
+		</Project>
+	</Combine>
+</Template>

Added: trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml
===================================================================
--- trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml	2004-08-09 03:13:26 UTC (rev 1925)
+++ trunk/MonoDevelop/Extras/PythonBinding/templates/PythonGtkProject.xpt.xml	2004-08-09 17:30:08 UTC (rev 1926)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<Template originator   = "John Luke"
+          created      = "04/25/2004"
+          lastModified = "04/25/2004">
+	
+	<!-- Template Header -->
+	<TemplateConfiguration>
+		<_Name>Python Gtk Project</_Name>
+		<Category>Python</Category>
+		<Icon>C#.Project.DOSProject</Icon>
+		<LanguageName>Python</LanguageName>
+		<_Description>Python Gtk Project</_Description>
+	</TemplateConfiguration>
+	
+	<!-- Actions -->
+	<Actions>
+		<Open filename = "main.py"/>
+	</Actions>
+	
+	<!-- Template Content -->
+	<Combine name = "${ProjectName}" directory = ".">
+		<Options>
+			<StartupProject>${ProjectName}</StartupProject>
+		</Options>
+		
+		<Project name = "${ProjectName}" directory = ".">
+			<Options/>
+			<Files>
+				<!-- this is the included IronPython example -->
+				<File name="main.py"><![CDATA[import Gtk
+                                                                                
+Gtk.Application.Init()
+w = Gtk.Window("hello world")
+w.DeleteEvent += lambda *ignore: Gtk.Application.Quit()
+                                                                                
+b = Gtk.Button("click me")
+                                                                                
+def say_hello(o, args): print "hello"
+                                                                                
+b.Clicked += say_hello
+                                                                                
+w.Add(b)
+w.ShowAll()
+Gtk.Application.Run()]]></File>
+			</Files>
+		</Project>
+	</Combine>
+</Template>




More information about the Monodevelop-patches-list mailing list