LogikSim / LogikSimPython

Python prototype of a digital logic simulator
http://www.logiksim.org/
GNU General Public License v3.0
2 stars 1 forks source link

Add interactive IPython console as a dock widget. #24

Open hacst opened 9 years ago

hacst commented 9 years ago

This pull request contains initial work for adding an interactive ipython console to LogikSim as a dockwidget. python_console

While the functionality works great _it is not ready to merge yet_ and is meant as a basis for future work. Unfortunately cx_Freeze doesn't seem to handle IPython correctly which results in the generated exe's not being executable. More concretely IPythons detection of which Qt bindings are installed seems to be broken from the frozen exe (qt_loaders.py) so even though pyside is present and imported the detection fails. Likely this is an issue with the imp.find_module calls in qt_loaders.py of IPython:

    import imp
    try:
        #importing top level PyQt4/PySide module is ok...
        mod = __import__(module_name)
        #...importing submodules is not
        imp.find_module('QtCore', mod.__path__)
        imp.find_module('QtGui', mod.__path__)
        imp.find_module('QtSvg', mod.__path__)

Besides these very basic freezing issues IPython might also confuse automatic dependency detection. For example we would like to not have to ship matplotlib just to get a nice python console.