These are chat archives for spyder-ide/public

20th
Aug 2018
Aaron
@athompson673
Aug 20 2018 17:44
@CAM-Gerlach well seems like one of those updates was the answer... I should have done them one at a time to find out which one... here's what the update path was if anyone was interested / has a similar problem:
    ipykernel:      4.7.0-py36h2f9c1c0_0  --> 4.8.2-py36_0
    ipython:        6.2.1-py36h9cf0123_1  --> 6.5.0-py36_0
    jupyter_client: 5.2.1-py36_0          --> 5.2.3-py36_0
    libpng:         1.6.32-h140d38e_4     --> 1.6.34-h79bbb47_0
    pyqt:           5.6.0-py36hb5ed885_5  --> 5.9.2-py36ha878b3d_0
    pyzmq:          16.0.3-py36he714bf5_0 --> 17.1.2-py36hfa6e2cd_0
    qt:             5.6.2-vc14h6f8c307_12 --> 5.9.6-vc14h62aca36_0
    qtconsole:      4.3.1-py36h99a29a9_0  --> 4.4.0-py36_0
    sip:            4.18.1-py36h9c25514_2 --> 4.19.8-py36h6538335_0
    spyder-kernels: 0.2.4-py36_0          --> 0.2.6-py36_0
    sqlite:         3.20.1-h9eeafa9_2     --> 3.24.0-h7602738_0
    tornado:        4.5.3-py36_0          --> 5.1-py36hfa6e2cd_0
CAM Gerlach
@CAM-Gerlach
Aug 20 2018 18:16
Probably either pyzmq, tornado, ipykernel or jupyter_client; quite possibly it was some mutual corner-case between specific versions so it wasn't bad that you updated them all at once.
Glad you got it fixed @athompson673 !
Steven C. Gonzalez
@stevenconnorg
Aug 20 2018 22:04
Can anyone send a link on how to associate a file extension with syntax coloring? I'd like to associate a .pyt file (used for ArcGIS) with python syntax coloring.
CAM Gerlach
@CAM-Gerlach
Aug 20 2018 22:15
@stevenconnorg Unfortunately, I don't believe there's a built-in way to do that currently, since that's done through pyments. You could manually add the pyt extension as Python a number of different places in the code, or just do a hack to make it pretend to be .py when feeding it through to Pygments, although its a pretty narrow use case (a vanity extension for an otherwise generic Python module for a specific closed, proprietary program with plenty of good open-source alternatives). Others might have better ideas; longer term it would be nice to have better support for configuring syntax highlighting language manually, or easily adding custom extensions.
Steven C. Gonzalez
@stevenconnorg
Aug 20 2018 22:24
@CAM-Gerlach Thanks so much for your response. Would you be able to send any links for the workarounds you proposed?
CAM Gerlach
@CAM-Gerlach
Aug 20 2018 22:44
@stevenconnorg I'm afraid not really, since I just came up with them off the top of my head looking at the code haha. You could search for e.g. .pyx to give you an idea of the places to add it, and you could look at spyder/config/utils.py, spyder/utils/syntaxhighlighers.py and spyder/widgets/sourcecode/codeeditor.py for places to fake Pygments into thinking its .py if needed.