OK, in that case, here is how I suggest you get started:
* Familiarize yourself with the build process here:
http://trac.marketcetera.org/trac.fcgi/wiki/Marketcetera/BuildingPhotonGet Photon building in its current form.
* Notice that we have a plugin called org.jruby.bsf. This contains
the libraries for both JRuby (
http://jruby.codehaus.org/) and
BSF(
http://jakarta.apache.org/bsf/). Putting them both in the same
plugin is probably stylistically not ideal, but eliminates some sticky
classloading issues. You will need to create a similar plugin for
Jython/BSF.
* There are a couple of places where the code makes reference to Ruby:
one call to BSFManager.registerScriptingEngine() in
PhotonPlugin.start(); ScriptRegistry.initBSFManager calls
loadScriptingEngine("ruby") and evals a couple of expressions into the
Ruby runtime; ScriptLoggingUtil is a set of utility methods for
getting useful error messages out of BSF/JRuby exceptions. Each of
these will need to be ported.
At this point you will be in pretty good shape. You then should be
able to create a JPython script in a text editor, and drop it into the
ActiveScripts directory in the Photon workspace and run it. It will
need to subclass from the "Strategy" Java class in the same way a Ruby
script does (
http://trac.marketcetera.org/trac.fcgi/wiki/Marketcetera/PhotonScripting).
Next you will need to tackle the inclusion of PyDev (or similar).
Here's what I suggest.
* Get binary versions of the PyDev plugins and put them into your
target platform directory (don't forget to go to Preferences->Plug-in
Development->Target Platform and hit "Reload" or else your IDE won't
recognize the new plugins).
* Open up the plugin.xml file in the "org.marketcetera.photon" plugin,
and replace the dependency on "org.rubypeople.rdt.core" with the name
of the PyDev plugin (or plugins).
* There is only one direct dependence on the RDT stuff in the code: in
PhotonPlugin.ensureDefaultProject(), we have to add the "Ruby Nature"
to the default project when we create it. Likely we will need to do
something similar for JPython/PyDev.
Dealing with these Eclipse plugins may be the trickiest part of this
whole process, so feel free to ask any questions about that or
anything else. I hope this is enough to get you started.
graham
On 8/8/07, murty <
[hidden email]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Graham
>
> Thanks for the response. I would choose the second option because I
> prefer to have complete support for Python. I understand the benefits
> and ease of Ruby, especially RoR and other good stuff but
> unfortunately, it is my opinion that Ruby is not rich in libraries or
> for that matter in institutional acceptance (outside Japan). There is
> Pydev for Eclipse which I believe is the equivalent of RDT. If not,
> take a look at Python from Enthought (
http://code.enthought.com/)
> which I will, in the weekend.
>
> I appreciate any more details you might have to help me contribute.
> Thanks
>
> Murty Rompalli
>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org>
> iD8DBQFGumxU8nY4Ppot1YYRAiZxAJ0dxsKWaEV/qqlX9paGJyziZbFN3ACfXN4s
> gM2ufNyqeLeKZpZrR2Ntjt0=
> =Vgit
> -----END PGP SIGNATURE-----
>
>
--
Marketcetera Trading Platform
download.run.trade.
www.marketcetera.org
_______________________________________________
m-etc-users mailing list
[hidden email]
http://lists.marketcetera.org/cgi-bin/mailman/listinfo/m-etc-users