The following forum message was posted by  at 
http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4498666:

FYI, 

This is what i did to solve this problem and it seems to work (I created the
console first, but there must be a way to get the console after it has been
created).

[code]          final ICallback<Object, InterpreterResponse> onResponseReceived 
= new
ICallback<Object, InterpreterResponse>(){

                        public Object call(final InterpreterResponse arg){
                                //When we receive the response, we must handle 
it in the UI thread.
                                RunInUiThread.async(new Runnable(){
                                        public void run(){
                                        }
                                });
                                return null;
                        }
                };

                try {
                        PydevConsoleFactory factory = new PydevConsoleFactory();

                        PydevConsoleInterpreter interp = PydevConsoleFactory
                                        .createDefaultPydevInterpreter();
                        factory.createConsole(interp, "x=1;print x\n");

                        interp.exec ("y=2\n", onResponseReceived);

                } catch (Exception e) {
                        e.printStackTrace();
                }[/code]

Brian


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to