我使用python 2.7.2运行Ubuntu。python宽度语法错误
脚本
python \
/home/blainer/Desktop/convert/converter.py \
/home/blainer/Desktop/convert/urban.shp \
/home/blainer/Desktop/convert/result.js \
--width 900 \
--country_name_index 4 \
--where "ISO = 'USA'" \
--codes_file /home/blainer/Desktop/convert/codes-en.tsv \
--insets '[{"codes": ["US-AK"], "width": 200, "left": 10, "top": 370}, {"codes": ["US-HI"], "width": 100, "left": 220, "top": 400}]' \
--minimal_area 4000000 \
--buffer_distance -3000 \
--simplify_tolerance 1000 \
--longtitude0 10w \
--name us
错误
[email protected]:~/Desktop/convert$ python script.py
File "script.py", line 5
--width 900 \
^
SyntaxError: invalid syntax
您没有任何尾随空格后您的任何\吧?如果将所有内容放在一行中并包含width参数,会发生什么情况,您是否也会收到此错误? – Levon 2012-04-17 20:19:19
@Levon这不是一个Python脚本,他试图用Python来运行它。 – agf 2012-04-17 20:19:57
Ooops .. right you .. – Levon 2012-04-17 20:20:45