当前位置: 首页>>代码示例>>Python>>正文


Python QTextCodec.codecForName方法代码示例

本文整理汇总了Python中spyderlib.qt.QtCore.QTextCodec.codecForName方法的典型用法代码示例。如果您正苦于以下问题:Python QTextCodec.codecForName方法的具体用法?Python QTextCodec.codecForName怎么用?Python QTextCodec.codecForName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在spyderlib.qt.QtCore.QTextCodec的用法示例。


在下文中一共展示了QTextCodec.codecForName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ExternalSystemShell

# 需要导入模块: from spyderlib.qt.QtCore import QTextCodec [as 别名]
# 或者: from spyderlib.qt.QtCore.QTextCodec import codecForName [as 别名]
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)

"""External System Shell widget: execute terminal in a separate process"""

import os

from spyderlib.qt.QtGui import QMessageBox
from spyderlib.qt.QtCore import QProcess, Signal, QTextCodec, QProcessEnvironment

LOCALE_CODEC = QTextCodec.codecForLocale()
CP850_CODEC = QTextCodec.codecForName("cp850")

# Local imports
from spyderlib.utils.programs import shell_split
from spyderlib.baseconfig import _
from spyderlib.widgets.externalshell.baseshell import ExternalShellBase, add_pathlist_to_PYTHONPATH
from spyderlib.widgets.shell import TerminalWidget
from spyderlib.py3compat import to_text_string, is_text_string
import spyderlib.utils.icon_manager as ima


class ExternalSystemShell(ExternalShellBase):
    """External Shell widget: execute Python script in a separate process"""

    SHELL_CLASS = TerminalWidget
    started = Signal()
开发者ID:ftsiadimos,项目名称:spyder,代码行数:32,代码来源:systemshell.py

示例2: ExternalSystemShell

# 需要导入模块: from spyderlib.qt.QtCore import QTextCodec [as 别名]
# 或者: from spyderlib.qt.QtCore.QTextCodec import codecForName [as 别名]
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)

"""External System Shell widget: execute terminal in a separate process"""

import os

from spyderlib.qt.QtGui import QMessageBox
from spyderlib.qt.QtCore import QProcess, SIGNAL, QTextCodec
LOCALE_CODEC = QTextCodec.codecForLocale()
CP850_CODEC = QTextCodec.codecForName('cp850')

# Local imports
from spyderlib.utils.programs import shell_split
from spyderlib.baseconfig import _
from spyderlib.utils.qthelpers import get_icon
from spyderlib.widgets.externalshell.baseshell import (ExternalShellBase,
                                                   add_pathlist_to_PYTHONPATH)
from spyderlib.widgets.shell import TerminalWidget
from spyderlib.py3compat import to_text_string, is_text_string


class ExternalSystemShell(ExternalShellBase):
    """External Shell widget: execute Python script in a separate process"""
    SHELL_CLASS = TerminalWidget
    def __init__(self, parent=None, wdir=None, path=[], light_background=True,
                 menu_actions=None, show_buttons_inside=True,
                 show_elapsed_time=True):
开发者ID:arvindchari88,项目名称:newGitTest,代码行数:33,代码来源:systemshell.py


注:本文中的spyderlib.qt.QtCore.QTextCodec.codecForName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。