Newbie question: Sub-interpreters for CAD program
Terry Hancock
hancock at anansispaceworks.com
Wed Aug 24 21:05:50 EDT 2005
On Wednesday 24 August 2005 03:48 pm, sonicSpammersGoToHellSmooth wrote:
> In my case I'd like to write a CAD program which allows the user to
> write Python scripts, and to provide an API to do CAD stuff, manipulate
> parameters, circuits, layouts, simulations, etc. The user should not
> have access to the internals of the CAD program itself. The CAD
> program is written primarily in Python, with possibly C++ extensions
> for speed critical stuff.
This is a straightforward case of "embedding Python". You'll want to
google for that and do some research on it.
You could also choose to make your CAD program a library, and use
Python to control it, accessing the C/C++ layer via something like Pyrex.
That's a fundamental design decision obviously.
> There is another posting currently asking about how many interpreters
> are needed with how many thread states each. Since this is new to me,
> can someone please explain how this sort of thing is "supposed" to
> work, from a high level?
Frankly, I can't imagine why a script in a CAD program would need to
use threads at all. Keep it simple (here I'm assuming that the heavy-lifting
is done by your C++ code, so Python wouldn't have need of such
optimizations).
> I have a strong EE and hardware background (hence my need to write a
> CAD program that doesn't piss me off), but not a CS background.
Cool. If you do write it and release it, I'd be interested in finding out
about it.
You probably ought to consider starting with something existing like
the Gnu EDS project -- but I'm assuming you probably already know
about that.
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Python-list
mailing list