Interpretor.

B

Balaji

Hello Everyone....

I have created a simple GUI using wx python. Its an simple editor...

Now what I want to do is pass the contents of this editor and receive
solution from python.

Suppose in the editor if I say x=2 and y=3 and then x+y I should get
back the solution.

In general i want to build an simple interpretor..

Any ideas....

Balaji
 
I

Ivo Woltring

Take a look at LEX ant YACC like python ports
I have had some luck with those tools
lex for lexical definitions
YACC (Yet Another Compiler Compiler) for grammar definitions

cheerz,
Ivo.
 
J

Josiah Carlson

Hello Everyone....

I have created a simple GUI using wx python. Its an simple editor...

Now what I want to do is pass the contents of this editor and receive
solution from python.

Suppose in the editor if I say x=2 and y=3 and then x+y I should get
back the solution.

In general i want to build an simple interpretor..


If you look at the wxPython demo, there is a wxProcess class that
basically does this for you.

- Josiah
 
M

Mark 'Kamikaze' Hughes

Balaji said:
Hello Everyone....
I have created a simple GUI using wx python. Its an simple editor...
Now what I want to do is pass the contents of this editor and receive
solution from python.
Suppose in the editor if I say x=2 and y=3 and then x+y I should get
back the solution.
In general i want to build an simple interpretor..
Any ideas....

You already have one: Python!
.... y=3
.... rc=x+y"""5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top