저는 실험실 용 PyQt 소프트웨어를 개발 중입니다. 이 소프트웨어에서는 다른 종류의 RAW를로드하고 mySQL 데이터베이스 (일반적으로 배열로)에서 데이터를 분석합니다.PyQT 응용 프로그램에서 Ipython 콘솔을 통합하는 방법
나는 이러한 데이터와 쉽게 상호 작용할 수 있도록 위젯에 Iython 콘솔을 통합하고자합니다.
Ipython 0.13을 사용하는 데 약간의 어려움이있었습니다.
##I load everything useful to my application, including the following line
from IPython.frontend.qt.console.qtconsoleapp import IPythonQtConsoleApp
##then is my whole software
##here is a class containing the Graphical User Interface elements. A button call the following function. self.Shell_Widget is the widget containing the Ipython console, self.MainWindow is the application mainwindow
def EmbeddedIpython(self):
"""
This function should launch an Ipython console
"""
self.Shell_Widget = QtGui.QDockWidget(self.MainWindow) #Widget creation
self.MainWindow.addDockWidget(4,self.Shell_Widget)
self.Shell_Widget.setMinimumSize(400,420)
console = IPythonQtConsoleApp() #Console Creation
console.initialize()
console.start()
self.Shell_Widget.show()
:
여기 내가 이미 (전체 코드는 매우 긴, 그래서 난 그냥 당신이 더 필요한 경우, 단지 말해, 위젯의 Ipython 콘솔과 해당 수입 라인을 포함하는 부분을 표시)가 무엇인가
원하는대로 Ipython 콘솔이 실행되고 작동하는 것처럼 보이지만 전체 응용 프로그램 변수, 배열 등에 액세스 할 수 없습니다. Ipython 콘솔이 소프트웨어와 독립적으로 시작되지만 여기에 내 제한이 있다고 생각합니다. 프로그래밍에서 ... 누군가 내 응용 프로그램 내에서 Ipython을 시작하는 방법을 알고 있습니까? 아마도 누락 된 매개 변수 일 수도 있고 Ipython을 통합하는 다른 방법 일 수도 있습니다.
정보는,이 작동하지 않습니다 Embedding IPython Qt console in a PyQt application
여러분의 도움에 감사드립니다!