Build script and language config for Iron python based algorithms

This commit is contained in:
QuantConnect
2015-07-05 21:00:01 -04:00
parent 6f01622416
commit 98dc0e37b7
22 changed files with 825 additions and 105 deletions
+4 -49
View File
@@ -14,57 +14,12 @@
*/
using System;
using Python.Runtime;
using System.Reflection;
using QuantConnect.Data.Market;
namespace QuantConnect.Algorithm.Python
{
/// <summary>
/// This is the initial implementation of the Python.NET Runtime to pipe .NET events through to a Python Script.
/// </summary>
public class PythonAlgorithm : QCAlgorithm
{
private IntPtr _gs;
/// <summary>
/// Initialize the Python Algorithm
/// </summary>
public override void Initialize()
{
//Start the Python Connector:
PythonEngine.Initialize();
_gs = PythonEngine.AcquireLock();
//const string s = @"../../../../tests";
//Type RTClass = typeof(Runtime.Runtime);
///* pyStrPtr = PyString_FromString(s); */
//MethodInfo PyString_FromString = RTClass.GetMethod("PyString_FromString", BindingFlags.NonPublic | BindingFlags.Static);
//object[] funcArgs = new object[1];
//funcArgs[0] = s;
//IntPtr pyStrPtr = (IntPtr)PyString_FromString.Invoke(null, funcArgs);
}
/// <summary>
/// Pass Data TradeBars Events Through to Python Algorithm Instance
/// </summary>
/// <param name="data"></param>
public void OnData(TradeBars data)
{
}
/// <summary>
/// Tear down the Python engine:
/// </summary>
public override void OnEndOfAlgorithm()
{
PythonEngine.ReleaseLock(_gs);
PythonEngine.Shutdown();
}
}
/* This is a place holder project for the build script & python file configurations.
*
* It compiles to a DLL which is deleted after compilation by the python builder.
*/
}