3 using System
.Diagnostics
;
4 using System
.Collections
;
5 using System
.Reflection
;
7 using System
.CodeDom
.Compiler
;
10 using MonoDevelop
.Projects
;
11 using MonoDevelop
.Core
.Gui
;
12 using MonoDevelop
.Core
;
13 using MonoDevelop
.Core
;
15 namespace PythonBinding
17 public class PythonExecutionManager
19 public void Execute (string filename
, bool debug
)
21 ProcessStartInfo psi
= new ProcessStartInfo ("IronPythonConsole", filename
);
22 psi
.WorkingDirectory
= Path
.GetDirectoryName (filename
);
23 psi
.UseShellExecute
= false;
26 public void Execute(IProject project
, bool debug
)
28 //PythonCompilerParameters parameters = (PythonCompilerParameters) project.ActiveConfiguration;
29 //FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
33 foreach (ProjectFile finfo
in project
.ProjectFiles
) {
34 if (finfo
.Subtype
!= Subtype
.Directory
) {
35 switch (finfo
.BuildAction
) {
36 case BuildAction
.Compile
:
37 files
+= String
.Format ("{0} ", finfo
.Name
);
42 Console
.WriteLine (files
);
44 string fullCommand
= String
.Format ("-e \"IronPythonConsole {0};read -p 'press any key to continue...' -n1\"", files
);
45 ProcessStartInfo psi
= new ProcessStartInfo ("xterm", fullCommand
);
46 //psi.WorkingDirectory = Path.GetDirectoryName (exe);
47 psi
.UseShellExecute
= false;
48 Process p
= Process
.Start (psi
);