Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  Clash of Civilizations
  Programmers: macro possibility

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   Programmers: macro possibility Format for Better Printing
Blade Runner
Warlord
Belgium
b.02-15-99
posted June 03, 1999 11:33   Click Here to See the Profile for Blade RunnerClick Here to Email Blade Runner  send a private message to Blade Runner
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Hi,

I find this possibility on the JPython site. They have a Java library which implement the Python macro language. I think we can use it for the Clash. Here is a short embedded program :
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class SimpleEmbedded {
public static void main(String []args)
throws PyException
{
PythonInterpreter interp = new PythonInterpreter();
System.out.println("Hello, brave new world");
interp.exec("import sys");
interp.exec("print sys");
interp.set("a", new PyInteger(42));
interp.exec("print a");
interp.exec("x = 2+2");
PyObject x = interp.get("x");
System.out.println("x: "+x);
System.out.println("Goodbye, cruel world");
}
}
(Huhh... The intends are disappear, sorry about the awfull look of the code.)
I think we need to use this macro language to program that parts of the Clash which runed by the event loop ones, twice and not time criticaly.

The URL: www.jpython.org/

Blade Runner

[This message has been edited by Blade Runner (edited June 03, 1999).]

[This message has been edited by Blade Runner (edited June 03, 1999).]

Apolyton Civilization Site Forums
> > > Clash of Civilizations Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | HAC | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War | WesW's Ctp1/2 Site