~~~ Python Use Question ~~~

smartcardware.com questions at smartcardware.com
Sun Nov 24 14:28:44 EST 2002


Thanks for everyones replies and input.  I guess what I really meant
by not being able to embed python was the following.  Basically the
following is the gist of my post:

"I've coded apps that have used TCL, Perl, and Python as embedded
scriptling languages. TCL was OK but provided no object oriented
features, the Perl object model leaves much to be desired, and
Python's internal object structure requires translating your ojects
into python objects.

My recent research shows that Javascript is by far and away the best
option for a scripting engine. Object access is via accessor methods
in most implementations, so you just have to add a few methods to your
object to make them JS compatible. JS syntax is of course very much
like Java and C++, making the language accessable to a broad range of
programmers.

Since all object access is via accessor methods, implementing
functions usuable by the JS code doesnt introduce double translation
issues like Python does (C++ code passes translated object to python,
python code calls back into C++ which must instance a new object and
translate it to be usable YUK !!

JS is just passing the object around as a JSObject base class
instance, which you can access the real type of the object, and then
cast to your working class"

As I said this was from someone else, and not my opinion or statement.
 Basically the parts of the above message I'm concerned with are as
follows:

"Python's internal object structure requires translating your ojects
into python objects."

and

"double translation issues like Python does (C++ code passes
translated object to python, python code calls back into C++ which
must instance a new object and translate it to be usable YUK !!"

As said before, any and all information would be greatly appreciated!

Venn



More information about the Python-list mailing list