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


Python QTextCodec.codecForLocale方法代码示例

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


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

示例1: add_pathlist_to_PYTHONPATH

# 需要导入模块: from spyderlib.qt.QtCore import QTextCodec [as 别名]
# 或者: from spyderlib.qt.QtCore.QTextCodec import codecForLocale [as 别名]
# (see spyderlib/__init__.py for details)

# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201

import os
import os.path as osp
from time import time, strftime, gmtime

from spyderlib.qt.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QMenu, QLabel, QInputDialog, QLineEdit, QToolButton
from spyderlib.qt.QtCore import QProcess, Signal, QByteArray, QTimer, Qt, QTextCodec, Slot
import spyderlib.utils.icon_manager as ima

LOCALE_CODEC = QTextCodec.codecForLocale()

# Local imports
from spyderlib.utils.qthelpers import create_toolbutton, create_action, add_actions
from spyderlib.config.base import get_conf_path, _
from spyderlib.py3compat import is_text_string, to_text_string


def add_pathlist_to_PYTHONPATH(env, pathlist, drop_env=False):
    # PyQt API 1/2 compatibility-related tests:
    assert isinstance(env, list)
    assert all([is_text_string(path) for path in env])

    pypath = "PYTHONPATH"
    pathstr = os.pathsep.join(pathlist)
    if os.environ.get(pypath) is not None and not drop_env:
开发者ID:gyenney,项目名称:Tools,代码行数:33,代码来源:baseshell.py

示例2: import

# 需要导入模块: from spyderlib.qt.QtCore import QTextCodec [as 别名]
# 或者: from spyderlib.qt.QtCore.QTextCodec import codecForLocale [as 别名]
Profiler widget

See the official documentation on python profiling:
http://docs.python.org/library/profile.html

Questions for Pierre and others:
    - Where in the menu should profiler go?  Run > Profile code ?
"""

from __future__ import with_statement

from spyderlib.qt.QtGui import (QHBoxLayout, QWidget, QMessageBox, QVBoxLayout,
                                QLabel, QTreeWidget, QTreeWidgetItem,
                                QApplication)
from spyderlib.qt.QtCore import SIGNAL, QProcess, QByteArray, Qt, QTextCodec
locale_codec = QTextCodec.codecForLocale()
from spyderlib.qt.compat import getopenfilename

import sys
import os
import os.path as osp
import time

# Local imports
from spyderlib.utils.qthelpers import (create_toolbutton, get_item_user_text,
                                       set_item_user_text, get_icon)
from spyderlib.utils.programs import shell_split
from spyderlib.baseconfig import get_conf_path, get_translation
from spyderlib.widgets.texteditor import TextEditor
from spyderlib.widgets.comboboxes import PythonModulesComboBox
from spyderlib.widgets.externalshell import baseshell
开发者ID:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:33,代码来源:profilergui.py


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