本文整理汇总了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()
示例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):