Using ContextFree with another application

Here you can discuss and share functionality improvements and helper programs to make Context Free better.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
hjrnunes
Posts: 2
Joined: Tue May 19, 2009 10:24 am

Using ContextFree with another application

Post by hjrnunes »

Hi all!
We are developing an application that manipulates cfdg files and images. Basically, it's something that allows you to evolve images generated with Context Free. Right now, we're spawning processes to run cfdg on each grammar to generate the image, but that's hardly efficient, especially so because we have to have something to stop it from running indefinitely - some kind of time limit. I'm wondering if there's a more suitable option than just spawning processes running cfdg. Some way to integrate it more tightly with an enclosing app. I noticed that there is a lot of people integrating, or otherwise using, Context Free in their projects. What's your approach? Our app is written in Python and is being developed for Mac OSX.
Thanks!

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Re: Using ContextFree with another application

Post by MtnViewJohn »

In the current version using the command line cfdg program is your best bet. You can use the -m option to keep it from running too long. After we finish version 3.0 we are planning on a version 3.1 with user interface enhancements, including the ability to integrate with real IDEs. But that will be an awful long time for you to wait. Have you considered getting the source and adding your python code to the Context Free XCode project using the Python-Objective-C bridge?

hjrnunes
Posts: 2
Joined: Tue May 19, 2009 10:24 am

Re: Using ContextFree with another application

Post by hjrnunes »

That's a very good tip! The kind I was looking for... Thanks! I hope I can show the community what we're working on soon! It's pretty exciting stuff for CFA users!

Post Reply