I would like to call python script files from my c++ program.
I am not sure that the people I will distribute to will have python installed.
Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
...
What mature embeddable languages are available (or reversed, which popular languages have as a stated feature the ability to be embedded in other software)
and more importantly
What embeddable languages have a really good tutorial on embedding their language and extending it for your specific software
Bonus points:
Embeddable la...
What's the best way to embed Ruby as a scripting language in C++? Using ruby.h? SWIG? Something else? What I need is to expose some C++ objects to Ruby and have the Ruby interpreter evaluate scripts that access these objects. I don't care about extending Ruby or accessing it in C++.
I've found this article on embedding Ruby in C++, and ...
I have a C program with an embedded Perl interpreter. I want to be able to precompile some Perl code from within the program. How do I do that?
Rationale (if anyone is interested) is to be able to compile it once, store the parse tree, and execute many times (as long as the compiled code does not change).
Thanks!
Madhu
PS: I am using ...
Hello,
We wish to provide people to be able to add some logic to their accounts(say, given a few arguments, how to compute a particular result). So, essentially, this would be tantamount to writing simple business rules with support for conditionals and expressions. However, the challenge is to provide them a simple online editor where ...
Is it possible to use something like:
require 'serialport.o'
with Shoes? serialport.o is compiled c code as a ruby extension.
When I attempt to run the following code in shoes, I see no visible output to the screen and shoes crashes on OS X.
Thank you
CODE:
require "serialport.o"
port = "/dev/tty.usbserial-A1001O0o"
sp = Serial...
I'm thinking about using Python as an embedded scripting language in a hobby project written in C++. I would not like to depend on separately installed Python distribution. Python documentation seems to be quite clear about general usage, but I couldn't find a clear answer to this.
Is it feasible to deploy a Python interpreter + standar...
I am trying to extend an Eclipse code builder (for generating DTOs from Hibernate VOs) - and it uses Groovy for its template system.
The code it uses to create the groovy Script is a little weird (not what I see in the Groovy docs) but it works, mostly:
GroovyShell shell = new GroovyShell();
script = shell.parse(source);
Then, later...
I'm trying to write a function to return the truth value of a given PyObject. This function should return the same value as the if() truth test -- empty lists and strings are False, etc.
I have been looking at the python/include headers, but haven't found anything that seems to do this. The closest I came was PyObject_RichCompare() with ...
Hello,
I am using Python as a plug-in scripting language for an existing C++ application. I am able to embed the python interpreter as stated in the Python documentation. Everything works successfully with the initialization and de-initialization of the interpreter. I am, however, having trouble loading modules because I have not been a...
In the many Python applications I've created, I often create simple modules containing nothing but constants to be used as config files. Additionally, because the config file is actually a Python code file, I can add simple logic for changing variables depending on a debug level, etc.
While this works great for internal applications, I...
I have a C++ desktop application (written in wxWidgets) and I want to add support for some scripting language.
Scripting would mostly be used for run-time conversions of strings, numbers and dates by user supplied JavaScript code.
I'd like to use JavaScript because it is widely used and everyone is familiar with the syntax.
Googling ...
I'm interested in embedding a Prolog interpreter in Java. One option is using JPL, but the download links on the JPL site are broken, and the installation page mentions a jpl.zip that I can't find. I downloaded SWI-Prolog which seems to include JPL (it lists it as a component when installing), but I'm still not sure how I'd use it along ...
I'm embedding JRuby in Java, because I need to call some Ruby methods with Java strings as arguments. The thing is, I'm calling the methods like this:
String text = ""; // this can span over multiple lines, and will contain ruby code
Ruby ruby = Ruby.newInstance();
RubyRuntimeAdapter adapter = JavaEmbedUtils.newRuntimeAdapter();
String...
The majority of material I have found regarding DLR is related to IronPython. Can you parse and execute C# using DLR? If so is there over head that would prevent you from attempting this on a web server with about 30 users?
More specifically I would like to script the configuration of my workflow objects when a user first initiates a ...
What factors do you weigh in your decision process when you select an embedded scripting, and can issues of configuration and variation be overcome purely with IOC and the Plugin pattern?
Many times the Strategy Pattern and Decorator Pattern are good way to tame variation in domain logic. The problem set I am faced with is that calcula...
Hi,
i was wondering if anybody knows of a nice scripting language that can be embedded into php?
Javascript would be favorite and although there are several attempts they are either much too shaky/slow/outdated (phpjs, j4p5) or a real pain to get up and running on shared hosts (pecl spidermonkey).
The background is: I would like to ha...
An application I maintain has been around since VB6 days - ported to .Net 1.1, and now being updated/rewritten across to .Net 3.5
The application provides a mechanism to run VBScripts - this was done in a highly integrated way - allowing the program to parse multiple .vbs files and produce a list of all of the subroutines and functions ...
Im toying around with the idea to use python as an embedded scripting language for a project im working on and have got most things working. However i cant seem to be able to convert a python extended object back into a native c++ pointer.
So this is my class:
class CGEGameModeBase
{
public:
virtual void FunctionCall()=0;
virtu...
Given a PyObject* pointing to a python object, how do I invoke one of the object methods? The documentation never gives an example of this:
PyObject* obj = ....
PyObject* args = Py_BuildValue("(s)", "An arg");
PyObject* method = PyWHATGOESHERE(obj, "foo");
PyObject* ret = PyWHATGOESHERE(obj, method, args);
if (!ret) {
// check error....