Lisp 2 Python?

Georg Mischler schorsch at schorsch.com
Sat Feb 5 06:55:30 EST 2000


Joel Lucsy wrote:
> chris patti wrote:
> > Surely you jest.
> Oh no, I jest not! =)

Hmmm... ;)


> > Also, which LISP? Common LISP I presume? You'd almost need something
> > as complex as common lisp itself to convert that to PYthon :)
>
> Well, the idea to go from AutoLisp (which is built into AutoCAD),
> to python. This is a rather simplistic version of lisp, not even
> remotely close to Common Lisp.

This may be an advantage or a disadvantage, depending on the
features your programs use.

Having reimplemented thousands of lines of Autolisp code in Python
myself manually during the last two years, I can say that such
an converter wouldn't have helped me anything. This has several
reasons. The most important ones are based on the fact that the
applications involved were based on nontrivial data structures,
which I had to stash into assoc lists within assoc lists within
assoc lists etc. in Autolisp, while in Python, a relatively
straightforward OO-Design saved me much of the hassle.

If you just have a few procedural routines to translate, then an
automatic converter might be fun, but I wouldn't expect any
wonders. Whatever you do, the resulting python code won't look
very pythonic, and will probably be a nightmare to maintain.
What kind of programs are you looking to convert? Or is this
just a "nice to have" question?

Once we are here, the more interesting thing (and precondition
to the above for any useful applications) would be a Python
wrapper to ADS, and ultimately ARX. Yes, the latter looks like
gargantuan task, but some day someone will have to do it... ;)
(for the uninitiated: ARX is the OO-progamming interface to
Autocad in C++. Autodesk only delivers online documentation
for this, saving the many trees required to print several
thousand pages of reference material)


Have fun!

-schorsch

--
Georg Mischler  --  simulation developper  --  schorsch at schorsch.com
+schorsch.com+  --  lighting design tools  --  http://www.schorsch.com/


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list