[Eric] PyQt4 realtime interactive shell
Alex Mandel
tech_dev at wildintellect.com
Sun Dec 21 00:13:57 GMT 2008
Not sure if this is what you're after:
When I want to interact with my app, I put a break point in somewhere,
maybe after the initialization of the app, if there isn't a logical
place I just toss in a dummy print statement.
Then I run the app in Debug mode, it will pause at the break point and
that I can play with anything I want in the terminal in the lower left
corner.
If you don't see the >>> go to the box below any text and hit enter,
that usually get's it to show up.
Then you can play with any previously declared variables or import
anything new you want.
Alex
Shem Valentine wrote:
> After some more searching I found quite a long thread on this same
> issue. Sorry I didn't find it earlier.
>
> Looks like the best solution is to have ipython running in a terminal
> when I need to perform tasks such as this. I know this is may be a
> repeat, but it would be great if eric could integrate ipython somehow.
> It may not even be possible, that's for people much smarter than I.
>
> Thanks,
> -Shem
>
>
> Shem Valentine wrote:
>> Hello Gurus,
>>
>> I am a beginner to both python and pyqt, so I apoligize in advance if
>> this question seems quite simple.
>>
>> Since I am such a beginner I need to play with a few functions/methods
>> of PyQt and see what their result is. I can do this quite easily from
>> the IDLE shell.
>>
>> For Example:
>>
>> I'll import my mainwindow class
>>
>> Do the standard
>> a = QApplication([])
>> w = MyMainWindow()
>> w.show()
>>
>> Then I can play with the Widgets
>> w.lineedit.displayText()
>> w.lineedit.setText()
>> etc
>>
>>
>> The Problem:
>>
>> When I run my app in eric4 I don't get the ">>>" prompt, and as such
>> can't play with my widget methods realtime.
>>
>> If I remove the main .show() method, I can get a ">>>" prompt and run
>> these methods, but I can't get the window to display. I'll run w.show()
>> and nothing will happen, I'll run w.hide() and the screen will flicker,
>> but still nothing.
>>
>> I would love to be able to do this in eric4, and I imagine it's just
>> something simple I'm missing. Any help/guide on doing this would be
>> greatly appreciated.
>>
>> Thanks,
>> -Shem
>>
>>
>>
More information about the Eric
mailing list