Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'
#另外一种错误
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(
查看代码,格式如下:
print "文件%s不存在" % filename
。。。
print '-------xxx------' 改成
print ("文件%s不存在" % filename)
print ('-------xxx------')
Python3.x运行Python2.x代码报错 syntax error "Missing parentheses in call to 'print'的更多相关文章
- 关于报错“syntax error near unexpected token `”和回车换行
本来是很简单一个事情,转过来是因为打字机这事比较有趣…… http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 ...
- 一个参数大小写引发的uploadify报错 "Syntax error, unrecognized expression: #"
上传控件uploadify 报错"Syntax error, unrecognized expression: #" 版本为 uploadify3.2 报错原因:参数ID[hi ...
- JS function document.onclick(){}报错Syntax error on token "function", delete this token
JS function document.onclick(){}报错Syntax error on token "function", delete this token func ...
- JS function document.onclick(){}报错Syntax error on token "function", delete this token - CSDN博客
原文:JS function document.onclick(){}报错Syntax error on token "function", delete this token - ...
- 【问题与解决】Github 上传代码报错(error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version)
今天修改了GitHub 的代码,代码更新,想上传更新,却发现上传报错. 错误代码:error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 al ...
- linux shell 报错 Syntax error: Bad for loop variable
在linux下写了一个简单的shell,循环10次. test.sh #!/bin/bash ## ##循环10次 ## ; i<; i++)); do echo Good Morning ,t ...
- php Yii2使用registerJs或registerCss报错syntax error, unexpected end of file
解决方法: 注册时$js=<<<JS .....JS;//结尾处JS;应单独成行并且没有空格 JS;//这样就会报错,多了空格JS;//这样就不会
- artTemplate--使用artTemplate时,由于json对象属性有数字命名格式 导致调用报错 syntax error
案例 今天在使用artTemplate做开发时,遇到一个比较奇葩的问题,就是使用json对象去获取值得时候,报如下错误: Template Error <temp> function an ...
- js文件报错Syntax error on token "Invalid Regular Expression Options", no accurate correction
Syntax error on token "Invalid Regular Expression Options", no accurate correction 1.选中报错的 ...
随机推荐
- golang多维数组的切片
通过for循环来取多维数组的切片 package main import ( "fmt" ) func main() { a := [...]string{"USA&qu ...
- [SCOI2016]美味——主席树+按位贪心
原题戳这里 题解 让异或值最大显然要按位贪心,然后我们还发现加上一个\(x_i\)的效果就是所有\(a_i\)整体向右偏移了,我们对于\({a_i}\)开个主席树,支持查询一个区间中有多少个在\([L ...
- USC-- compute shader ps vs
http://cdn.imgtec.com/sdk-documentation/PowerVR%20Compute%20Development%20Recommendations.pdf powerV ...
- SQL拼串--小问题大毛病
用字符串拼接SQL串实现动态SQL语句,经常使用. 不过在拼接SQL串中有许多技巧和小陷阱 1.遗漏""和'' 错误案例: 错误结果: 发现没有数据产生..我还以为是连接错了数据库 ...
- “景驰科技杯”2018年华南理工大学程序设计竞赛 G. Youhane as "Bang Riot"(斜率DP)
题目链接:https://www.nowcoder.com/acm/contest/94/G 题意:中文题目,见链接 题解:设 sum[i] 为 a[i] 的前缀和,可得公式 dp[i] = min( ...
- 洛谷P1363 幻想迷宫【dfs】
题目:https://www.luogu.org/problemnew/show/P1363 题意: 有一个地图,起点是S,障碍物用#表示.可以将这个地图不断的在四周重复,问从起点开始是否可以走到无限 ...
- java中commons-beanutils的介绍(转)
1. 概述 commons-beanutil开源库是apache组织的一个基础的开源库.为apache中很多类提供工具方法.学习它是学习其它开源库实现的基础. Commons-beanutil中包 ...
- jdk8 时间日期工具类(转)
package com.changfu.common.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jav ...
- zuul网管配置其他服务时 HTTP Status 500 – Internal Server Error
1.这个错误是由三个原因导致的 (1).我在给类的接口命名的时候前面少加了一个/ (2)给zuul配置路由的时候多加了个服务名,serviceId名称就是spring的name,而不是eureka注入 ...
- P2051 [AHOI2009]中国象棋 大力DP
状压个啥$qwq$ 思路:大力$DP$ 提交:2次(自信的开了$int$) 题解:(见注释) #include<cstdio> #include<iostream> using ...