首页
Linux教程
Linux资讯
Linux入门
Linux运维
Linux系统
Linux服务器
Linux安全
Linux问答
SHELL
树莓派
正则
linux命令
安装
Linux监控
运维自动化
Ansible
Piwik
CentOS
Deepin
Ubuntu
Debian
FreeBSD
Nginx
Apache
openresty
Tengine
宝塔
SSH
页面位置:
Linuxboy
>
Linux教程
>
正文
python
Python源码中文注释出错
文章由LinuxBoy分享于2019-04-01 06:04:03
热评(379)
Python源码中文注释出错
在python源码中使用中文注释,可能会报错,解决方案是:
# coding=gb2312
#中文注释在这里
print
(
"Hello World!"
)
或者使用方案:
# -*- coding: gb2312 -*-
#中文注释在这里
print
(
"Hello World!"
)
相关内容
Python学习笔记之yield
Python 收发Email的实现
Python re模块 sub方法介绍
Eclipse 中运行包含中文的Python程序
Python 的cookie处理操作
Python的SocketServer代码记录
Python的异常处理机制
Python扩展问题”unable to find vcvarsall.bat“的解决
将PJSIP的Python扩展从Python 2.4升级到Python 3.2
Python 二进制读写
今日最新
推荐文章:
Python学习笔记之yield
Python 收发Email的实现
Python re模块 sub方法介绍
Eclipse 中运行包含中文的Python程序
Python 的cookie处理操作
Python的SocketServer代码记录
评论暂时关闭
最新Linux教程教程
Python源码中文注释出错
ARM-MDK4.12关于中断奇怪的BUG
Shell脚本学习:快速理解正则表
C++内存泄漏跨平台的检测方法
在CentOS上安装rpmbuild
PHP客户端Web Service
Linux头条
Windows 7下硬盘安装 Red Hat Enterp
VMware环境精简Linux内核配置及内
hbase监控简单实用脚本,hbase监控
Linux screen管理-ssh掉线不用怕
Linux中网络配置文件的快速浏览
MySQL安全设置经验谈
评论暂时关闭