Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 让Spyder在整个界面上使用黑色主题_Python_Python 2.7_Spyder - Fatal编程技术网

Python 让Spyder在整个界面上使用黑色主题

Python 让Spyder在整个界面上使用黑色主题,python,python-2.7,spyder,Python,Python 2.7,Spyder,我使用的是spyder python 2.7,我更改了spyder black主题中的语法颜色,但我真的希望我的python程序看起来是全黑色的,所以没有白色窗口 有人能给我一个关于如何改变这一点的好解释吗 (此处为Spyder maintainer)此功能将在Spyder4中提供,将于2019年晚些时候发布。现在,对于Spyder的当前版本,您无能为力。抱歉。如果您等不及Spyder 4,这就是在Windows中使用Anaconda3实现Spyder 3.3.2的原因 出口Spyder 打开命

我使用的是spyder python 2.7,我更改了spyder black主题中的语法颜色,但我真的希望我的python程序看起来是全黑色的,所以没有白色窗口

有人能给我一个关于如何改变这一点的好解释吗


(此处为Spyder maintainer)此功能将在Spyder4中提供,将于2019年晚些时候发布。现在,对于Spyder的当前版本,您无能为力。抱歉。

如果您等不及Spyder 4,这就是在Windows中使用Anaconda3实现Spyder 3.3.2的原因

  • 出口Spyder
  • 打开命令提示符或Anaconda提示符
  • 运行
    pip install qdarkstyle
    并退出提示
  • 转到…\Anaconda3\Lib\site packages\spyder\utils并打开 qhelpers.py
  • import qdarkstyle
    添加到该文件的顶部
  • qapplication
    功能定义替换为以下代码(仅添加两行)
  • 保存并关闭文件
  • 打开Spyder,享受你的黑暗主题

    def qapplication(translate=True, test_time=3):
        """
        Return QApplication instance
        Creates it if it doesn't already exist
    
        test_time: Time to maintain open the application when testing. It's given
        in seconds
        """
        if running_in_mac_app():
            SpyderApplication = MacApplication
        else:
            SpyderApplication = QApplication
    
        app = SpyderApplication.instance()
        if app is None:
            # Set Application name for Gnome 3
            # https://groups.google.com/forum/#!topic/pyside/24qxvwfrRDs
            app = SpyderApplication(['Spyder'])
            # Set application name for KDE (See issue 2207)
            app.setApplicationName('Spyder')
            app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
        if translate:
            install_translator(app)
    
        test_ci = os.environ.get('TEST_CI_WIDGETS', None)
        if test_ci is not None:
            timer_shutdown = QTimer(app)
            timer_shutdown.timeout.connect(app.quit)
            timer_shutdown.start(test_time*1000)
        return app
    

  • Spyder 4.0.0 beta版提供完整的黑暗主题

    我是如何做到的:

    1) 在蟒蛇提示下

    conda update qt pyqt
    conda install -c spyder-ide spyder=4.0.0b2
    
    2) 如果您以前没有做过,请访问

    Tools > Preferences > Syntax Coloring
    

    斯派德4号现在出去了。包括暗模式✌

    看看这些变化:

    [.DuplicateYep.正要发布我自己的帖子这不是同一个问题,我知道如何在python中更改它,但是它部分是黑色的。所以我想知道是否有人知道如何使用qdarkstyle或其他软件包将其更改为全黑色?这不太好,因为我)我们的图标不会更改为浅色d ii)帮助窗格仍为白色。此外,每次更新Spyder时,此代码都会被覆盖。没错,这只是一种快速而肮脏的集成qdarkstyle的方法-我相信还有更可靠的方法。尽管如此,我还是想分享它。我非常高兴你分享了它。这也是一个快速而简单的修复方法。谢谢你救了我的眼睛Ripper博士!Spyder4.0.1现在可用。根据,使用
    conda install spyder=4.0.1安装它