Hi,

I managed to pass my globals() to the console while creating it but then 
after how to update the console namespace then?

namespace = {'pg': pg, 'np': np,  'outlet':outlet, 'inlet':inlet, 
 'dft1':dft1}
text = ""
w2 = pg.console.ConsoleWidget(namespace=globals(),  text=text)
d2.addWidget(w2) #added my consoleWidget to a dock 

#all this woks well BUT how to update the namespace after...?

//...... other code and update all variables in my main routine.....///

I tried these below but nothing works and can't find a proper definition of 
what would work ... even the log is not logged...

w2.locals['zib']=123
w2.user_ns.update(zob = 123)
w2.consoleWidget.log("prout=123")
w2.kernel.shell.push({'lfilename':lfilename,'inlet':inlet, 'outlet':outlet})
w2.pushVariables(prout=123)

any idea?

many thanks for support.

Best

Robert


On Monday, May 9, 2016 at 8:00:12 AM UTC+2, Luke Campagnola wrote:
>
> This is what the "namespace" argument is for in ConsoleWidget.__init__(). 
> You can provide a dictionary of variables that will be immediately 
> available from the console.
>
> On Mon, May 2, 2016 at 7:06 AM, <[email protected] <javascript:>> wrote:
>
>> I'm on a steep learning curve at the moment - I've managed to create a 
>> PyQt application with two tabs, that loads a Pandas HDFStore and then 
>> creates additional dataframes based on user selections and plots them using 
>> pyqtgraph. I've also been able to implement a pyqtgraph console on the 
>> second tab.
>>
>> My question is - within my application is it possible to have access to 
>> the application data from within the console.
>>
>> E.g. I have self.store, and self.df1, etc and it would be good to address 
>> them directly in the console.
>>
>> Thanks in advance for helping a newbie.
>>
>> Best Regards,
>>
>> Ben
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "pyqtgraph" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pyqtgraph/c0cf8eec-4284-483d-bce8-1ebf98147a33%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/pyqtgraph/c0cf8eec-4284-483d-bce8-1ebf98147a33%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/63a3a30e-c592-43c2-aa06-d01c3a06622e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to